---
schema_version: "1"
id: 82266f18f6fae12b890c1561c829cf0c1df10d4e93c0556d2b7f2c4dc6bf31f4
title: ConnectApi.ActivitySharingInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_activity_sharing.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_activity_sharing.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: bf78263689cd24c10addc2125ae7703785d5269d810e147886b04a60d220955d
description: Defines who a captured email or event is shared with.
---
# ConnectApi.ActivitySharingInput

Defines who a captured email or event is shared with.

<table class="featureTable sort_table" summary="">
          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d547358e27">Property</th>
              <th class="featureTableHeader vertical-align-top " id="d547358e29">Type</th>
              <th class="featureTableHeader vertical-align-top " id="d547358e31">Description</th>
              <th class="featureTableHeader vertical-align-top " id="d547358e33">Required or Optional</th>
              <th class="featureTableHeader vertical-align-top " id="d547358e35">Available Version</th>
            </tr>
          </thead>
          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d547358e27 d547358e35" data-title="Property"><samp class="codeph apex_code">groupsTo​ShareWith</samp></td>
              <td class="entry" headers="d547358e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;<samp class="codeph apex_code"><span class="keyword">String</span></samp>&gt;
              </td>
              <td class="entry" headers="d547358e31" data-title="Description"><span class="ph" id="groupsToShareWith"><a name="groupsToShareWith"><!-- --></a>List of IDs for the groups that you share the activity with. Valid
                  only if <samp class="codeph apex_code">sharingType</samp> is <samp class="codeph apex_code">MyGroups</samp>.</span></td>
              <td class="entry" headers="d547358e33" data-title="Required or Optional">Optional</td>
              <td class="entry" headers="d547358e27 d547358e35" data-title="Property">39.0</td>
            </tr>
            <tr>
              <td class="entry" headers="d547358e27 d547358e35" data-title="Property"><samp class="codeph apex_code">sharingType</samp></td>
              <td class="entry" headers="d547358e29" data-title="Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#ActivitySharingTypeEnum"><samp class="codeph apex_code">ConnectApi.​Activity​SharingType</samp></a></td>
              <td class="entry" headers="d547358e31" data-title="Description">
                <span class="ph" id="sharingType"><a name="sharingType"><!-- --></a>Type of sharing operation.</span> Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph apex_code">Everyone</samp>—The activity is shared with everyone.
                  </li>
                  <li class="li">
                    <samp class="codeph apex_code">MyGroups</samp>—The activity is shared only with a selection of the context user’s groups.
                  </li>
                  <li class="li">
                    <samp class="codeph apex_code">OnlyMe</samp>—The activity is private.
                  </li>
                </ul>
              </td>
              <td class="entry" headers="d547358e33" data-title="Required or Optional">Required</td>
              <td class="entry" headers="d547358e27 d547358e35" data-title="Property">39.0</td>
            </tr>
          </tbody>
        </table>