# attachEmployeeToContacts

Put an AI employee on contacts (at most 200 ids per call; send more in further calls). It then answers those contacts' texts, emails and calls and works them. The employee must be switched on (setEmployeeStatus) and every contact one the key owner can open. Recorded as the key owner's own assignment, so a contact someone took the employee off is put back because you named it. `changedCount` is how many it was newly put on; the rest already had it. When `interruptedContactId` is set the batch stopped there (`interruptedReason` says why): the contacts before it are done, so send that one and the rest again. Confirm the contacts with the person first.

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

## Variables

- `employeeId`: `ID!` (required)
- `contactIds`: `[ID!]!` (required)

## Response (data, an example)

```json
{
  "aiEmployeesMutation": {
    "attachAiEmployeeToContacts": {
      "requestedCount": 0,
      "changedCount": 0,
      "interruptedContactId": "<ID>",
      "interruptedReason": "…"
    }
  }
}
```

## 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": "attachEmployeeToContacts",
    "variables": {
      "employeeId": "<employeeId>",
      "contactIds": [
        "<contactIds>"
      ]
    }
  }'
```
