> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upsert Operator Queue

> Tenant or admin workflow endpoint for operator queues, callback tasks, supervisor actions, and follow-up processing.

Tenant or admin workflow endpoint for operator queues, callback tasks, supervisor actions, and follow-up processing.

### Path parameters

<ParamField path="queue_key" type="string" required>
  Operator queue key
</ParamField>

### Request body

`UpsertOperatorQueueRequest`

<ParamField body="active" type="boolean" />

<ParamField body="auto_dispatch_delay_seconds" type="integer,null (int32)" />

<ParamField body="auto_dispatch_enabled" type="boolean" />

<ParamField body="auto_dispatch_max_attempts" type="integer (int32)" />

<ParamField body="auto_dispatch_retry_delay_seconds" type="integer,null (int32)" />

<ParamField body="default_assignee" type="string,null" />

<ParamField body="description" type="string,null" />

<ParamField body="dispatch_schedule" type="any" />

<ParamField body="dispatch_timezone" type="string,null" />

<ParamField body="dispatch_window_end_hour_utc" type="integer,null (int32)" />

<ParamField body="dispatch_window_start_hour_utc" type="integer,null (int32)" />

<ParamField body="follow_up_escalation_assignee" type="string,null" />

<ParamField body="follow_up_escalation_priority" type="integer,null (int32)" />

<ParamField body="follow_up_escalation_queue_key" type="string,null" />

<ParamField body="follow_up_escalation_seconds" type="integer,null (int32)" />

<ParamField body="is_default" type="boolean" />

<ParamField body="metadata" type="any" />

<ParamField body="name" type="string" required />

<ParamField body="priority" type="integer (int32)" />

<ParamField body="sla_seconds" type="integer,null (int32)" />

### Response

`OperatorQueue`

<ResponseField name="active" type="boolean" required />

<ResponseField name="auto_dispatch_delay_seconds" type="integer,null (int32)" />

<ResponseField name="auto_dispatch_enabled" type="boolean" required />

<ResponseField name="auto_dispatch_max_attempts" type="integer (int32)" required />

<ResponseField name="auto_dispatch_retry_delay_seconds" type="integer,null (int32)" />

<ResponseField name="created_at" type="string" required />

<ResponseField name="default_assignee" type="string,null" />

<ResponseField name="description" type="string,null" />

<ResponseField name="dispatch_schedule" type="any" required />

<ResponseField name="dispatch_timezone" type="string,null" />

<ResponseField name="dispatch_window_end_hour_utc" type="integer,null (int32)" />

<ResponseField name="dispatch_window_start_hour_utc" type="integer,null (int32)" />

<ResponseField name="follow_up_escalation_assignee" type="string,null" />

<ResponseField name="follow_up_escalation_priority" type="integer,null (int32)" />

<ResponseField name="follow_up_escalation_queue_key" type="string,null" />

<ResponseField name="follow_up_escalation_seconds" type="integer,null (int32)" />

<ResponseField name="id" type="string" required />

<ResponseField name="is_default" type="boolean" required />

<ResponseField name="metadata" type="any" required />

<ResponseField name="name" type="string" required />

<ResponseField name="priority" type="integer (int32)" required />

<ResponseField name="queue_key" type="string" required />

<ResponseField name="sla_seconds" type="integer,null (int32)" />

<ResponseField name="tenant_id" type="string" required />

<ResponseField name="updated_at" type="string" required />

### Status codes

| Code  | Meaning                 |
| ----- | ----------------------- |
| `200` | Operator queue upserted |
| `400` | Validation error        |
| `401` | Unauthorized            |
| `500` | Internal server error   |
| `503` | Database not configured |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
    --url 'https://api.voice.stateset.com/api/v1/operator-queues/{queue_key}' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "active": true,
    "auto_dispatch_delay_seconds": null,
    "auto_dispatch_enabled": true,
    "auto_dispatch_max_attempts": 1,
    "auto_dispatch_retry_delay_seconds": null,
    "default_assignee": null,
    "description": null,
    "dispatch_schedule": null,
    "dispatch_timezone": null,
    "dispatch_window_end_hour_utc": null,
    "dispatch_window_start_hour_utc": null,
    "follow_up_escalation_assignee": null,
    "follow_up_escalation_priority": null,
    "follow_up_escalation_queue_key": null,
    "follow_up_escalation_seconds": null,
    "is_default": true,
    "metadata": null,
    "name": "string",
    "priority": 1,
    "sla_seconds": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "active": true,
    "auto_dispatch_delay_seconds": 600,
    "auto_dispatch_enabled": true,
    "auto_dispatch_max_attempts": 3,
    "auto_dispatch_retry_delay_seconds": 900,
    "created_at": "2024-01-15T10:30:00Z",
    "default_assignee": "tier2@stateset.com",
    "description": "Queue for human escalations that require follow-up",
    "dispatch_schedule": null,
    "dispatch_timezone": "America/New_York",
    "dispatch_window_end_hour_utc": 22,
    "dispatch_window_start_hour_utc": 14,
    "follow_up_escalation_assignee": "supervisor@stateset.com",
    "follow_up_escalation_priority": 2,
    "follow_up_escalation_queue_key": "priority-escalations",
    "follow_up_escalation_seconds": 1800,
    "id": "550e8400-e29b-41d4-a716-446655440010",
    "is_default": true,
    "metadata": null,
    "name": "Escalations",
    "priority": 10,
    "queue_key": "escalations",
    "sla_seconds": 900,
    "tenant_id": "tenant-123",
    "updated_at": "2024-01-15T10:32:22Z"
  }
  ```
</ResponseExample>
