# detachEmployeePhoneLine

Release a phone line an AI employee still holds from before lines were shared (an id from getEmployee `legacyPhoneLines`). It cannot be attached back, since lines are no longer assigned to employees: it stops answering calls to that number and no longer takes on new people who text it. Refused when the line is not on this employee. 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": "detachEmployeePhoneLine", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

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

## Response (data, an example)

```json
{
  "aiEmployeesMutation": {
    "detachContactAgentPhoneLine": {
      "id": "<ID>",
      "legacyPhoneLines": [
        {
          "id": "<ID>",
          "e164Number": "…"
        }
      ],
      "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": "detachEmployeePhoneLine",
    "variables": {
      "employeeId": "<employeeId>",
      "phoneLineId": "<phoneLineId>"
    }
  }'
```
