# setEmployeeStatus

Switch an AI employee on (ACTIVE) or off (INACTIVE). ON means it starts answering and working the contacts it is on, with real people, right away, which may publish its answer workflows; OFF stops it mid-conversation on every contact it is working. Say which and to how many contacts (getEmployee's `commitments`) and get the person's yes before either. The employee's own chat records the change. Same as the switch on the employee's page.

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

## Variables

- `employeeId`: `ID!` (required)
- `status`: `ContactAgentStatus!` (required, one of `ACTIVE`, `INACTIVE`)

## Response (data, an example)

```json
{
  "aiEmployeesMutation": {
    "setContactAgentStatus": {
      "id": "<ID>",
      "name": "…",
      "status": "ACTIVE",
      "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": "setEmployeeStatus",
    "variables": {
      "employeeId": "<employeeId>",
      "status": "ACTIVE"
    }
  }'
```
