# shareContactWithPartner

Share one contact with a partner organization, the contact page's Share: the partner gets its own copy. partnerOrganizationId from listPartnerships; assignments name the PARTNER org users who get it (userId, role POINT_PERSON | PARTICIPANT). include* choose what is copied (core, notes, calls, texts default true; tasks false). unshareContactWithPartner takes it back.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "shareContactWithPartner", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `contactId`: `ID!` (required)
- `partnerOrganizationId`: `ID!` (required)
- `assignments`: `[ShareContactUserAssignmentInput!]!` (required)
  - `userId`: `ID!` (required)
  - `role`: `ShareContactAssignmentRole!` (required, one of `POINT_PERSON`, `PARTICIPANT`)
  - `createTask`: `CreateTaskInput`
    - `title`: `String!` (required)
    - `taskType`: `String`
    - `timezone`: `Timezone!` (required, one of `IDLW`, `SST`, `HST`, `AKST`, `PST`, `MST`, `AZ`, `CST`, `EST`, `AST`, `BRT`, `FNT`, `AZOT`, `UTC`, `CET`, `EET`, `MSK`, `GST`, `PKT`, `BST`, `ICT`, `JST`, `AEST`, `NCT`, `NZST`). AZ: Arizona: MST all year, no DST.
    - `description`: `String`
    - `endDate`: `DateTime!` (required)
    - `participants`: `[String!]`
    - `contactId`: `String!` (required)
    - `pipelineItemIds`: `[ID!]`. Deals to explicitly attach to the task (creates DealTask join rows). May be empty or omitted.
    - `dealIds`: `[ID!]`
    - `autoCompleteOnNoteAdded`: `Boolean`
    - `autoCompleteOnReassignment`: `Boolean`
    - `createCalendarEvent`: `Boolean`
    - `alongsideOpenTasks`: `Boolean`
- `includeContactCore`: `Boolean`
- `includeTasks`: `Boolean`
- `includeNotes`: `Boolean`
- `includeCalls`: `Boolean`
- `includeTexts`: `Boolean`

## Response (data, an example)

```json
{
  "contactMutation": {
    "shareContact": {
      "baseContactId": "<ID>",
      "copiedContactId": "<ID>"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "shareContactWithPartner",
    "variables": {
      "contactId": "<contactId>",
      "partnerOrganizationId": "<partnerOrganizationId>",
      "assignments": [
        {
          "userId": "<userId>",
          "role": "POINT_PERSON"
        }
      ]
    }
  }'
```
