# attachEmployeeMailbox

Give an AI employee a mailbox to email from and be woken by (`mailboxId` from listEmployeeChannelOptions): a connected inbox, shared with the organization, with a live connection, that no other employee owns. On an employee that is switched on it takes effect on its next run: needs their yes; a card’s counts.

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

## Variables

- `employeeId`: `ID!` (required)
- `mailboxId`: `ID!` (required)

## Response (data, an example)

```json
{
  "aiEmployeesMutation": {
    "attachContactAgentMailbox": {
      "id": "<ID>",
      "mailboxes": [
        {
          "id": "<ID>",
          "emailAddress": "…",
          "hasActiveConnection": true
        }
      ],
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## 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": "attachEmployeeMailbox",
    "variables": {
      "employeeId": "<employeeId>",
      "mailboxId": "<mailboxId>"
    }
  }'
```
