{
    "openapi": "3.1.0",
    "info": {
        "title": "CallAgent API",
        "version": "2026-01-01",
        "description": "The CallAgent REST API.\n\n## Authentication\n\nEvery request carries a bearer API key:\n\n```\nAuthorization: Bearer ca_sk_…\n```\n\nA **private** key (`ca_sk_…`) is server-side only. A **public** key\n(`ca_pk_…`) is safe to ship in a browser bundle, authorises nothing on\nits own, and is exchanged at `POST /client-tokens` for a short-lived JWT\nscoped to one organization, assistant and session.\n\nThe organization is derived from the key. There is no `organization_id`\nparameter anywhere in this API, and there is nothing to tamper with: a\nresource belonging to another organization returns `404`, identical to an\nid that never existed.\n\n## Scopes\n\nA key may be restricted to a subset of permissions, to a set of origins,\nto specific assistants and to an IP allowlist. `GET /api-keys/scopes`\nreturns the full vocabulary.\n\n## Errors\n\nEvery error shares one shape, so a client writes one handler:\n\n```json\n{\n  \"error\": {\n    \"type\": \"provider_error\",\n    \"message\": \"Deepgram is rate-limiting requests, retry in 12s.\",\n    \"code\": \"rate_limited\",\n    \"retryable\": true,\n    \"provider\": \"deepgram\",\n    \"provider_request_id\": \"req_abc123\",\n    \"documentation_url\": \"https://docs.callagent.dev/errors/rate_limited\",\n    \"request_id\": \"01JQ…\"\n  }\n}\n```\n\n`retryable` says whether trying again can help. `request_id` is on every\nresponse and is the first thing support will ask for.\n\n## Webhooks\n\nOutbound events are signed with HMAC-SHA256 over `{timestamp}.{body}` and\ndelivered with `X-CallAgent-Signature` and `X-CallAgent-Timestamp`.\nVerify the timestamp is within five minutes *before* comparing digests,\nand compare in constant time. During a secret rotation the header carries\none `v1=` signature per valid secret — accept the request if any of them\nmatches. `GET /webhooks/events` lists every event type.\n\n## Idempotency\n\nAnything that creates a billable or externally visible side effect accepts\nan idempotency key, and replaying the key returns the original result\nrather than performing the action twice.\n\n## Rate limits\n\nResponses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining`. A `429`\ncarries `Retry-After` in seconds.",
        "contact": {
            "name": "CallAgent support",
            "url": "https://docs.callagent.dev"
        },
        "license": {
            "name": "Proprietary"
        }
    },
    "servers": [
        {
            "url": "http://callagent.test/api/v1"
        }
    ],
    "paths": {
        "/analytics/query": {
            "post": {
                "operationId": "v1.analytics.query",
                "summary": "POST /analytics/query — the §74 shape:\n{type, metric, metrics[], dimension, filters{}, granularity, preset|from|to,\n percentiles[], buckets, steps[], limit, timezone}",
                "tags": [
                    "Analytics"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "timeseries",
                                            "kpi",
                                            "table",
                                            "histogram",
                                            "percentile",
                                            "funnel",
                                            null
                                        ]
                                    },
                                    "metric": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "metrics": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "dimension": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "filters": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "granularity": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "hour",
                                            "day",
                                            "week",
                                            "month",
                                            null
                                        ]
                                    },
                                    "preset": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "from": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    },
                                    "to": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    },
                                    "percentiles": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "buckets": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 2,
                                        "maximum": 200
                                    },
                                    "steps": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "limit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 1000
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "type": "number"
                                                        },
                                                        "previous": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_percent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change_percent",
                                                        "metric",
                                                        "format",
                                                        "sample"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "dimension": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "columns": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "key": {
                                                                        "type": "string"
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "format": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "key",
                                                                    "label",
                                                                    "format"
                                                                ]
                                                            }
                                                        },
                                                        "rows": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "dimension",
                                                        "columns",
                                                        "rows"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        },
                                                        "buckets": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "from": {
                                                                        "type": "number"
                                                                    },
                                                                    "to": {
                                                                        "type": "number"
                                                                    },
                                                                    "count": {
                                                                        "type": "integer"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "from",
                                                                    "to",
                                                                    "count"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "metric",
                                                        "format",
                                                        "sample",
                                                        "buckets"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        },
                                                        "percentiles": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "metric",
                                                        "format",
                                                        "sample",
                                                        "percentiles"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "steps": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "key": {
                                                                        "type": "string"
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "count": {
                                                                        "type": "integer"
                                                                    },
                                                                    "rate": {
                                                                        "type": "number"
                                                                    },
                                                                    "drop": {
                                                                        "type": "number"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "key",
                                                                    "label",
                                                                    "count",
                                                                    "rate",
                                                                    "drop"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "steps"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "buckets": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "series": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "key": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "points": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": [
                                                                                "number",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    }
                                                                },
                                                                "required": [
                                                                    "key",
                                                                    "label",
                                                                    "points"
                                                                ]
                                                            }
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "buckets",
                                                        "series",
                                                        "metric",
                                                        "format"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/analytics/overview": {
            "get": {
                "operationId": "v1.analytics.overview",
                "summary": "The §116 dashboard figures that belong to Observe",
                "tags": [
                    "Analytics"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "range": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {
                                                            "type": "string"
                                                        },
                                                        "to": {
                                                            "type": "string"
                                                        },
                                                        "timezone": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to",
                                                        "timezone"
                                                    ]
                                                },
                                                "calls_today": {
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "type": "number"
                                                        },
                                                        "previous": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_percent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change_percent",
                                                        "metric",
                                                        "format",
                                                        "sample"
                                                    ]
                                                },
                                                "minutes": {
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "type": "number"
                                                        },
                                                        "previous": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_percent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change_percent",
                                                        "metric",
                                                        "format",
                                                        "sample"
                                                    ]
                                                },
                                                "cost": {
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "type": "number"
                                                        },
                                                        "previous": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_percent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change_percent",
                                                        "metric",
                                                        "format",
                                                        "sample"
                                                    ]
                                                },
                                                "success_rate": {
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "type": "number"
                                                        },
                                                        "previous": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_percent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change_percent",
                                                        "metric",
                                                        "format",
                                                        "sample"
                                                    ]
                                                },
                                                "pickup_rate": {
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "type": "number"
                                                        },
                                                        "previous": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_percent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change_percent",
                                                        "metric",
                                                        "format",
                                                        "sample"
                                                    ]
                                                },
                                                "latency": {
                                                    "type": "object",
                                                    "properties": {
                                                        "metric": {
                                                            "type": "string"
                                                        },
                                                        "format": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "integer"
                                                        },
                                                        "percentiles": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "metric",
                                                        "format",
                                                        "sample",
                                                        "percentiles"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "range",
                                                "calls_today",
                                                "minutes",
                                                "cost",
                                                "success_rate",
                                                "pickup_rate",
                                                "latency"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/analytics/vocabulary": {
            "get": {
                "operationId": "v1.analytics.vocabulary",
                "summary": "The vocabulary a client needs to build a query UI without hard-coding it",
                "tags": [
                    "Analytics"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "metrics": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "dimensions": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "string"
                                                    }
                                                },
                                                "widget_types": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "string"
                                                    }
                                                },
                                                "granularities": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "metrics",
                                                "dimensions",
                                                "widget_types",
                                                "granularities"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api-keys/scopes": {
            "get": {
                "operationId": "v1.api-keys.scopes",
                "summary": "The scope vocabulary a key may be granted (§93)",
                "tags": [
                    "ApiKey"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "group": {
                                                        "type": "string"
                                                    },
                                                    "scopes": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "description": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "name",
                                                                "description"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "group",
                                                    "scopes"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api-keys": {
            "get": {
                "operationId": "v1.api-keys.index",
                "summary": "List API keys. Key material is never included",
                "tags": [
                    "ApiKey"
                ],
                "parameters": [
                    {
                        "name": "active_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `ApiKeyResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ApiKeyResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.api-keys.store",
                "description": "A `public` key must carry at least one allowed origin — it ships inside a\nbrowser bundle, so origin restriction is the only thing protecting it.",
                "summary": "Issue an API key",
                "tags": [
                    "ApiKey"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "private",
                                            "public",
                                            "service_account",
                                            null
                                        ]
                                    },
                                    "scopes": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "maxLength": 96
                                        }
                                    },
                                    "allowed_origins": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "maxLength": 255
                                        }
                                    },
                                    "allowed_assistant_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "allowed_ips": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "key": {
                                                    "type": "string"
                                                },
                                                "key_prefix": {
                                                    "type": "string"
                                                },
                                                "last_four": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scopes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "expires_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "notice": {
                                                    "type": "string",
                                                    "enum": [
                                                        "This is a public key. It is safe to ship in a browser bundle, but restrict it by origin and assistant.",
                                                        "Store this key now. It is hashed on our side and can never be shown again — only rotated."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "type",
                                                "key",
                                                "key_prefix",
                                                "last_four",
                                                "scopes",
                                                "expires_at",
                                                "notice"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/api-keys/{apiKey}": {
            "get": {
                "operationId": "v1.api-keys.show",
                "summary": "Retrieve one API key",
                "tags": [
                    "ApiKey"
                ],
                "parameters": [
                    {
                        "name": "apiKey",
                        "in": "path",
                        "required": true,
                        "description": "The api key ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ApiKeyResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ApiKeyResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.api-keys.update",
                "summary": "Update a key's name, scopes, restrictions or expiry. Key material is immutable",
                "tags": [
                    "ApiKey"
                ],
                "parameters": [
                    {
                        "name": "apiKey",
                        "in": "path",
                        "required": true,
                        "description": "The api key ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "scopes": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "allowed_origins": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "allowed_assistant_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "allowed_ips": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "200": {
                        "description": "`ApiKeyResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ApiKeyResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.api-keys.destroy",
                "summary": "Revoke a key immediately",
                "tags": [
                    "ApiKey"
                ],
                "parameters": [
                    {
                        "name": "apiKey",
                        "in": "path",
                        "required": true,
                        "description": "The api key ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "api_key"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "display": {
                                                    "type": "string"
                                                },
                                                "public_key": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scopes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "allowed_origins": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "allowed_assistant_ids": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "allowed_ips": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "expires_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_used_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_used_ip": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "revoked_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "rotated_from_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "usable": {
                                                    "type": "boolean"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "name",
                                                "type",
                                                "display",
                                                "public_key",
                                                "scopes",
                                                "allowed_origins",
                                                "allowed_assistant_ids",
                                                "allowed_ips",
                                                "expires_at",
                                                "last_used_at",
                                                "last_used_ip",
                                                "revoked_at",
                                                "rotated_from_id",
                                                "usable",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/api-keys/{apiKey}/rotate": {
            "post": {
                "operationId": "v1.api-keys.rotate",
                "description": "Returns the replacement's plaintext. The old key keeps working for\n`overlap_hours` so a rolling deploy does not break; pass 0 after a leak.",
                "summary": "Rotate a key",
                "tags": [
                    "ApiKey"
                ],
                "parameters": [
                    {
                        "name": "apiKey",
                        "in": "path",
                        "required": true,
                        "description": "The api key ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "overlap_hours": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 720
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "key": {
                                                    "type": "string"
                                                },
                                                "key_prefix": {
                                                    "type": "string"
                                                },
                                                "last_four": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scopes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "expires_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "notice": {
                                                    "type": "string",
                                                    "enum": [
                                                        "This is a public key. It is safe to ship in a browser bundle, but restrict it by origin and assistant.",
                                                        "Store this key now. It is hashed on our side and can never be shown again — only rotated."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "type",
                                                "key",
                                                "key_prefix",
                                                "last_four",
                                                "scopes",
                                                "expires_at",
                                                "notice"
                                            ]
                                        },
                                        "rotated_from": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "api_key"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "display": {
                                                    "type": "string"
                                                },
                                                "public_key": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scopes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "allowed_origins": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "allowed_assistant_ids": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "allowed_ips": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "expires_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_used_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_used_ip": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "revoked_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "rotated_from_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "usable": {
                                                    "type": "boolean"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "name",
                                                "type",
                                                "display",
                                                "public_key",
                                                "scopes",
                                                "allowed_origins",
                                                "allowed_assistant_ids",
                                                "allowed_ips",
                                                "expires_at",
                                                "last_used_at",
                                                "last_used_ip",
                                                "revoked_at",
                                                "rotated_from_id",
                                                "usable",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "rotated_from"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants": {
            "get": {
                "operationId": "v1.assistants.index",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "published_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AssistantResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.assistants.store",
                "tags": [
                    "Assistant"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreAssistantRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/AssistantResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "tools",
                                                        "knowledge_bases"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/assistants/{assistant}": {
            "get": {
                "operationId": "v1.assistants.show",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/AssistantResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "tools",
                                                        "knowledge_bases"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.assistants.update",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateAssistantRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/AssistantResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "tools",
                                                        "knowledge_bases"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.assistants.destroy",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/duplicate": {
            "post": {
                "operationId": "v1.assistants.duplicate",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "`AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AssistantResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/publish": {
            "post": {
                "operationId": "v1.assistants.publish",
                "summary": "§108. Freezes the draft into an immutable version",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "`AssistantVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AssistantVersionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "validation_error"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/unpublish": {
            "post": {
                "operationId": "v1.assistants.unpublish",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AssistantResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/versions": {
            "get": {
                "operationId": "v1.assistants.versions.index",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `AssistantVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/AssistantVersionResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/versions/{version}": {
            "get": {
                "operationId": "v1.assistants.versions.show",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "version",
                        "in": "path",
                        "required": true,
                        "description": "The version ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AssistantVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AssistantVersionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/versions/{version}/restore": {
            "post": {
                "operationId": "v1.assistants.versions.restore",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "version",
                        "in": "path",
                        "required": true,
                        "description": "The version ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "publish": {
                                        "type": "boolean",
                                        "default": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`AssistantResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AssistantResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/preview": {
            "get": {
                "operationId": "v1.assistants.preview",
                "summary": "The exact snapshot the Voice Gateway would receive for this draft",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "schema_version": {
                                                    "type": "integer",
                                                    "const": 1
                                                },
                                                "assistant": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {},
                                                        "organization_id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "description": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "mode": {
                                                            "type": "string"
                                                        },
                                                        "language": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "additional_languages": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "first_message": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "first_message_mode": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "first_message_interruptions_enabled": {
                                                            "type": "boolean"
                                                        },
                                                        "system_prompt": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "end_call_message": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "end_call_function_enabled": {
                                                            "type": "boolean"
                                                        },
                                                        "silence_timeout_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "max_duration_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "template_strictness": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "organization_id",
                                                        "name",
                                                        "description",
                                                        "mode",
                                                        "language",
                                                        "additional_languages",
                                                        "first_message",
                                                        "first_message_mode",
                                                        "first_message_interruptions_enabled",
                                                        "system_prompt",
                                                        "end_call_message",
                                                        "end_call_function_enabled",
                                                        "silence_timeout_seconds",
                                                        "max_duration_seconds",
                                                        "template_strictness"
                                                    ]
                                                },
                                                "transcriber": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "string"
                                                        }
                                                    ]
                                                },
                                                "model": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "string"
                                                        }
                                                    ]
                                                },
                                                "voice": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "string"
                                                        }
                                                    ]
                                                },
                                                "speech_to_speech_model": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "plans": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start_speaking": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "stop_speaking": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "artifact": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "analysis": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "observability": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "message": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "keypad_input": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "recording_consent": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "voicemail_detection": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "transfer": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "compliance": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "background_sound": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "background_speech_denoising": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "start_speaking",
                                                        "stop_speaking",
                                                        "artifact",
                                                        "analysis",
                                                        "observability",
                                                        "message",
                                                        "keypad_input",
                                                        "recording_consent",
                                                        "voicemail_detection",
                                                        "transfer",
                                                        "compliance",
                                                        "background_sound",
                                                        "background_speech_denoising"
                                                    ]
                                                },
                                                "conversation": {
                                                    "type": "object",
                                                    "properties": {
                                                        "end_call_phrases": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "idle_messages": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "background_messages": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "pronunciations": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "custom_keywords": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "voice_formatting": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "end_call_phrases",
                                                        "idle_messages",
                                                        "background_messages",
                                                        "pronunciations",
                                                        "custom_keywords",
                                                        "voice_formatting"
                                                    ]
                                                },
                                                "server": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "hooks": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "fallbacks": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "variable_values": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "tools": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "version_id": {},
                                                            "version": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "key": {
                                                                "type": "string"
                                                            },
                                                            "type": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "$ref": "#/components/schemas/ToolType"
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "description": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "parameters": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "type": {
                                                                                "type": "string",
                                                                                "const": "object"
                                                                            },
                                                                            "properties": {
                                                                                "type": "array",
                                                                                "items": {
                                                                                    "type": "string"
                                                                                },
                                                                                "minItems": 0,
                                                                                "maxItems": 0,
                                                                                "additionalItems": false
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "type",
                                                                            "properties"
                                                                        ]
                                                                    }
                                                                ]
                                                            },
                                                            "config": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "messages": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "rejection_plan": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "pin_mode": {
                                                                "type": "string"
                                                            },
                                                            "alias": {
                                                                "type": "string"
                                                            },
                                                            "exposed_name": {
                                                                "type": "string"
                                                            },
                                                            "overrides": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        },
                                                                        "minItems": 0,
                                                                        "maxItems": 0,
                                                                        "additionalItems": false
                                                                    }
                                                                ]
                                                            },
                                                            "is_async": {
                                                                "type": "boolean"
                                                            },
                                                            "timeout_seconds": {
                                                                "type": "integer"
                                                            },
                                                            "requires_confirmation": {
                                                                "type": "boolean"
                                                            },
                                                            "risk_level": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "mcp_server_id": {
                                                                "type": "string"
                                                            },
                                                            "mcp_tool_name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "version_id",
                                                            "version",
                                                            "name",
                                                            "key",
                                                            "type",
                                                            "description",
                                                            "parameters",
                                                            "config",
                                                            "messages",
                                                            "rejection_plan",
                                                            "pin_mode",
                                                            "alias",
                                                            "exposed_name",
                                                            "overrides",
                                                            "is_async",
                                                            "timeout_seconds",
                                                            "requires_confirmation",
                                                            "risk_level",
                                                            "mcp_server_id",
                                                            "mcp_tool_name"
                                                        ]
                                                    }
                                                },
                                                "mcp_servers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {},
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "transport": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "timeout_seconds": {
                                                                "type": "integer"
                                                            },
                                                            "auth_type": {
                                                                "type": "string"
                                                            },
                                                            "provider_credential_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "oauth_connection_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "headers": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "confirmation_policy": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "tools": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "name": {
                                                                            "type": "string"
                                                                        },
                                                                        "title": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "description": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "input_schema": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                },
                                                                                {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "type": {
                                                                                            "type": "string",
                                                                                            "const": "object"
                                                                                        },
                                                                                        "properties": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "string"
                                                                                            },
                                                                                            "minItems": 0,
                                                                                            "maxItems": 0,
                                                                                            "additionalItems": false
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "type",
                                                                                        "properties"
                                                                                    ]
                                                                                }
                                                                            ]
                                                                        },
                                                                        "output_schema": {
                                                                            "type": [
                                                                                "array",
                                                                                "null"
                                                                            ],
                                                                            "items": {}
                                                                        },
                                                                        "risk_level": {
                                                                            "type": "string"
                                                                        },
                                                                        "requires_confirmation": {
                                                                            "type": "boolean"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "name",
                                                                        "title",
                                                                        "description",
                                                                        "input_schema",
                                                                        "output_schema",
                                                                        "risk_level",
                                                                        "requires_confirmation"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "transport",
                                                            "url",
                                                            "timeout_seconds",
                                                            "auth_type",
                                                            "provider_credential_id",
                                                            "oauth_connection_id",
                                                            "headers",
                                                            "confirmation_policy",
                                                            "tools"
                                                        ]
                                                    }
                                                },
                                                "knowledge": {
                                                    "type": "object",
                                                    "properties": {
                                                        "bases": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "provider": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "namespace": {
                                                                        "type": "string"
                                                                    },
                                                                    "embedding": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "provider": {
                                                                                "type": "string"
                                                                            },
                                                                            "model": {
                                                                                "type": "string"
                                                                            },
                                                                            "dimensions": {
                                                                                "type": "string"
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "provider",
                                                                            "model",
                                                                            "dimensions"
                                                                        ]
                                                                    },
                                                                    "retrieval": {
                                                                        "type": "string"
                                                                    },
                                                                    "custom_provider": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "name",
                                                                    "provider",
                                                                    "namespace",
                                                                    "embedding",
                                                                    "retrieval",
                                                                    "custom_provider"
                                                                ]
                                                            }
                                                        },
                                                        "knowledge_only": {
                                                            "type": "boolean"
                                                        },
                                                        "knowledge_only_plan": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "bases",
                                                        "knowledge_only",
                                                        "knowledge_only_plan"
                                                    ]
                                                },
                                                "structured_outputs": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {},
                                                            "key": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "schema": {
                                                                "type": "string"
                                                            },
                                                            "prompt": {
                                                                "type": "string"
                                                            },
                                                            "model": {
                                                                "type": "string"
                                                            },
                                                            "version_id": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "key",
                                                            "name",
                                                            "schema",
                                                            "prompt",
                                                            "model",
                                                            "version_id"
                                                        ]
                                                    }
                                                },
                                                "credentials": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "credential_id": {
                                                                "type": "string"
                                                            },
                                                            "provider": {
                                                                "type": "string"
                                                            },
                                                            "class": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "credential_id",
                                                            "provider",
                                                            "class"
                                                        ]
                                                    }
                                                },
                                                "metadata": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "schema_version",
                                                "assistant",
                                                "transcriber",
                                                "model",
                                                "voice",
                                                "speech_to_speech_model",
                                                "plans",
                                                "conversation",
                                                "server",
                                                "hooks",
                                                "fallbacks",
                                                "variables",
                                                "variable_values",
                                                "tools",
                                                "mcp_servers",
                                                "knowledge",
                                                "structured_outputs",
                                                "credentials",
                                                "metadata"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/render-prompt": {
            "post": {
                "operationId": "v1.assistants.render-prompt",
                "summary": "§127/§128: renders the prompt against a supplied variable context",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "system_prompt": {
                                                    "type": "string"
                                                },
                                                "first_message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "missing": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "system_prompt",
                                                "first_message",
                                                "missing"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/assistants/{assistant}/validate": {
            "get": {
                "operationId": "v1.assistants.validate",
                "summary": "Publish-time checks, without publishing",
                "tags": [
                    "Assistant"
                ],
                "parameters": [
                    {
                        "name": "assistant",
                        "in": "path",
                        "required": true,
                        "description": "The assistant ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "errors": {
                                                    "type": "array",
                                                    "prefixItems": [
                                                        {
                                                            "type": "string",
                                                            "const": "Knowledge-only mode requires at least one knowledge base."
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    },
                                                                    "minItems": 0,
                                                                    "maxItems": 0,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        }
                                                    ],
                                                    "minItems": 3,
                                                    "maxItems": 3,
                                                    "additionalItems": false
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "errors"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/structured-outputs/templates": {
            "get": {
                "operationId": "v1.structured-outputs.templates",
                "summary": "The §70 starter templates, ready to POST back as a new definition",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Call summary"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "A short factual summary of what happened on the call."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Summarise this conversation factually. Do not infer anything that was not said."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "sentiment": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Sentiment"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "Caller sentiment and how it moved during the call."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Assess the caller's sentiment based only on what they said."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "success": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Success evaluation"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "Whether the assistant achieved the call objective."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Decide whether the assistant achieved its stated objective on this call."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "follow_up": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Follow-up"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "Whether anything was promised and by when."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Extract any follow-up action that was explicitly promised on this call."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "lead_qualification": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Lead qualification"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "BANT-style qualification signals."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Extract qualification signals stated by the caller. Leave fields null when nothing was said."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "customer_fields": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Customer fields"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "Contact details the caller volunteered."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Extract only contact details the caller stated explicitly. Never guess or complete a partial value."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "appointment": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Appointment"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "A booked or requested appointment."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Extract the appointment that was agreed. Only report a date and time that were explicitly confirmed."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "order_data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Order data"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "Order or transaction details discussed."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Extract order details stated on the call."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                },
                                                "compliance": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string",
                                                            "const": "Compliance"
                                                        },
                                                        "description": {
                                                            "type": "string",
                                                            "const": "Whether required disclosures were made."
                                                        },
                                                        "target": {
                                                            "type": "string",
                                                            "const": "both"
                                                        },
                                                        "prompt": {
                                                            "type": "string",
                                                            "const": "Check whether each required disclosure was actually spoken on this call."
                                                        },
                                                        "schema": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "description",
                                                        "target",
                                                        "prompt",
                                                        "schema"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "sentiment",
                                                "success",
                                                "follow_up",
                                                "lead_qualification",
                                                "customer_fields",
                                                "appointment",
                                                "order_data",
                                                "compliance"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/structured-outputs": {
            "get": {
                "operationId": "v1.structured-outputs.index",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `StructuredOutputResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/StructuredOutputResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.structured-outputs.store",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreStructuredOutputRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`StructuredOutputResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/StructuredOutputResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/structured-outputs/{structuredOutput}": {
            "get": {
                "operationId": "v1.structured-outputs.show",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "parameters": [
                    {
                        "name": "structuredOutput",
                        "in": "path",
                        "required": true,
                        "description": "The structured output ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`StructuredOutputResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/StructuredOutputResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.structured-outputs.update",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "parameters": [
                    {
                        "name": "structuredOutput",
                        "in": "path",
                        "required": true,
                        "description": "The structured output ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateStructuredOutputRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`StructuredOutputResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/StructuredOutputResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.structured-outputs.destroy",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "parameters": [
                    {
                        "name": "structuredOutput",
                        "in": "path",
                        "required": true,
                        "description": "The structured output ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/structured-outputs/{structuredOutput}/publish": {
            "post": {
                "operationId": "v1.structured-outputs.publish",
                "tags": [
                    "AssistantStructuredOutput"
                ],
                "parameters": [
                    {
                        "name": "structuredOutput",
                        "in": "path",
                        "required": true,
                        "description": "The structured output ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "version_id": {},
                                                "version": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "version_id",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "validation_error"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/billing/balance": {
            "get": {
                "operationId": "v1.billing.balance",
                "tags": [
                    "Balance"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "balance": {
                                                    "type": "string",
                                                    "description": "bcmath renders negative zero as '-0.00000000'; collapse it so equality\nand string comparisons behave."
                                                },
                                                "available_balance": {
                                                    "type": "string",
                                                    "description": "bcmath renders negative zero as '-0.00000000'; collapse it so equality\nand string comparisons behave."
                                                },
                                                "reserved": {
                                                    "type": "string",
                                                    "description": "bcmath renders negative zero as '-0.00000000'; collapse it so equality\nand string comparisons behave."
                                                },
                                                "billing_mode": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "outbound_frozen": {
                                                    "type": "boolean"
                                                },
                                                "credit_limit": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "dunning_stage": {
                                                    "type": "integer"
                                                },
                                                "burn_rate_per_day": {
                                                    "type": "string"
                                                },
                                                "projected_runway_hours": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "estimated_minutes_remaining": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "daily_spend_cap": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "currency",
                                                "balance",
                                                "available_balance",
                                                "reserved",
                                                "billing_mode",
                                                "status",
                                                "outbound_frozen",
                                                "credit_limit",
                                                "dunning_stage",
                                                "burn_rate_per_day",
                                                "projected_runway_hours",
                                                "estimated_minutes_remaining",
                                                "daily_spend_cap"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/ledger": {
            "get": {
                "operationId": "v1.billing.ledger",
                "tags": [
                    "Balance"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "amount": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "balance_after": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "description": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "source_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "source_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "call_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "amount",
                                                    "currency",
                                                    "balance_after",
                                                    "description",
                                                    "source_type",
                                                    "source_id",
                                                    "call_id",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total",
                                                "last_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/ledger/reconcile": {
            "get": {
                "operationId": "v1.billing.ledger.reconcile",
                "description": "Exposed on purpose: a customer who thinks their balance is wrong should be\nable to make us prove it against the ledger rather than trust a cache.",
                "summary": "Recompute the balance from the ledger and report drift",
                "tags": [
                    "Balance"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "organization_id": {
                                                    "type": "string"
                                                },
                                                "ledger_settled": {
                                                    "type": "string"
                                                },
                                                "ledger_reserved": {
                                                    "type": "string"
                                                },
                                                "cached_settled": {
                                                    "type": "string"
                                                },
                                                "cached_reserved": {
                                                    "type": "string"
                                                },
                                                "settled_drift": {
                                                    "type": "string"
                                                },
                                                "reserved_drift": {
                                                    "type": "string"
                                                },
                                                "ledger_entry_count": {
                                                    "type": "integer"
                                                },
                                                "cached_entry_count": {
                                                    "type": "integer"
                                                },
                                                "has_drift": {
                                                    "type": "boolean"
                                                },
                                                "repaired": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "organization_id",
                                                "ledger_settled",
                                                "ledger_reserved",
                                                "cached_settled",
                                                "cached_reserved",
                                                "settled_drift",
                                                "reserved_drift",
                                                "ledger_entry_count",
                                                "cached_entry_count",
                                                "has_drift",
                                                "repaired"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boards": {
            "get": {
                "operationId": "v1.boards.index",
                "tags": [
                    "Board"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.boards.store",
                "tags": [
                    "Board"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "slug": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 96
                                    },
                                    "time_preset": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 24
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "filters": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "refresh_interval_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 3600
                                    },
                                    "is_default": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "time_preset": {
                                                    "type": "string"
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "filters": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "refresh_interval_seconds": {
                                                    "type": "integer"
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                },
                                                "widgets": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "slug",
                                                "description",
                                                "time_preset",
                                                "timezone",
                                                "filters",
                                                "refresh_interval_seconds",
                                                "is_default",
                                                "widgets"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/boards/{boardId}": {
            "get": {
                "operationId": "v1.boards.show",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "time_preset": {
                                                    "type": "string"
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "filters": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "refresh_interval_seconds": {
                                                    "type": "integer"
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                },
                                                "widgets": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "slug",
                                                "description",
                                                "time_preset",
                                                "timezone",
                                                "filters",
                                                "refresh_interval_seconds",
                                                "is_default",
                                                "widgets"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.boards.update",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "time_preset": {
                                                    "type": "string"
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "filters": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "refresh_interval_seconds": {
                                                    "type": "integer"
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                },
                                                "widgets": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "slug",
                                                "description",
                                                "time_preset",
                                                "timezone",
                                                "filters",
                                                "refresh_interval_seconds",
                                                "is_default",
                                                "widgets"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.boards.destroy",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/boards/{boardId}/data": {
            "get": {
                "operationId": "v1.boards.data",
                "summary": "Every widget on the board, rendered. One call per board load",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "preset",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "timezone",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "board": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "timezone": {},
                                                        "preset": {}
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "timezone",
                                                        "preset"
                                                    ]
                                                },
                                                "widgets": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "title": {
                                                                "type": "string"
                                                            },
                                                            "subtitle": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "type": {
                                                                "type": "string"
                                                            },
                                                            "metric": {
                                                                "type": "string"
                                                            },
                                                            "dimension": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "layout": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "x": {
                                                                        "type": "integer"
                                                                    },
                                                                    "y": {
                                                                        "type": "integer"
                                                                    },
                                                                    "w": {
                                                                        "type": "integer"
                                                                    },
                                                                    "h": {
                                                                        "type": "integer"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "x",
                                                                    "y",
                                                                    "w",
                                                                    "h"
                                                                ]
                                                            },
                                                            "data": {
                                                                "type": "null"
                                                            },
                                                            "error": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "string",
                                                                        "enum": [
                                                                            "This widget could not be rendered."
                                                                        ]
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "title",
                                                            "subtitle",
                                                            "type",
                                                            "metric",
                                                            "dimension",
                                                            "layout",
                                                            "data",
                                                            "error"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "board",
                                                "widgets"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/boards/{boardId}/widgets": {
            "post": {
                "operationId": "v1.boards.widgets.store",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "subtitle": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "timeseries",
                                            "kpi",
                                            "table",
                                            "histogram",
                                            "percentile",
                                            "funnel"
                                        ]
                                    },
                                    "metric": {
                                        "type": "string",
                                        "maxLength": 32
                                    },
                                    "metrics": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "dimension": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "filters": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "granularity": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "hour",
                                            "day",
                                            "week",
                                            "month",
                                            null
                                        ]
                                    },
                                    "options": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "position_x": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 24
                                    },
                                    "position_y": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    },
                                    "width": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 12
                                    },
                                    "height": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 12
                                    }
                                },
                                "required": [
                                    "title",
                                    "type",
                                    "metric"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Columns with database defaults (granularity, type, position) are not in\nmemory after an insert; refreshing means the presenter reads real\nvalues instead of dereferencing a null cast.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "title": {
                                                    "type": "string"
                                                },
                                                "subtitle": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "metric": {
                                                    "type": "string"
                                                },
                                                "metrics": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "dimension": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "filters": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "granularity": {
                                                    "type": "string"
                                                },
                                                "options": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "layout": {
                                                    "type": "object",
                                                    "properties": {
                                                        "x": {
                                                            "type": "integer"
                                                        },
                                                        "y": {
                                                            "type": "integer"
                                                        },
                                                        "w": {
                                                            "type": "integer"
                                                        },
                                                        "h": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "x",
                                                        "y",
                                                        "w",
                                                        "h"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "title",
                                                "subtitle",
                                                "type",
                                                "metric",
                                                "metrics",
                                                "dimension",
                                                "filters",
                                                "granularity",
                                                "options",
                                                "layout"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/boards/{boardId}/widgets/{widgetId}": {
            "patch": {
                "operationId": "v1.boards.widgets.update",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "widgetId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "title": {
                                                    "type": "string"
                                                },
                                                "subtitle": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "metric": {
                                                    "type": "string"
                                                },
                                                "metrics": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "dimension": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "filters": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "granularity": {
                                                    "type": "string"
                                                },
                                                "options": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "layout": {
                                                    "type": "object",
                                                    "properties": {
                                                        "x": {
                                                            "type": "integer"
                                                        },
                                                        "y": {
                                                            "type": "integer"
                                                        },
                                                        "w": {
                                                            "type": "integer"
                                                        },
                                                        "h": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "x",
                                                        "y",
                                                        "w",
                                                        "h"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "title",
                                                "subtitle",
                                                "type",
                                                "metric",
                                                "metrics",
                                                "dimension",
                                                "filters",
                                                "granularity",
                                                "options",
                                                "layout"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.boards.widgets.destroy",
                "tags": [
                    "Board"
                ],
                "parameters": [
                    {
                        "name": "boardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "widgetId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/calls": {
            "get": {
                "operationId": "v1.calls.index",
                "tags": [
                    "Call"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "direction": {
                                                        "type": "string"
                                                    },
                                                    "transport": {
                                                        "type": "string"
                                                    },
                                                    "from": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "to": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "assistant_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "customer_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "queue_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "operator_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "started_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "connected_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ended_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "duration_seconds": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "billable_seconds": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "ended_reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "cost_total": {
                                                        "type": "string"
                                                    },
                                                    "cost_currency": {
                                                        "type": "string"
                                                    },
                                                    "latency": {
                                                        "type": "object",
                                                        "properties": {
                                                            "stt_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "llm_ttft_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "tts_ttfa_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "e2e_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "stt_ms",
                                                            "llm_ttft_ms",
                                                            "tts_ttfa_ms",
                                                            "e2e_ms"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "status",
                                                    "direction",
                                                    "transport",
                                                    "from",
                                                    "to",
                                                    "assistant_id",
                                                    "customer_id",
                                                    "queue_id",
                                                    "operator_id",
                                                    "provider",
                                                    "started_at",
                                                    "connected_at",
                                                    "ended_at",
                                                    "duration_seconds",
                                                    "billable_seconds",
                                                    "ended_reason",
                                                    "cost_total",
                                                    "cost_currency",
                                                    "latency",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total",
                                                "last_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.calls.store",
                "tags": [
                    "Call"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "to": {
                                        "type": "string",
                                        "maxLength": 128
                                    },
                                    "from": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    },
                                    "assistant_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "assistant_version_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "assistant_overrides": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "squad_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "phone_number_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "sip_trunk_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "customer_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "campaign_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "transport": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "pstn",
                                            "sip",
                                            "web",
                                            "mobile",
                                            null
                                        ]
                                    },
                                    "provider": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "variables": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "idempotency_key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    },
                                    "answering_machine_detection": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ],
                                        "description": "Outbound-only. Omitted, both follow the assistant and the platform\ndefault: AMD is asked of the carrier when the assistant's\nvoicemail plan wants a provider verdict, and the ring timeout\ncomes from telephony.defaults.outbound_ring_timeout."
                                    },
                                    "ring_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 300
                                    }
                                },
                                "required": [
                                    "to"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Access denied",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/calls/search": {
            "get": {
                "operationId": "v1.calls.search",
                "tags": [
                    "Call"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "direction": {
                                                        "type": "string"
                                                    },
                                                    "transport": {
                                                        "type": "string"
                                                    },
                                                    "from": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "to": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "assistant_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "customer_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "queue_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "operator_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "started_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "connected_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ended_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "duration_seconds": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "billable_seconds": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "ended_reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "cost_total": {
                                                        "type": "string"
                                                    },
                                                    "cost_currency": {
                                                        "type": "string"
                                                    },
                                                    "latency": {
                                                        "type": "object",
                                                        "properties": {
                                                            "stt_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "llm_ttft_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "tts_ttfa_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "e2e_ms": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "stt_ms",
                                                            "llm_ttft_ms",
                                                            "tts_ttfa_ms",
                                                            "e2e_ms"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "status",
                                                    "direction",
                                                    "transport",
                                                    "from",
                                                    "to",
                                                    "assistant_id",
                                                    "customer_id",
                                                    "queue_id",
                                                    "operator_id",
                                                    "provider",
                                                    "started_at",
                                                    "connected_at",
                                                    "ended_at",
                                                    "duration_seconds",
                                                    "billable_seconds",
                                                    "ended_reason",
                                                    "cost_total",
                                                    "cost_currency",
                                                    "latency",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total",
                                                "last_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}": {
            "get": {
                "operationId": "v1.calls.show",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.calls.destroy",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/end": {
            "post": {
                "operationId": "v1.calls.end",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {},
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "direction": {
                                                            "type": "string"
                                                        },
                                                        "transport": {
                                                            "type": "string"
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "assistant_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "customer_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "queue_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "operator_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "provider": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "started_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "connected_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "ended_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "duration_seconds": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "billable_seconds": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "ended_reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "cost_total": {
                                                            "type": "string"
                                                        },
                                                        "cost_currency": {
                                                            "type": "string"
                                                        },
                                                        "latency": {
                                                            "type": "object",
                                                            "properties": {
                                                                "stt_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "llm_ttft_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "tts_ttfa_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "e2e_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "stt_ms",
                                                                "llm_ttft_ms",
                                                                "tts_ttfa_ms",
                                                                "e2e_ms"
                                                            ]
                                                        },
                                                        "created_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "status",
                                                        "direction",
                                                        "transport",
                                                        "from",
                                                        "to",
                                                        "assistant_id",
                                                        "customer_id",
                                                        "queue_id",
                                                        "operator_id",
                                                        "provider",
                                                        "started_at",
                                                        "connected_at",
                                                        "ended_at",
                                                        "duration_seconds",
                                                        "billable_seconds",
                                                        "ended_reason",
                                                        "cost_total",
                                                        "cost_currency",
                                                        "latency",
                                                        "created_at"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {},
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "direction": {
                                                            "type": "string"
                                                        },
                                                        "transport": {
                                                            "type": "string"
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "assistant_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "customer_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "queue_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "operator_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "provider": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "started_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "connected_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "ended_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "duration_seconds": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "billable_seconds": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "ended_reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "cost_total": {
                                                            "type": "string"
                                                        },
                                                        "cost_currency": {
                                                            "type": "string"
                                                        },
                                                        "latency": {
                                                            "type": "object",
                                                            "properties": {
                                                                "stt_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "llm_ttft_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "tts_ttfa_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "e2e_ms": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "stt_ms",
                                                                "llm_ttft_ms",
                                                                "tts_ttfa_ms",
                                                                "e2e_ms"
                                                            ]
                                                        },
                                                        "created_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "status",
                                                        "direction",
                                                        "transport",
                                                        "from",
                                                        "to",
                                                        "assistant_id",
                                                        "customer_id",
                                                        "queue_id",
                                                        "operator_id",
                                                        "provider",
                                                        "started_at",
                                                        "connected_at",
                                                        "ended_at",
                                                        "duration_seconds",
                                                        "billable_seconds",
                                                        "ended_reason",
                                                        "cost_total",
                                                        "cost_currency",
                                                        "latency",
                                                        "created_at"
                                                    ]
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Call had already ended."
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/transcript": {
            "get": {
                "operationId": "v1.calls.transcript",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "call_id": {},
                                                "text": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "redacted": {
                                                    "type": "boolean"
                                                },
                                                "purged": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "call_id",
                                                "text",
                                                "redacted",
                                                "purged"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/messages": {
            "get": {
                "operationId": "v1.calls.messages",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "role": {
                                                        "type": "string"
                                                    },
                                                    "sequence": {
                                                        "type": "string"
                                                    },
                                                    "turn_index": {
                                                        "type": "string"
                                                    },
                                                    "offset_ms": {
                                                        "type": "string"
                                                    },
                                                    "duration_ms": {
                                                        "type": "string"
                                                    },
                                                    "content": {
                                                        "type": "string"
                                                    },
                                                    "tool_name": {
                                                        "type": "string"
                                                    },
                                                    "tool_arguments": {
                                                        "type": "string"
                                                    },
                                                    "tool_result": {
                                                        "type": "string"
                                                    },
                                                    "interrupted": {
                                                        "type": "string"
                                                    },
                                                    "is_final": {
                                                        "type": "string"
                                                    },
                                                    "language": {
                                                        "type": "string"
                                                    },
                                                    "confidence": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "role",
                                                    "sequence",
                                                    "turn_index",
                                                    "offset_ms",
                                                    "duration_ms",
                                                    "content",
                                                    "tool_name",
                                                    "tool_arguments",
                                                    "tool_result",
                                                    "interrupted",
                                                    "is_final",
                                                    "language",
                                                    "confidence"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/events": {
            "get": {
                "operationId": "v1.calls.events",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "category": {
                                                        "type": "string"
                                                    },
                                                    "severity": {
                                                        "type": "string"
                                                    },
                                                    "at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "offset_ms": {
                                                        "type": "string"
                                                    },
                                                    "sequence": {
                                                        "type": "string"
                                                    },
                                                    "leg_id": {
                                                        "type": "string"
                                                    },
                                                    "generation_id": {
                                                        "type": "string"
                                                    },
                                                    "payload": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "category",
                                                    "severity",
                                                    "at",
                                                    "offset_ms",
                                                    "sequence",
                                                    "leg_id",
                                                    "generation_id",
                                                    "payload"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/metrics": {
            "get": {
                "operationId": "v1.calls.metrics",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "component": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "turn_index": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "value_ms": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "value": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "unit": {
                                                        "type": "string"
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "offset_ms": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "exceeds_target": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "name",
                                                    "component",
                                                    "turn_index",
                                                    "value_ms",
                                                    "value",
                                                    "unit",
                                                    "provider",
                                                    "model",
                                                    "offset_ms",
                                                    "exceeds_target"
                                                ]
                                            }
                                        },
                                        "summary": {
                                            "type": "object",
                                            "properties": {
                                                "stt_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "llm_ttft_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "tts_ttfa_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "e2e_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "e2e_max_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "turns": {
                                                    "type": "integer"
                                                },
                                                "interruptions": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "stt_ms",
                                                "llm_ttft_ms",
                                                "tts_ttfa_ms",
                                                "e2e_ms",
                                                "e2e_max_ms",
                                                "turns",
                                                "interruptions"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "summary"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/costs": {
            "get": {
                "operationId": "v1.calls.costs",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "component": {
                                                        "type": "string"
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "quantity": {
                                                        "type": "string"
                                                    },
                                                    "unit": {
                                                        "type": "string"
                                                    },
                                                    "unit_cost": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "cost": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "billable": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "component",
                                                    "provider",
                                                    "model",
                                                    "quantity",
                                                    "unit",
                                                    "unit_cost",
                                                    "cost",
                                                    "currency",
                                                    "billable"
                                                ]
                                            }
                                        },
                                        "summary": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "string"
                                                },
                                                "stt": {
                                                    "type": "string"
                                                },
                                                "llm": {
                                                    "type": "string"
                                                },
                                                "tts": {
                                                    "type": "string"
                                                },
                                                "telephony": {
                                                    "type": "string"
                                                },
                                                "other": {
                                                    "type": "string"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "stt",
                                                "llm",
                                                "tts",
                                                "telephony",
                                                "other",
                                                "currency"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "summary"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/artifacts": {
            "get": {
                "operationId": "v1.calls.artifacts",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "mime_type": {
                                                        "type": "string"
                                                    },
                                                    "size_bytes": {
                                                        "type": "string"
                                                    },
                                                    "duration_seconds": {
                                                        "type": "string"
                                                    },
                                                    "checksum_sha256": {
                                                        "type": "string"
                                                    },
                                                    "channels": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "purged_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "status",
                                                    "mime_type",
                                                    "size_bytes",
                                                    "duration_seconds",
                                                    "checksum_sha256",
                                                    "channels",
                                                    "created_at",
                                                    "purged_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/debug": {
            "get": {
                "operationId": "v1.calls.debug",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "exported_at": {
                                            "type": "string"
                                        },
                                        "schema_version": {
                                            "type": "integer",
                                            "const": 1
                                        },
                                        "notice": {
                                            "type": "string",
                                            "const": "Sanitized export. Credentials, tokens and authorization headers are removed."
                                        },
                                        "call": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        },
                                        "assistant_snapshot": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        },
                                        "legs": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "direction": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "status": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "provider": {
                                                        "type": "string"
                                                    },
                                                    "provider_leg_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "from_number": {
                                                        "type": "string"
                                                    },
                                                    "to_number": {
                                                        "type": "string"
                                                    },
                                                    "codec": {
                                                        "type": "string"
                                                    },
                                                    "sample_rate": {
                                                        "type": "string"
                                                    },
                                                    "started_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "answered_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "bridged_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ended_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ended_reason": {
                                                        "type": "string"
                                                    },
                                                    "quality": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "direction",
                                                    "status",
                                                    "provider",
                                                    "provider_leg_id",
                                                    "from_number",
                                                    "to_number",
                                                    "codec",
                                                    "sample_rate",
                                                    "started_at",
                                                    "answered_at",
                                                    "bridged_at",
                                                    "ended_at",
                                                    "ended_reason",
                                                    "quality"
                                                ]
                                            }
                                        },
                                        "messages": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {}
                                            }
                                        },
                                        "events": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {}
                                            }
                                        },
                                        "metrics": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "component": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "turn_index": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "value_ms": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "value": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "unit": {
                                                        "type": "string"
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "offset_ms": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "started_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "first_byte_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "completed_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "error_code": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "error_message": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "name",
                                                    "component",
                                                    "turn_index",
                                                    "value_ms",
                                                    "value",
                                                    "unit",
                                                    "provider",
                                                    "model",
                                                    "offset_ms",
                                                    "started_at",
                                                    "first_byte_at",
                                                    "completed_at",
                                                    "error_code",
                                                    "error_message"
                                                ]
                                            }
                                        },
                                        "costs": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "component": {
                                                        "type": "string"
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "quantity": {
                                                        "type": "string"
                                                    },
                                                    "unit": {
                                                        "type": "string"
                                                    },
                                                    "cost": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "component",
                                                    "provider",
                                                    "model",
                                                    "quantity",
                                                    "unit",
                                                    "cost",
                                                    "currency"
                                                ]
                                            }
                                        },
                                        "tools": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {}
                                            }
                                        },
                                        "mcp": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {}
                                            }
                                        },
                                        "provider_errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "additionalProperties": {}
                                            }
                                        },
                                        "artifacts": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "size_bytes": {
                                                        "type": "string"
                                                    },
                                                    "duration_seconds": {
                                                        "type": "string"
                                                    },
                                                    "checksum_sha256": {
                                                        "type": "string"
                                                    },
                                                    "stored": {
                                                        "type": "boolean",
                                                        "description": "The path is tenant-prefixed and useless without credentials, but\nthere is no reason a bug report needs the bucket layout."
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "status",
                                                    "size_bytes",
                                                    "duration_seconds",
                                                    "checksum_sha256",
                                                    "stored"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "exported_at",
                                        "schema_version",
                                        "notice",
                                        "call",
                                        "assistant_snapshot",
                                        "legs",
                                        "messages",
                                        "events",
                                        "metrics",
                                        "costs",
                                        "tools",
                                        "mcp",
                                        "provider_errors",
                                        "artifacts"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/recording": {
            "get": {
                "operationId": "v1.calls.recording",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "artifact_id": {},
                                                "type": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "duration_seconds": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "channels": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "mime_type": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "artifact_id",
                                                "type",
                                                "url",
                                                "expires_at",
                                                "duration_seconds",
                                                "channels",
                                                "mime_type"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "This call has no recording."
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.calls.recording.destroy",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "deleted"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/calls/{call}/artifacts/{artifact}/download": {
            "get": {
                "operationId": "v1.calls.artifacts.download",
                "summary": "Signed fallback download used when the storage driver cannot sign a URL itself",
                "tags": [
                    "Call"
                ],
                "parameters": [
                    {
                        "name": "call",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "artifact",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/campaigns": {
            "get": {
                "operationId": "v1.campaigns.index",
                "tags": [
                    "Campaign"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "current_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "per_page",
                                                "current_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.campaigns.store",
                "tags": [
                    "Campaign"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "target_type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "assistant",
                                            "squad",
                                            null
                                        ]
                                    },
                                    "assistant_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "squad_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "origination_type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "phone_number",
                                            "trunk",
                                            null
                                        ]
                                    },
                                    "phone_number_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "sip_trunk_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "caller_id_number": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "caller_id_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "window_start_time": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "window_end_time": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "calling_days": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "integer",
                                            "minimum": 1,
                                            "maximum": 7
                                        }
                                    },
                                    "starts_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    },
                                    "ends_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    },
                                    "max_concurrency": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 1000
                                    },
                                    "dispatch_batch_size": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 500
                                    },
                                    "retry_policy": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "voicemail_behavior": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "hangup",
                                            "leave_message",
                                            "retry",
                                            null
                                        ]
                                    },
                                    "voicemail_message": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "detect_voicemail": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "screening_mode": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "none",
                                            "amd",
                                            "human_only",
                                            null
                                        ]
                                    },
                                    "answer_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "max_call_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 10
                                    },
                                    "compliance": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "suppression_list_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "variables": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "webhook_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 1024
                                    },
                                    "webhook_secret": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "webhook_events": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Refreshed so the presenter reads the columns the database defaulted\n(counters, window times) rather than nulls.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/campaigns/preview-contacts": {
            "post": {
                "operationId": "v1.campaigns.preview-contacts",
                "summary": "Live preview for the upload form, before anything is imported",
                "tags": [
                    "Campaign"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "contentMediaType": "application/octet-stream",
                                        "description": "Maximum file size: 204800 kilobytes."
                                    },
                                    "default_country": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/campaigns/{campaignId}": {
            "get": {
                "operationId": "v1.campaigns.show",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.campaigns.update",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "invalid_campaign"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.campaigns.destroy",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/campaigns/{campaignId}/contacts": {
            "get": {
                "operationId": "v1.campaigns.contacts.index",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "phone_number": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "email": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "external_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "country": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "timezone": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "state": {
                                                        "type": "string"
                                                    },
                                                    "state_reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "state_detail": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "attempts": {
                                                        "type": "integer"
                                                    },
                                                    "last_attempt_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "next_attempt_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_outcome": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_call_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "variables": {
                                                        "type": [
                                                            "array",
                                                            "null"
                                                        ],
                                                        "items": {}
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "phone_number",
                                                    "name",
                                                    "email",
                                                    "external_id",
                                                    "country",
                                                    "timezone",
                                                    "state",
                                                    "state_reason",
                                                    "state_detail",
                                                    "attempts",
                                                    "last_attempt_at",
                                                    "next_attempt_at",
                                                    "last_outcome",
                                                    "last_call_id",
                                                    "variables"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "per_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.campaigns.contacts.store",
                "summary": "Inline contacts (§68 manual contacts)",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "contacts": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "phone": {
                                                    "type": "string",
                                                    "maxLength": 64
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 255
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "email",
                                                    "maxLength": 255
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "country": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "minLength": 2,
                                                    "maxLength": 2
                                                },
                                                "external_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 128
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "consent": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "phone"
                                            ]
                                        },
                                        "minItems": 1,
                                        "maxItems": 5000
                                    },
                                    "default_country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 8
                                    },
                                    "default_timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "skip_suppressed": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "contacts"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "batch_id": {
                                                    "type": "string"
                                                },
                                                "read": {
                                                    "type": "integer"
                                                },
                                                "imported": {
                                                    "type": "integer"
                                                },
                                                "duplicates": {
                                                    "type": "integer"
                                                },
                                                "invalid": {
                                                    "type": "integer"
                                                },
                                                "suppressed": {
                                                    "type": "integer"
                                                },
                                                "errors": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "errors_truncated": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "batch_id",
                                                "read",
                                                "imported",
                                                "duplicates",
                                                "invalid",
                                                "suppressed",
                                                "errors",
                                                "errors_truncated"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/campaigns/{campaignId}/contacts/upload": {
            "post": {
                "operationId": "v1.campaigns.contacts.upload",
                "summary": "CSV upload (§68)",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "contentMediaType": "application/octet-stream",
                                        "description": "Maximum file size: 204800 kilobytes."
                                    },
                                    "column_map": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "default_country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 8
                                    },
                                    "default_timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "skip_suppressed": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "delimiter": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 1,
                                        "maxLength": 1
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "batch_id": {
                                                    "type": "string"
                                                },
                                                "read": {
                                                    "type": "integer"
                                                },
                                                "imported": {
                                                    "type": "integer"
                                                },
                                                "duplicates": {
                                                    "type": "integer"
                                                },
                                                "invalid": {
                                                    "type": "integer"
                                                },
                                                "suppressed": {
                                                    "type": "integer"
                                                },
                                                "errors": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "errors_truncated": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "batch_id",
                                                "read",
                                                "imported",
                                                "duplicates",
                                                "invalid",
                                                "suppressed",
                                                "errors",
                                                "errors_truncated"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/campaigns/{campaignId}/contacts/preview": {
            "post": {
                "operationId": "v1.campaigns.contacts.preview",
                "summary": "Live preview for the upload form, before anything is imported",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "contentMediaType": "application/octet-stream",
                                        "description": "Maximum file size: 204800 kilobytes."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/campaigns/{campaignId}/start": {
            "post": {
                "operationId": "v1.campaigns.start",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "invalid_transition"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/campaigns/{campaignId}/pause": {
            "post": {
                "operationId": "v1.campaigns.pause",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string"
                                    },
                                    "endLiveCalls": {
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "invalid_transition"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/campaigns/{campaignId}/resume": {
            "post": {
                "operationId": "v1.campaigns.resume",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "invalid_transition"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/campaigns/{campaignId}/cancel": {
            "post": {
                "operationId": "v1.campaigns.cancel",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string"
                                    },
                                    "endLiveCalls": {
                                        "type": "boolean",
                                        "default": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "target_type": {
                                                    "type": "string"
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "squad_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "origination_type": {
                                                    "type": "string"
                                                },
                                                "phone_number_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sip_trunk_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "caller_id_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start": {
                                                            "type": "string"
                                                        },
                                                        "end": {
                                                            "type": "string"
                                                        },
                                                        "days": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 2
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 3
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 4
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 5
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 6
                                                                        },
                                                                        {
                                                                            "type": "integer",
                                                                            "const": 7
                                                                        }
                                                                    ],
                                                                    "minItems": 7,
                                                                    "maxItems": 7,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "start",
                                                        "end",
                                                        "days"
                                                    ]
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "max_concurrency": {
                                                    "type": "integer"
                                                },
                                                "retry_policy": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "voicemail_behavior": {
                                                    "type": "string"
                                                },
                                                "detect_voicemail": {
                                                    "type": "boolean"
                                                },
                                                "screening_mode": {
                                                    "type": "string"
                                                },
                                                "controls": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Deliberately \"controls\", never \"compliance\": these are settings an\norganization chooses, not a regulatory guarantee (§69, §196).",
                                                    "items": {}
                                                },
                                                "suppression_list_ids": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "variables": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        },
                                                        "completed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "skipped": {
                                                            "type": "integer"
                                                        },
                                                        "attempts": {
                                                            "type": "integer"
                                                        },
                                                        "percent": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "pending",
                                                        "completed",
                                                        "failed",
                                                        "skipped",
                                                        "attempts",
                                                        "percent"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "description",
                                                "status",
                                                "target_type",
                                                "assistant_id",
                                                "squad_id",
                                                "origination_type",
                                                "phone_number_id",
                                                "sip_trunk_id",
                                                "caller_id_number",
                                                "timezone",
                                                "window",
                                                "starts_at",
                                                "ends_at",
                                                "max_concurrency",
                                                "retry_policy",
                                                "voicemail_behavior",
                                                "detect_voicemail",
                                                "screening_mode",
                                                "controls",
                                                "suppression_list_ids",
                                                "variables",
                                                "progress",
                                                "started_at",
                                                "completed_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string",
                                                    "const": "invalid_transition"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/campaigns/{campaignId}/progress": {
            "get": {
                "operationId": "v1.campaigns.progress",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "attempts": {
                                                    "type": "integer"
                                                },
                                                "percent": {
                                                    "type": "number"
                                                },
                                                "states": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "completed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "total",
                                                "attempts",
                                                "percent",
                                                "states",
                                                "started_at",
                                                "completed_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/campaigns/{campaignId}/results": {
            "get": {
                "operationId": "v1.campaigns.results",
                "summary": "§68 result export. Streamed, so a completed 500k-contact campaign does not\nhave to fit in memory or in a response buffer",
                "tags": [
                    "Campaign"
                ],
                "parameters": [
                    {
                        "name": "campaignId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/csv": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Transfer-Encoding": {
                                "required": true,
                                "schema": {
                                    "type": "string",
                                    "enum": [
                                        "chunked"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queues/{queueId}/members": {
            "post": {
                "operationId": "v1.contact-center.queues.members.store",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "queueId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "operator_id": {
                                        "type": "string"
                                    },
                                    "penalty": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 100
                                    },
                                    "priority": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 1000
                                    },
                                    "membership": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "static",
                                            "dynamic",
                                            null
                                        ]
                                    }
                                },
                                "required": [
                                    "operator_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/queues/{queueId}/members/{operatorId}": {
            "delete": {
                "operationId": "v1.contact-center.queues.members.destroy",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "queueId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "operatorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queues/{queueId}/members/{operatorId}/pause": {
            "post": {
                "operationId": "v1.contact-center.queues.members.pause",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "queueId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "operatorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "paused": {
                                        "type": "boolean",
                                        "default": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {},
                                                "is_paused": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "is_paused"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{operatorId}/skills": {
            "post": {
                "operationId": "v1.contact-center.operators.skills.store",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "operatorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "skill_id": {
                                        "type": "string"
                                    },
                                    "proficiency": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 10
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                },
                                "required": [
                                    "skill_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/ring-groups": {
            "get": {
                "operationId": "v1.contact-center.ring-groups.index",
                "tags": [
                    "Catalogue"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.ring-groups.store",
                "tags": [
                    "Catalogue"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "extension": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 24
                                    },
                                    "strategy": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "simultaneous",
                                            "sequential",
                                            "round_robin",
                                            "random",
                                            null
                                        ]
                                    },
                                    "ring_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 300
                                    },
                                    "member_ring_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "confirm_answer": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "skip_busy_members": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/ring-groups/{id}": {
            "patch": {
                "operationId": "v1.contact-center.ring-groups.update",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "extension": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 24
                                    },
                                    "strategy": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "simultaneous",
                                            "sequential",
                                            "round_robin",
                                            "random",
                                            null
                                        ]
                                    },
                                    "ring_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 300
                                    },
                                    "member_ring_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "is_active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.contact-center.ring-groups.destroy",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/ivrs": {
            "get": {
                "operationId": "v1.contact-center.ivrs.index",
                "tags": [
                    "Catalogue"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.ivrs.store",
                "tags": [
                    "Catalogue"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "extension": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 24
                                    },
                                    "language": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/ivrs/{id}": {
            "get": {
                "operationId": "v1.contact-center.ivrs.show",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {},
                                                "name": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "versions": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {},
                                                            "version_number": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "published_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "graph_hash": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "version_number",
                                                            "status",
                                                            "published_at",
                                                            "graph_hash"
                                                        ]
                                                    }
                                                },
                                                "live_graph": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "slug",
                                                "is_active",
                                                "versions",
                                                "live_graph"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/ivrs/{id}/validate": {
            "post": {
                "operationId": "v1.contact-center.ivrs.validate",
                "summary": "Validation errors are data, not exceptions: the builder renders them inline",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "errors": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "errors"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/ivrs/{id}/publish": {
            "post": {
                "operationId": "v1.contact-center.ivrs.publish",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/dispositions": {
            "get": {
                "operationId": "v1.contact-center.dispositions.index",
                "tags": [
                    "Catalogue"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.dispositions.store",
                "tags": [
                    "Catalogue"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "code": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    },
                                    "outcome": {
                                        "type": "string",
                                        "enum": [
                                            "resolved",
                                            "unresolved",
                                            "escalated",
                                            "callback_scheduled",
                                            "sale",
                                            "no_sale",
                                            "wrong_number",
                                            "spam",
                                            "abandoned",
                                            "other"
                                        ]
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "requires_note": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "schedules_callback": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "ends_wrap_up": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "queue_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "position": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    }
                                },
                                "required": [
                                    "name",
                                    "outcome"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/dispositions/{id}": {
            "delete": {
                "operationId": "v1.contact-center.dispositions.destroy",
                "tags": [
                    "Catalogue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/skills": {
            "get": {
                "operationId": "v1.contact-center.skills.index",
                "tags": [
                    "Catalogue"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.skills.store",
                "tags": [
                    "Catalogue"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "category": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "general",
                                            "language",
                                            "product",
                                            "tier",
                                            "certification",
                                            null
                                        ]
                                    },
                                    "language_tag": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16
                                    },
                                    "max_proficiency": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 10
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/client-tokens": {
            "post": {
                "operationId": "v1.client-tokens.store",
                "description": "The Origin header is checked against the key's allowed origins; a request\nfrom an origin the key does not name is refused even with a valid key.",
                "summary": "Exchange a public key for a short-lived client token",
                "tags": [
                    "ClientToken"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "public_key": {
                                        "type": "string",
                                        "maxLength": 128
                                    },
                                    "assistant_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "user_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    },
                                    "session_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "ttl": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 60,
                                        "maximum": 3600
                                    }
                                },
                                "required": [
                                    "public_key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "token": {
                                                    "type": "string"
                                                },
                                                "token_type": {
                                                    "type": "string",
                                                    "const": "Bearer"
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "expires_in": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ]
                                                },
                                                "organization_id": {},
                                                "assistant_id": {},
                                                "session_id": {}
                                            },
                                            "required": [
                                                "token",
                                                "token_type",
                                                "expires_at",
                                                "expires_in",
                                                "organization_id",
                                                "assistant_id",
                                                "session_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "authentication_error"
                                                },
                                                "message": {
                                                    "type": "string"
                                                },
                                                "documentation_url": {
                                                    "type": "string",
                                                    "const": "https://docs.callagent.dev/api/client-auth"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message",
                                                "documentation_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/client-tokens/verify": {
            "post": {
                "operationId": "v1.client-tokens.verify",
                "summary": "Verify a client token. Useful for SDK development and for the gateway",
                "tags": [
                    "ClientToken"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "token": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "token"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "claims": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "claims"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "authentication_error"
                                                },
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                },
                                                "documentation_url": {
                                                    "type": "string",
                                                    "const": "https://docs.callagent.dev/api/client-auth"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "code",
                                                "message",
                                                "documentation_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/billing/credits/purchase": {
            "post": {
                "operationId": "v1.billing.credits.purchase",
                "tags": [
                    "Credit"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "number"
                                    },
                                    "payment_method_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "idempotency_key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    }
                                },
                                "required": [
                                    "amount"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "billing_unavailable"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/billing/auto-reload": {
            "get": {
                "operationId": "v1.billing.auto-reload.show",
                "tags": [
                    "Credit"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "threshold_amount": {
                                                    "type": "string"
                                                },
                                                "reload_amount": {
                                                    "type": "string"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "payment_method_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "monthly_reload_limit": {
                                                    "type": "integer"
                                                },
                                                "monthly_reload_cap_amount": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "cooldown_minutes": {
                                                    "type": "integer"
                                                },
                                                "consecutive_failures": {
                                                    "type": "integer"
                                                },
                                                "disabled_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_succeeded_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_failed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "threshold_amount",
                                                "reload_amount",
                                                "currency",
                                                "payment_method_id",
                                                "monthly_reload_limit",
                                                "monthly_reload_cap_amount",
                                                "cooldown_minutes",
                                                "consecutive_failures",
                                                "disabled_reason",
                                                "last_succeeded_at",
                                                "last_failed_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "v1.billing.auto-reload.update",
                "tags": [
                    "Credit"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean"
                                    },
                                    "threshold_amount": {
                                        "type": "number"
                                    },
                                    "reload_amount": {
                                        "type": "number"
                                    },
                                    "payment_method_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "monthly_reload_limit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 100
                                    },
                                    "monthly_reload_cap_amount": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "threshold_amount": {
                                                    "type": "string"
                                                },
                                                "reload_amount": {
                                                    "type": "string"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "payment_method_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "monthly_reload_limit": {
                                                    "type": "integer"
                                                },
                                                "monthly_reload_cap_amount": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "cooldown_minutes": {
                                                    "type": "integer"
                                                },
                                                "consecutive_failures": {
                                                    "type": "integer"
                                                },
                                                "disabled_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_succeeded_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_failed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "threshold_amount",
                                                "reload_amount",
                                                "currency",
                                                "payment_method_id",
                                                "monthly_reload_limit",
                                                "monthly_reload_cap_amount",
                                                "cooldown_minutes",
                                                "consecutive_failures",
                                                "disabled_reason",
                                                "last_succeeded_at",
                                                "last_failed_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/customers/resolve": {
            "post": {
                "operationId": "v1.customers.resolve",
                "description": "This is what an inbound call uses: give it the caller's number and it\nreturns the same customer every time, creating one on first contact.",
                "summary": "Find or create a customer from an identifier (§126 identity resolution)",
                "tags": [
                    "Customer"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "phone",
                                            "email",
                                            "external_id",
                                            "sip_uri",
                                            "whatsapp",
                                            null
                                        ]
                                    },
                                    "value": {
                                        "type": "string",
                                        "maxLength": 191
                                    },
                                    "source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    },
                                    "attributes": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "value"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "customer"
                                                },
                                                "display_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "first_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "company": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "source": {
                                                    "type": "string",
                                                    "description": "§126: which system owns this record."
                                                },
                                                "external_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "externally_owned": {
                                                    "type": "boolean"
                                                },
                                                "do_not_contact": {
                                                    "type": "boolean"
                                                },
                                                "conversation_count": {
                                                    "type": "integer"
                                                },
                                                "first_seen_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_seen_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "merged_into_customer_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "metadata": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "notes": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "identifiers": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "type": {
                                                                        "type": "string"
                                                                    },
                                                                    "value": {
                                                                        "type": "string"
                                                                    },
                                                                    "raw_value": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "is_primary": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "verified": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "source": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "type",
                                                                    "value",
                                                                    "raw_value",
                                                                    "is_primary",
                                                                    "verified",
                                                                    "source"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "attributes": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "integer"
                                                                    },
                                                                    {
                                                                        "type": "number"
                                                                    },
                                                                    {
                                                                        "type": "boolean"
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "conversations": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "channel": {
                                                                        "type": "string"
                                                                    },
                                                                    "direction": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "call_id": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "assistant_id": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "outcome": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "summary": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "duration_seconds": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "started_at": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "ended_at": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "channel",
                                                                    "direction",
                                                                    "call_id",
                                                                    "assistant_id",
                                                                    "outcome",
                                                                    "summary",
                                                                    "duration_seconds",
                                                                    "started_at",
                                                                    "ended_at"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "display_name",
                                                "name",
                                                "first_name",
                                                "last_name",
                                                "company",
                                                "locale",
                                                "timezone",
                                                "source",
                                                "external_id",
                                                "externally_owned",
                                                "do_not_contact",
                                                "conversation_count",
                                                "first_seen_at",
                                                "last_seen_at",
                                                "merged_into_customer_id",
                                                "metadata",
                                                "notes",
                                                "created_at",
                                                "identifiers",
                                                "attributes",
                                                "conversations"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "operationId": "v1.customers.index",
                "summary": "List customers",
                "tags": [
                    "Customer"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CustomerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/CustomerResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.customers.store",
                "summary": "Create a customer, optionally with identifiers",
                "tags": [
                    "Customer"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "first_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "last_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "company": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    },
                                    "external_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "notes": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "do_not_contact": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "identifiers": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "enum": [
                                                        "phone",
                                                        "email",
                                                        "external_id",
                                                        "sip_uri",
                                                        "whatsapp",
                                                        null
                                                    ]
                                                },
                                                "value": {
                                                    "type": "string",
                                                    "maxLength": 191
                                                },
                                                "is_primary": {
                                                    "type": [
                                                        "boolean",
                                                        "null"
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "customer"
                                                },
                                                "display_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "first_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "company": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "source": {
                                                    "type": "string",
                                                    "description": "§126: which system owns this record."
                                                },
                                                "external_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "externally_owned": {
                                                    "type": "boolean"
                                                },
                                                "do_not_contact": {
                                                    "type": "boolean"
                                                },
                                                "conversation_count": {
                                                    "type": "integer"
                                                },
                                                "first_seen_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_seen_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "merged_into_customer_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "metadata": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "notes": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "identifiers": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "type": {
                                                                        "type": "string"
                                                                    },
                                                                    "value": {
                                                                        "type": "string"
                                                                    },
                                                                    "raw_value": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "is_primary": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "verified": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "source": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "type",
                                                                    "value",
                                                                    "raw_value",
                                                                    "is_primary",
                                                                    "verified",
                                                                    "source"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "attributes": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "integer"
                                                                    },
                                                                    {
                                                                        "type": "number"
                                                                    },
                                                                    {
                                                                        "type": "boolean"
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "conversations": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "channel": {
                                                                        "type": "string"
                                                                    },
                                                                    "direction": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "call_id": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "assistant_id": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "outcome": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "summary": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "duration_seconds": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "started_at": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "ended_at": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "channel",
                                                                    "direction",
                                                                    "call_id",
                                                                    "assistant_id",
                                                                    "outcome",
                                                                    "summary",
                                                                    "duration_seconds",
                                                                    "started_at",
                                                                    "ended_at"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "display_name",
                                                "name",
                                                "first_name",
                                                "last_name",
                                                "company",
                                                "locale",
                                                "timezone",
                                                "source",
                                                "external_id",
                                                "externally_owned",
                                                "do_not_contact",
                                                "conversation_count",
                                                "first_seen_at",
                                                "last_seen_at",
                                                "merged_into_customer_id",
                                                "metadata",
                                                "notes",
                                                "created_at",
                                                "identifiers",
                                                "attributes",
                                                "conversations"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/customers/{customer}": {
            "get": {
                "operationId": "v1.customers.show",
                "summary": "Retrieve one customer with identifiers, attributes and conversation history",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/CustomerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "identifiers",
                                                        "attributes",
                                                        "conversations"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.customers.update",
                "summary": "Update a customer profile",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "first_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "last_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "company": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "notes": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "do_not_contact": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/CustomerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "identifiers"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.customers.destroy",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/customers/{customer}/identifiers": {
            "post": {
                "operationId": "v1.customers.identifiers.store",
                "summary": "Attach a phone, email or external id to an existing customer",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "phone",
                                            "email",
                                            "external_id",
                                            "sip_uri",
                                            "whatsapp"
                                        ]
                                    },
                                    "value": {
                                        "type": "string",
                                        "maxLength": 191
                                    },
                                    "source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    },
                                    "is_primary": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "type",
                                    "value"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "customer"
                                                },
                                                "display_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "first_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "company": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "source": {
                                                    "type": "string",
                                                    "description": "§126: which system owns this record."
                                                },
                                                "external_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "externally_owned": {
                                                    "type": "boolean"
                                                },
                                                "do_not_contact": {
                                                    "type": "boolean"
                                                },
                                                "conversation_count": {
                                                    "type": "integer"
                                                },
                                                "first_seen_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_seen_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "merged_into_customer_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "metadata": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "notes": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "identifiers": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "type": {
                                                                        "type": "string"
                                                                    },
                                                                    "value": {
                                                                        "type": "string"
                                                                    },
                                                                    "raw_value": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "is_primary": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "verified": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "source": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "type",
                                                                    "value",
                                                                    "raw_value",
                                                                    "is_primary",
                                                                    "verified",
                                                                    "source"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "attributes": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "type": "integer"
                                                                    },
                                                                    {
                                                                        "type": "number"
                                                                    },
                                                                    {
                                                                        "type": "boolean"
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                },
                                                "conversations": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "string"
                                                                    },
                                                                    "channel": {
                                                                        "type": "string"
                                                                    },
                                                                    "direction": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "call_id": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "assistant_id": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "outcome": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "summary": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "duration_seconds": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "started_at": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "ended_at": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "channel",
                                                                    "direction",
                                                                    "call_id",
                                                                    "assistant_id",
                                                                    "outcome",
                                                                    "summary",
                                                                    "duration_seconds",
                                                                    "started_at",
                                                                    "ended_at"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "display_name",
                                                "name",
                                                "first_name",
                                                "last_name",
                                                "company",
                                                "locale",
                                                "timezone",
                                                "source",
                                                "external_id",
                                                "externally_owned",
                                                "do_not_contact",
                                                "conversation_count",
                                                "first_seen_at",
                                                "last_seen_at",
                                                "merged_into_customer_id",
                                                "metadata",
                                                "notes",
                                                "created_at",
                                                "identifiers",
                                                "attributes",
                                                "conversations"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/customers/{customer}/attributes": {
            "post": {
                "operationId": "v1.customers.attributes.store",
                "summary": "Set customer attributes; feeds `{{customer.*}}` in the variable engine",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "attributes": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 1
                                    },
                                    "source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    },
                                    "call_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "attributes"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/CustomerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "identifiers",
                                                        "attributes"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/customers/{customer}/duplicates": {
            "get": {
                "operationId": "v1.customers.duplicates",
                "summary": "Candidate duplicates: other customers sharing a normalised identifier",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CustomerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/CustomerResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "identifiers"
                                                        ]
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/customers/{customer}/merge": {
            "post": {
                "operationId": "v1.customers.merge",
                "description": "The loser is kept with `merged_into_customer_id` set, so every historical\nreference to it still resolves here.",
                "summary": "Merge a duplicate into this customer",
                "tags": [
                    "Customer"
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "path",
                        "required": true,
                        "description": "The customer ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "customer_id": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "customer_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`CustomerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/CustomerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "identifiers",
                                                        "attributes",
                                                        "conversations"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/contact-center/extensions": {
            "get": {
                "operationId": "v1.contact-center.extensions.index",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.extensions.store",
                "summary": "Provisioning returns the SIP secret exactly once — this response is the\nonly time it is ever readable. It is not logged and not audited",
                "tags": [
                    "Extension"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "extension": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 24
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "user",
                                            "operator",
                                            "virtual",
                                            "queue",
                                            "ivr",
                                            "ring_group",
                                            "conference",
                                            "voicemail",
                                            "parking",
                                            null
                                        ]
                                    },
                                    "user_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "voicemail_box_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "outbound_caller_id_number": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "outbound_caller_id_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "ring_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "with_web_phone": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/extensions/{id}": {
            "get": {
                "operationId": "v1.contact-center.extensions.show",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.contact-center.extensions.update",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "user_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "voicemail_box_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "voicemail_enabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "outbound_caller_id_number": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "outbound_caller_id_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "ring_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "do_not_disturb": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "call_waiting": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "forward_always_enabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "forward_always_destination": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    },
                                    "is_active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.contact-center.extensions.destroy",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/extensions/{id}/devices": {
            "post": {
                "operationId": "v1.contact-center.extensions.devices.store",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "device_type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "webrtc",
                                            "softphone",
                                            "desk_phone",
                                            "mobile",
                                            "ata",
                                            null
                                        ]
                                    },
                                    "mac_address": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "vendor": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    },
                                    "model": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 48
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/extensions/{id}/devices/{deviceId}/rotate": {
            "post": {
                "operationId": "v1.contact-center.extensions.devices.rotate",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "deviceId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/extensions/{id}/devices/{deviceId}": {
            "delete": {
                "operationId": "v1.contact-center.extensions.devices.destroy",
                "tags": [
                    "Extension"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "deviceId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/integrations": {
            "get": {
                "operationId": "v1.integrations.index",
                "summary": "The connect gallery: connectable integrations by category, with this org's connections",
                "tags": [
                    "Integration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "array",
                                                "items": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                }
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/integrations/tools": {
            "get": {
                "operationId": "v1.integrations.tools",
                "summary": "Connector actions available to assistants as tools (§32)",
                "tags": [
                    "Integration"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "input_schema": {
                                                        "type": "string"
                                                    },
                                                    "connection_id": {
                                                        "type": "string"
                                                    },
                                                    "action": {
                                                        "type": "string"
                                                    },
                                                    "mutating": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "name",
                                                    "description",
                                                    "input_schema",
                                                    "connection_id",
                                                    "action",
                                                    "mutating"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/integrations/connections": {
            "post": {
                "operationId": "v1.integrations.connections.store",
                "description": "API-key connectors take their credentials in `secrets`, which are encrypted\nimmediately and never returned. OAuth connectors take an\n`oauth_connection_id` from a completed authorization.",
                "summary": "Connect an integration",
                "tags": [
                    "Integration"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "integration": {
                                        "type": "string",
                                        "maxLength": 64
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "secrets": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "config": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "oauth_connection_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "integration",
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "integration_connection"
                                                },
                                                "integration": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "active": {
                                                    "type": "boolean"
                                                },
                                                "config": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "description": "Config is non-secret by construction; secrets live in the credential row.",
                                                    "items": {}
                                                },
                                                "granted_capabilities": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "auth": {
                                                    "type": "string",
                                                    "enum": [
                                                        "oauth2",
                                                        "api_key",
                                                        "none"
                                                    ]
                                                },
                                                "connected_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_tested_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_test_status": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_synced_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_error": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "integration",
                                                "name",
                                                "status",
                                                "active",
                                                "config",
                                                "granted_capabilities",
                                                "auth",
                                                "connected_at",
                                                "last_tested_at",
                                                "last_test_status",
                                                "last_synced_at",
                                                "last_error",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "get": {
                "operationId": "v1.integrations.connections.index",
                "summary": "List this organization's integration connections",
                "tags": [
                    "Integration"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `IntegrationConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/IntegrationConnectionResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/integrations/connections/{connection}": {
            "get": {
                "operationId": "v1.integrations.connections.show",
                "tags": [
                    "Integration"
                ],
                "parameters": [
                    {
                        "name": "connection",
                        "in": "path",
                        "required": true,
                        "description": "The connection ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`IntegrationConnectionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/IntegrationConnectionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.integrations.connections.destroy",
                "summary": "§118 \"disconnect\": revokes the grant and deletes the stored credential",
                "tags": [
                    "Integration"
                ],
                "parameters": [
                    {
                        "name": "connection",
                        "in": "path",
                        "required": true,
                        "description": "The connection ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/integrations/connections/{connection}/test": {
            "post": {
                "operationId": "v1.integrations.connections.test",
                "summary": "§118 \"test\": a cheap read-only call proving the credential works",
                "tags": [
                    "Integration"
                ],
                "parameters": [
                    {
                        "name": "connection",
                        "in": "path",
                        "required": true,
                        "description": "The connection ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/integrations/connections/{connection}/sync": {
            "post": {
                "operationId": "v1.integrations.connections.sync",
                "tags": [
                    "Integration"
                ],
                "parameters": [
                    {
                        "name": "connection",
                        "in": "path",
                        "required": true,
                        "description": "The connection ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/integrations/connections/{connection}/actions/{action}": {
            "post": {
                "operationId": "v1.integrations.connections.execute",
                "summary": "Run one of the connector's declared actions",
                "tags": [
                    "Integration"
                ],
                "parameters": [
                    {
                        "name": "connection",
                        "in": "path",
                        "required": true,
                        "description": "The connection ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "action",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "input": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/integrations/{slug}": {
            "get": {
                "operationId": "v1.integrations.show",
                "summary": "One catalogue entry, including its declared action schemas",
                "tags": [
                    "Integration"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "category": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "auth_type": {
                                                    "type": "string"
                                                },
                                                "auth_fields": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "default_scopes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "capabilities": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "documentation_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "slug",
                                                "name",
                                                "category",
                                                "description",
                                                "auth_type",
                                                "auth_fields",
                                                "default_scopes",
                                                "capabilities",
                                                "documentation_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "No connectable integration with that slug."
                                                },
                                                "documentation_url": {
                                                    "type": "string",
                                                    "const": "https://docs.callagent.dev/integrations"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message",
                                                "documentation_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/invoices": {
            "get": {
                "operationId": "v1.billing.invoices.index",
                "tags": [
                    "Invoice"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "number": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "period_start": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "period_end": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "issue_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "due_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "subtotal": {
                                                        "type": "string"
                                                    },
                                                    "tax_total": {
                                                        "type": "string"
                                                    },
                                                    "credit_total": {
                                                        "type": "string"
                                                    },
                                                    "total": {
                                                        "type": "string"
                                                    },
                                                    "amount_paid": {
                                                        "type": "string"
                                                    },
                                                    "amount_due": {
                                                        "type": "string"
                                                    },
                                                    "overdue": {
                                                        "type": "boolean"
                                                    },
                                                    "hosted_invoice_url": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "number",
                                                    "status",
                                                    "type",
                                                    "currency",
                                                    "period_start",
                                                    "period_end",
                                                    "issue_date",
                                                    "due_date",
                                                    "subtotal",
                                                    "tax_total",
                                                    "credit_total",
                                                    "total",
                                                    "amount_paid",
                                                    "amount_due",
                                                    "overdue",
                                                    "hosted_invoice_url"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total",
                                                "last_page"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/invoices/{invoice}": {
            "get": {
                "operationId": "v1.billing.invoices.show",
                "tags": [
                    "Invoice"
                ],
                "parameters": [
                    {
                        "name": "invoice",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {},
                                                "number": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "period_start": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "period_end": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "issue_date": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "due_date": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "subtotal": {
                                                    "type": "string"
                                                },
                                                "tax_total": {
                                                    "type": "string"
                                                },
                                                "credit_total": {
                                                    "type": "string"
                                                },
                                                "total": {
                                                    "type": "string"
                                                },
                                                "amount_paid": {
                                                    "type": "string"
                                                },
                                                "amount_due": {
                                                    "type": "string"
                                                },
                                                "overdue": {
                                                    "type": "boolean"
                                                },
                                                "hosted_invoice_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "lines": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "line_number": {
                                                                "type": "integer"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "description": {
                                                                "type": "string"
                                                            },
                                                            "component": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "quantity": {
                                                                "type": "string"
                                                            },
                                                            "unit": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "unit_amount": {
                                                                "type": "string"
                                                            },
                                                            "amount": {
                                                                "type": "string"
                                                            },
                                                            "currency": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "line_number",
                                                            "kind",
                                                            "description",
                                                            "component",
                                                            "quantity",
                                                            "unit",
                                                            "unit_amount",
                                                            "amount",
                                                            "currency"
                                                        ]
                                                    }
                                                },
                                                "usage_appendix": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "bill_to": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "tax": {
                                                    "type": "object",
                                                    "properties": {
                                                        "rate": {
                                                            "type": "string"
                                                        },
                                                        "total": {
                                                            "type": "string"
                                                        },
                                                        "type": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "jurisdiction": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "reverse_charge": {
                                                            "type": "boolean"
                                                        },
                                                        "exempt": {
                                                            "type": "boolean"
                                                        },
                                                        "note": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "rate",
                                                        "total",
                                                        "type",
                                                        "jurisdiction",
                                                        "reverse_charge",
                                                        "exempt",
                                                        "note"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "number",
                                                "status",
                                                "type",
                                                "currency",
                                                "period_start",
                                                "period_end",
                                                "issue_date",
                                                "due_date",
                                                "subtotal",
                                                "tax_total",
                                                "credit_total",
                                                "total",
                                                "amount_paid",
                                                "amount_due",
                                                "overdue",
                                                "hosted_invoice_url",
                                                "lines",
                                                "usage_appendix",
                                                "bill_to",
                                                "tax"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/invoices/{invoice}/download": {
            "get": {
                "operationId": "v1.billing.invoices.download",
                "summary": "The printable document. `Save as PDF` from the browser produces the PDF",
                "tags": [
                    "Invoice"
                ],
                "parameters": [
                    {
                        "name": "invoice",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "text/html; charset=utf-8": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        },
                        "headers": {
                            "Content-Disposition": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/knowledge-bases": {
            "get": {
                "operationId": "v1.knowledge-bases.index",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `KnowledgeBaseResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/KnowledgeBaseResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.knowledge-bases.store",
                "tags": [
                    "KnowledgeBase"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreKnowledgeBaseRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`KnowledgeBaseResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/KnowledgeBaseResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/knowledge-bases/{knowledgeBase}": {
            "get": {
                "operationId": "v1.knowledge-bases.show",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`KnowledgeBaseResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/KnowledgeBaseResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.knowledge-bases.update",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateKnowledgeBaseRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`KnowledgeBaseResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/KnowledgeBaseResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.knowledge-bases.destroy",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/knowledge-bases/{knowledgeBase}/query": {
            "post": {
                "operationId": "v1.knowledge-bases.query",
                "summary": "§42. Runs a real hybrid query — this is the retrieval playground's engine",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/KnowledgeQueryRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "query": {
                                                    "type": "string"
                                                },
                                                "untrusted": {
                                                    "type": "boolean"
                                                },
                                                "top_score": {
                                                    "type": "number"
                                                },
                                                "truncated": {
                                                    "type": "boolean"
                                                },
                                                "passages": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "query",
                                                "untrusted",
                                                "top_score",
                                                "truncated",
                                                "passages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/knowledge-bases/{knowledgeBase}/documents": {
            "get": {
                "operationId": "v1.knowledge-bases.documents.index",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `KnowledgeDocumentResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/KnowledgeDocumentResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "post": {
                "operationId": "v1.knowledge-bases.documents.store",
                "summary": "Upload → queued ingestion (§41). The response is 202 because the document\nis accepted, not ingested: extraction and embedding happen on the queue",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreKnowledgeDocumentRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "`KnowledgeDocumentResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/KnowledgeDocumentResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/knowledge-bases/{knowledgeBase}/documents/{document}": {
            "get": {
                "operationId": "v1.knowledge-bases.documents.show",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`KnowledgeDocumentResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/KnowledgeDocumentResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.knowledge-bases.documents.destroy",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/knowledge-bases/{knowledgeBase}/documents/{document}/retry": {
            "post": {
                "operationId": "v1.knowledge-bases.documents.retry",
                "tags": [
                    "KnowledgeBase"
                ],
                "parameters": [
                    {
                        "name": "knowledgeBase",
                        "in": "path",
                        "required": true,
                        "description": "The knowledge base ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "`KnowledgeDocumentResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/KnowledgeDocumentResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/mcp-servers": {
            "get": {
                "operationId": "v1.mcp-servers.index",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "active_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `McpServerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/McpServerResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.mcp-servers.store",
                "tags": [
                    "McpServer"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreMcpServerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`McpServerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/McpServerResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/mcp-servers/{mcpServer}": {
            "get": {
                "operationId": "v1.mcp-servers.show",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`McpServerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/McpServerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "tools"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.mcp-servers.update",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateMcpServerRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`McpServerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/McpServerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "tools"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.mcp-servers.destroy",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/mcp-servers/{mcpServer}/test": {
            "post": {
                "operationId": "v1.mcp-servers.test",
                "summary": "Handshake only; nothing is persisted beyond the health status",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/mcp-servers/{mcpServer}/discover": {
            "post": {
                "operationId": "v1.mcp-servers.discover",
                "summary": "§35 dynamic discovery: initialize + tools/list, cached with invalidation",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "force": {
                                        "type": "boolean",
                                        "default": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/mcp-servers/{mcpServer}/tools": {
            "get": {
                "operationId": "v1.mcp-servers.tools",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `McpCachedToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/McpCachedToolResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/mcp-servers/{mcpServer}/tools/{toolName}/enabled": {
            "post": {
                "operationId": "v1.mcp-servers.tools.enabled",
                "summary": "§37: flips one tool's allow/deny state and re-projects the tool rows",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "toolName",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`McpCachedToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/McpCachedToolResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/mcp-servers/{mcpServer}/tools/{toolName}/risk": {
            "post": {
                "operationId": "v1.mcp-servers.tools.risk",
                "tags": [
                    "McpServer"
                ],
                "parameters": [
                    {
                        "name": "mcpServer",
                        "in": "path",
                        "required": true,
                        "description": "The mcp server ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "toolName",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "risk_level": {
                                        "$ref": "#/components/schemas/McpRiskLevel"
                                    }
                                },
                                "required": [
                                    "risk_level"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`McpServerResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/McpServerResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "tools"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/scorecards": {
            "get": {
                "operationId": "v1.scorecards.index",
                "tags": [
                    "Observe"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "key": {
                                                        "type": "string"
                                                    },
                                                    "target": {
                                                        "type": "string"
                                                    },
                                                    "enabled": {
                                                        "type": "boolean"
                                                    },
                                                    "pass_threshold": {
                                                        "type": "number"
                                                    },
                                                    "applies_to_all": {
                                                        "type": "boolean"
                                                    },
                                                    "assistant_ids": {
                                                        "type": [
                                                            "array",
                                                            "null"
                                                        ],
                                                        "items": {}
                                                    },
                                                    "metrics": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string"
                                                                },
                                                                "key": {
                                                                    "type": "string"
                                                                },
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "type": {
                                                                    "type": "string"
                                                                },
                                                                "comparator": {
                                                                    "type": "string"
                                                                },
                                                                "expected": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "array",
                                                                            "items": {}
                                                                        },
                                                                        {
                                                                            "type": "null"
                                                                        },
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ]
                                                                },
                                                                "weight": {
                                                                    "type": "number"
                                                                },
                                                                "points": {
                                                                    "type": "number"
                                                                },
                                                                "is_critical": {
                                                                    "type": "boolean"
                                                                },
                                                                "source_path": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "key",
                                                                "name",
                                                                "type",
                                                                "comparator",
                                                                "expected",
                                                                "weight",
                                                                "points",
                                                                "is_critical",
                                                                "source_path"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "key",
                                                    "target",
                                                    "enabled",
                                                    "pass_threshold",
                                                    "applies_to_all",
                                                    "assistant_ids",
                                                    "metrics"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.scorecards.store",
                "tags": [
                    "Observe"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 96
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "target": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "call",
                                            "chat",
                                            "both",
                                            null
                                        ]
                                    },
                                    "pass_threshold": {
                                        "type": [
                                            "number",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 100
                                    },
                                    "applies_to_all": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "assistant_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "squad_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "queue_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "operator_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "campaign_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "structured_output_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "metrics": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string",
                                                    "maxLength": 255
                                                },
                                                "key": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 96
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "enum": [
                                                        "boolean",
                                                        "number",
                                                        "integer"
                                                    ]
                                                },
                                                "comparator": {
                                                    "type": "string",
                                                    "maxLength": 24
                                                },
                                                "source_path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 255
                                                },
                                                "expected_value": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expected_min": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "expected_max": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "weight": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ],
                                                    "minimum": 0
                                                },
                                                "points": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ],
                                                    "minimum": 0
                                                },
                                                "is_critical": {
                                                    "type": [
                                                        "boolean",
                                                        "null"
                                                    ]
                                                },
                                                "on_missing": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "enum": [
                                                        "fail",
                                                        "pass",
                                                        "skip",
                                                        null
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "type",
                                                "comparator"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/scorecards/{scorecardId}": {
            "delete": {
                "operationId": "v1.scorecards.destroy",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "scorecardId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/eval-suites": {
            "get": {
                "operationId": "v1.eval-suites.index",
                "tags": [
                    "Observe"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "key": {
                                                        "type": "string"
                                                    },
                                                    "assistant_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "cases": {
                                                        "type": "string"
                                                    },
                                                    "enabled": {
                                                        "type": "boolean"
                                                    },
                                                    "last_run_status": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_run_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "key",
                                                    "assistant_id",
                                                    "cases",
                                                    "enabled",
                                                    "last_run_status",
                                                    "last_run_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/eval-suites/{evalSuiteId}/run": {
            "post": {
                "operationId": "v1.eval-suites.run",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "evalSuiteId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "suite_id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "passed": {
                                                    "type": [
                                                        "boolean",
                                                        "null"
                                                    ]
                                                },
                                                "score": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "cases": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "passed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "errored": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "passed",
                                                        "failed",
                                                        "errored"
                                                    ]
                                                },
                                                "assistant_version_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Reproducibility, surfaced: a result without its configuration is\nnot comparable with another result."
                                                },
                                                "config_hash": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "duration_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "finished_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "suite_id",
                                                "status",
                                                "passed",
                                                "score",
                                                "cases",
                                                "assistant_version_id",
                                                "config_hash",
                                                "seed",
                                                "duration_ms",
                                                "started_at",
                                                "finished_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/eval-runs/{evalRunId}": {
            "get": {
                "operationId": "v1.eval-runs.show",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "evalRunId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/simulation-suites": {
            "get": {
                "operationId": "v1.simulation-suites.index",
                "tags": [
                    "Observe"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "key": {
                                                        "type": "string"
                                                    },
                                                    "mode": {
                                                        "type": "string"
                                                    },
                                                    "transport": {
                                                        "type": "string"
                                                    },
                                                    "scenarios": {
                                                        "type": "string"
                                                    },
                                                    "enabled": {
                                                        "type": "boolean"
                                                    },
                                                    "last_run_status": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_run_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "key",
                                                    "mode",
                                                    "transport",
                                                    "scenarios",
                                                    "enabled",
                                                    "last_run_status",
                                                    "last_run_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/simulation-suites/{simulationSuiteId}/run": {
            "post": {
                "operationId": "v1.simulation-suites.run",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "simulationSuiteId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "suite_id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "transport": {
                                                    "type": "string",
                                                    "description": "Always reported: a green run that never dialled is not the same\nthing as a green run that did (§73)."
                                                },
                                                "transport_note": {
                                                    "type": "string",
                                                    "enum": [
                                                        "The tester talked to the assistant configuration directly. No call was placed and no telephony provider was involved.",
                                                        "A real call was placed through the configured telephony provider."
                                                    ]
                                                },
                                                "passed": {
                                                    "type": [
                                                        "boolean",
                                                        "null"
                                                    ]
                                                },
                                                "score": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "passed": {
                                                            "type": "integer"
                                                        },
                                                        "failed": {
                                                            "type": "integer"
                                                        },
                                                        "errored": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "passed",
                                                        "failed",
                                                        "errored"
                                                    ]
                                                },
                                                "config_hash": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "duration_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "finished_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "suite_id",
                                                "status",
                                                "mode",
                                                "transport",
                                                "transport_note",
                                                "passed",
                                                "score",
                                                "items",
                                                "config_hash",
                                                "duration_ms",
                                                "started_at",
                                                "finished_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/simulation-runs/{simulationRunId}": {
            "get": {
                "operationId": "v1.simulation-runs.show",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "simulationRunId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/monitors": {
            "get": {
                "operationId": "v1.monitors.index",
                "tags": [
                    "Observe"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "category": {
                                                        "type": "string"
                                                    },
                                                    "trigger_type": {
                                                        "type": "string"
                                                    },
                                                    "comparator": {
                                                        "type": "string"
                                                    },
                                                    "threshold": {
                                                        "type": "number"
                                                    },
                                                    "window_minutes": {
                                                        "type": "integer"
                                                    },
                                                    "min_sample": {
                                                        "type": "integer"
                                                    },
                                                    "severity": {
                                                        "type": "string"
                                                    },
                                                    "enabled": {
                                                        "type": "boolean"
                                                    },
                                                    "state": {
                                                        "type": "string"
                                                    },
                                                    "last_value": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_evaluated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "category",
                                                    "trigger_type",
                                                    "comparator",
                                                    "threshold",
                                                    "window_minutes",
                                                    "min_sample",
                                                    "severity",
                                                    "enabled",
                                                    "state",
                                                    "last_value",
                                                    "last_evaluated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.monitors.store",
                "tags": [
                    "Observe"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "category": {
                                        "type": "string",
                                        "enum": [
                                            "technical",
                                            "infrastructure",
                                            "effectiveness",
                                            "compliance"
                                        ]
                                    },
                                    "trigger_type": {
                                        "type": "string",
                                        "maxLength": 32
                                    },
                                    "comparator": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "gt",
                                            "gte",
                                            "lt",
                                            "lte",
                                            null
                                        ]
                                    },
                                    "threshold": {
                                        "type": "number"
                                    },
                                    "window_minutes": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 10080
                                    },
                                    "min_sample": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1
                                    },
                                    "evaluation_interval_minutes": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1
                                    },
                                    "severity": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "info",
                                            "warning",
                                            "critical",
                                            null
                                        ]
                                    },
                                    "filters": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "notifier_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "cooldown_minutes": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    },
                                    "auto_resolve_after_minutes": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1
                                    },
                                    "enabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name",
                                    "category",
                                    "trigger_type",
                                    "threshold"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/monitors/{monitorId}/evaluate": {
            "post": {
                "operationId": "v1.monitors.evaluate",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "monitorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "breached": {
                                                            "type": "boolean"
                                                        },
                                                        "value": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "string"
                                                        },
                                                        "issue_id": {
                                                            "type": "string"
                                                        },
                                                        "skipped": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "breached",
                                                        "value",
                                                        "sample",
                                                        "issue_id",
                                                        "skipped"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "breached": {
                                                            "type": "boolean"
                                                        },
                                                        "value": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "string"
                                                        },
                                                        "issue_id": {
                                                            "type": "null"
                                                        },
                                                        "skipped": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "breached",
                                                        "value",
                                                        "sample",
                                                        "issue_id",
                                                        "skipped"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "breached": {
                                                            "type": "boolean"
                                                        },
                                                        "value": {
                                                            "type": "string"
                                                        },
                                                        "sample": {
                                                            "type": "string"
                                                        },
                                                        "issue_id": {
                                                            "type": "null"
                                                        },
                                                        "skipped": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "breached",
                                                        "value",
                                                        "sample",
                                                        "issue_id",
                                                        "skipped"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/monitors/{monitorId}": {
            "delete": {
                "operationId": "v1.monitors.destroy",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "monitorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/issues": {
            "get": {
                "operationId": "v1.issues.index",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "category": {
                                                        "type": "string"
                                                    },
                                                    "severity": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "occurrences": {
                                                        "type": "integer"
                                                    },
                                                    "last_value": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "threshold": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "context": {
                                                        "type": [
                                                            "array",
                                                            "null"
                                                        ],
                                                        "items": {}
                                                    },
                                                    "recommendation": {
                                                        "type": [
                                                            "array",
                                                            "null"
                                                        ],
                                                        "description": "Null until a diagnosis has genuinely run (§192).",
                                                        "items": {}
                                                    },
                                                    "recommendation_status": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "first_seen_at": {
                                                        "type": "string"
                                                    },
                                                    "last_seen_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "title",
                                                    "description",
                                                    "category",
                                                    "severity",
                                                    "status",
                                                    "occurrences",
                                                    "last_value",
                                                    "threshold",
                                                    "context",
                                                    "recommendation",
                                                    "recommendation_status",
                                                    "first_seen_at",
                                                    "last_seen_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/issues/{issueId}/acknowledge": {
            "post": {
                "operationId": "v1.issues.acknowledge",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "issueId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/issues/{issueId}/resolve": {
            "post": {
                "operationId": "v1.issues.resolve",
                "tags": [
                    "Observe"
                ],
                "parameters": [
                    {
                        "name": "issueId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "note": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators": {
            "get": {
                "operationId": "v1.contact-center.operators.index",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "state",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "online",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.operators.store",
                "tags": [
                    "Operator"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_id": {
                                        "type": "string"
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "operator_number": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 24
                                    },
                                    "extension_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "supervisor_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "priority": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 1000
                                    },
                                    "max_concurrent_calls": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 10
                                    },
                                    "wrap_up_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 900
                                    },
                                    "no_answer_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "auto_pause_after_missed": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 20
                                    },
                                    "auto_answer": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "can_receive_inbound": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "can_place_outbound": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "is_supervisor": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "language": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16
                                    },
                                    "languages": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "is_active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "user_id",
                                    "display_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/operators/{id}": {
            "get": {
                "operationId": "v1.contact-center.operators.show",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.contact-center.operators.update",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "extension_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "supervisor_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "priority": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 1000
                                    },
                                    "max_concurrent_calls": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 10
                                    },
                                    "wrap_up_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 900
                                    },
                                    "no_answer_timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 120
                                    },
                                    "auto_pause_after_missed": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 20
                                    },
                                    "auto_answer": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "can_receive_inbound": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "can_place_outbound": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "is_supervisor": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "language": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 16
                                    },
                                    "languages": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "timezone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "is_active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.contact-center.operators.destroy",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/login": {
            "post": {
                "operationId": "v1.contact-center.operators.login",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "session_id": {},
                                                "operator": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                }
                                            },
                                            "required": [
                                                "session_id",
                                                "operator"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/logout": {
            "post": {
                "operationId": "v1.contact-center.operators.logout",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/state": {
            "post": {
                "operationId": "v1.contact-center.operators.state",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "state": {
                                        "type": "string",
                                        "enum": [
                                            "offline",
                                            "available",
                                            "busy",
                                            "ringing",
                                            "on_call",
                                            "wrap_up",
                                            "break",
                                            "training",
                                            "meeting",
                                            "custom_pause"
                                        ]
                                    },
                                    "reason_code": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "reason_note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "state"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "invalid_transition"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/heartbeat": {
            "post": {
                "operationId": "v1.contact-center.operators.heartbeat",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "connection_id": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "ok": {
                                                    "type": "boolean"
                                                },
                                                "next_heartbeat_seconds": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "ok",
                                                "next_heartbeat_seconds"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/wrap-up": {
            "post": {
                "operationId": "v1.contact-center.operators.wrap-up",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "queue_call_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "disposition_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 5000
                                    },
                                    "tags": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "quality_score": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 100
                                    },
                                    "first_contact_resolution": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "callback_number": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "callback_scheduled_for": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "call_disposition_id": {},
                                                "operator": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                }
                                            },
                                            "required": [
                                                "call_disposition_id",
                                                "operator"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/statistics": {
            "get": {
                "operationId": "v1.contact-center.operators.statistics",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "operator_id": {},
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "state": {
                                                            "type": "string"
                                                        },
                                                        "state_label": {
                                                            "type": "string"
                                                        },
                                                        "state_reason": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "state_since": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "seconds_in_state": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "null"
                                                                },
                                                                {
                                                                    "type": "object"
                                                                },
                                                                {
                                                                    "type": "integer",
                                                                    "enum": [
                                                                        0
                                                                    ]
                                                                }
                                                            ]
                                                        },
                                                        "online": {
                                                            "type": "boolean"
                                                        },
                                                        "offered_today": {
                                                            "type": "integer"
                                                        },
                                                        "answered_today": {
                                                            "type": "integer"
                                                        },
                                                        "missed_today": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "operator_id",
                                                        "name",
                                                        "state",
                                                        "state_label",
                                                        "state_reason",
                                                        "state_since",
                                                        "seconds_in_state",
                                                        "online",
                                                        "offered_today",
                                                        "answered_today",
                                                        "missed_today"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "logged_in_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "available_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "talk_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "hold_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "wrap_up_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "pause_seconds": {
                                                            "type": "integer"
                                                        },
                                                        "calls_offered": {
                                                            "type": "integer"
                                                        },
                                                        "calls_answered": {
                                                            "type": "integer"
                                                        },
                                                        "calls_missed": {
                                                            "type": "integer"
                                                        },
                                                        "calls_transferred_out": {
                                                            "type": "integer"
                                                        },
                                                        "answer_rate_percent": {
                                                            "type": "number"
                                                        },
                                                        "average_handle_seconds": {
                                                            "type": "number"
                                                        },
                                                        "average_talk_seconds": {
                                                            "type": "number"
                                                        },
                                                        "average_speed_of_answer_seconds": {
                                                            "type": "number"
                                                        },
                                                        "first_contact_resolution_percent": {
                                                            "type": "number"
                                                        },
                                                        "qa_score": {
                                                            "type": "number"
                                                        },
                                                        "occupancy_percent": {
                                                            "type": "number"
                                                        },
                                                        "billed_talk_seconds": {
                                                            "type": "integer",
                                                            "description": "§82 cost attribution. Summed as strings through bcmath, because\nthese are amounts and Collection::sum() on decimals goes via float."
                                                        },
                                                        "billed_talk_charge": {
                                                            "type": "string"
                                                        },
                                                        "billed_talk_currency": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "description": "Null when nothing was billed, so a reader can tell \"no operator\n charges in this range\" from \"charged zero\"."
                                                        }
                                                    },
                                                    "required": [
                                                        "logged_in_seconds",
                                                        "available_seconds",
                                                        "talk_seconds",
                                                        "hold_seconds",
                                                        "wrap_up_seconds",
                                                        "pause_seconds",
                                                        "calls_offered",
                                                        "calls_answered",
                                                        "calls_missed",
                                                        "calls_transferred_out",
                                                        "answer_rate_percent",
                                                        "average_handle_seconds",
                                                        "average_talk_seconds",
                                                        "average_speed_of_answer_seconds",
                                                        "first_contact_resolution_percent",
                                                        "qa_score",
                                                        "occupancy_percent",
                                                        "billed_talk_seconds",
                                                        "billed_talk_charge",
                                                        "billed_talk_currency"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/operators/{id}/calls/{queueCallId}/accept": {
            "post": {
                "operationId": "v1.contact-center.operators.calls.accept",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "queueCallId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "queue_call_id": {},
                                                "status": {
                                                    "type": "string"
                                                },
                                                "connected": {
                                                    "type": "string"
                                                },
                                                "connection_error": {
                                                    "type": "string"
                                                },
                                                "briefing": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "queue_call_id",
                                                "status",
                                                "connected",
                                                "connection_error",
                                                "briefing"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/operators/{id}/calls/{queueCallId}/reject": {
            "post": {
                "operationId": "v1.contact-center.operators.calls.reject",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "queueCallId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string"
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "reason"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queue-calls/{queueCallId}/briefing": {
            "get": {
                "operationId": "v1.contact-center.queue-calls.briefing",
                "summary": "§14: the pre-answer briefing",
                "tags": [
                    "Operator"
                ],
                "parameters": [
                    {
                        "name": "queueCallId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/calls": {
            "post": {
                "operationId": "v1.telephony.calls.store",
                "tags": [
                    "OutboundCall"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "assistantId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "squadId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "phoneNumberId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "phoneNumber": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "sipTrunkId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "customerId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "campaignId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "customer": {
                                        "type": "object",
                                        "properties": {
                                            "number": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 64
                                            },
                                            "name": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 255
                                            }
                                        }
                                    },
                                    "to": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "callerId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "variables": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "assistantOverrides": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "customSipHeaders": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "answeringMachineDetection": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "recordingMode": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "disabled",
                                            "mono",
                                            "dual_channel",
                                            "inherit",
                                            null
                                        ]
                                    },
                                    "timeoutSeconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 5,
                                        "maximum": 600
                                    },
                                    "scheduledAt": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    },
                                    "idempotencyKey": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "call_id": {
                                                    "type": "string"
                                                },
                                                "provider_call_id": {
                                                    "type": "string"
                                                },
                                                "provider": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "to": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "from": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "call_id",
                                                "provider_call_id",
                                                "provider",
                                                "status",
                                                "to",
                                                "from",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/billing/payment-methods": {
            "get": {
                "operationId": "v1.billing.payment-methods.index",
                "tags": [
                    "PaymentMethod"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "brand": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last4": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "exp_month": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "exp_year": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "country": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "is_default": {
                                                        "type": "boolean"
                                                    },
                                                    "expired": {
                                                        "type": "boolean"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "display": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "type",
                                                    "brand",
                                                    "last4",
                                                    "exp_month",
                                                    "exp_year",
                                                    "country",
                                                    "is_default",
                                                    "expired",
                                                    "status",
                                                    "display"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.billing.payment-methods.store",
                "tags": [
                    "PaymentMethod"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "payment_method_id": {
                                        "type": "string",
                                        "maxLength": 191
                                    },
                                    "make_default": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "payment_method_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {},
                                                "type": {
                                                    "type": "string"
                                                },
                                                "brand": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last4": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "exp_month": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "exp_year": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "country": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                },
                                                "expired": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "display": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "brand",
                                                "last4",
                                                "exp_month",
                                                "exp_year",
                                                "country",
                                                "is_default",
                                                "expired",
                                                "status",
                                                "display"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "billing_unavailable"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/billing/payment-methods/setup-intent": {
            "post": {
                "operationId": "v1.billing.payment-methods.setup-intent",
                "tags": [
                    "PaymentMethod"
                ],
                "responses": {
                    "503": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "billing_unavailable"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "client_secret": {
                                                    "type": "string"
                                                },
                                                "setup_intent_id": {
                                                    "type": "string"
                                                },
                                                "customer_id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "client_secret",
                                                "setup_intent_id",
                                                "customer_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/payment-methods/{paymentMethod}/default": {
            "post": {
                "operationId": "v1.billing.payment-methods.default",
                "tags": [
                    "PaymentMethod"
                ],
                "parameters": [
                    {
                        "name": "paymentMethod",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {},
                                                "type": {
                                                    "type": "string"
                                                },
                                                "brand": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last4": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "exp_month": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "exp_year": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "country": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                },
                                                "expired": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "display": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "brand",
                                                "last4",
                                                "exp_month",
                                                "exp_year",
                                                "country",
                                                "is_default",
                                                "expired",
                                                "status",
                                                "display"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/payment-methods/{paymentMethod}": {
            "delete": {
                "operationId": "v1.billing.payment-methods.destroy",
                "tags": [
                    "PaymentMethod"
                ],
                "parameters": [
                    {
                        "name": "paymentMethod",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/phone-numbers/search": {
            "post": {
                "operationId": "v1.telephony.phone-numbers.search",
                "tags": [
                    "PhoneNumber"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "provider": {
                                        "$ref": "#/components/schemas/TelephonyProviderId"
                                    },
                                    "country": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "local",
                                            "mobile",
                                            "toll_free",
                                            "national",
                                            null
                                        ]
                                    },
                                    "areaCode": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 8
                                    },
                                    "contains": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "region": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "locality": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "capabilities": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "limit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 100
                                    }
                                },
                                "required": [
                                    "provider",
                                    "country"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/telephony/phone-numbers/purchase": {
            "post": {
                "operationId": "v1.telephony.phone-numbers.purchase",
                "tags": [
                    "PhoneNumber"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "provider": {
                                        "$ref": "#/components/schemas/TelephonyProviderId"
                                    },
                                    "number": {
                                        "type": "string",
                                        "maxLength": 32
                                    },
                                    "telephonyAccountId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "friendlyName": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "provider",
                                    "number"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/PhoneNumber"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/telephony/phone-numbers/import": {
            "post": {
                "operationId": "v1.telephony.phone-numbers.import",
                "tags": [
                    "PhoneNumber"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "provider": {
                                        "$ref": "#/components/schemas/TelephonyProviderId"
                                    },
                                    "telephonyAccountId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "provider"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "imported": {
                                                            "type": "integer"
                                                        },
                                                        "updated": {
                                                            "type": "integer"
                                                        },
                                                        "missing": {
                                                            "type": "integer"
                                                        },
                                                        "numbers": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 0,
                                                            "maxItems": 0,
                                                            "additionalItems": false
                                                        }
                                                    },
                                                    "required": [
                                                        "imported",
                                                        "updated",
                                                        "missing",
                                                        "numbers"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/telephony/phone-numbers": {
            "get": {
                "operationId": "v1.telephony.phone-numbers.index",
                "tags": [
                    "PhoneNumber"
                ],
                "parameters": [
                    {
                        "name": "provider",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "number",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.phone-numbers.store",
                "summary": "Register a number the tenant already controls (BYO / SIP). Buying from a\ncarrier is a different verb (`purchase`) because it spends money and can\nfail at the carrier — conflating the two would make a create request\nunexpectedly chargeable",
                "tags": [
                    "PhoneNumber"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "number": {
                                        "type": "string",
                                        "maxLength": 32
                                    },
                                    "friendlyName": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "sipTrunkId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "assistantId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "squadId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "capabilities": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "voice",
                                                "sms",
                                                "mms",
                                                "fax"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "number"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/PhoneNumber"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/telephony/phone-numbers/{id}": {
            "get": {
                "operationId": "v1.telephony.phone-numbers.show",
                "tags": [
                    "PhoneNumber"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/PhoneNumber"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "patch": {
                "operationId": "v1.telephony.phone-numbers.update",
                "tags": [
                    "PhoneNumber"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "friendlyName": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "destinationType": {
                                        "anyOf": [
                                            {
                                                "$ref": "#/components/schemas/TelephonyDestinationType"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "destinationId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "destinationValue": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "assistantId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "squadId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "sipTrunkId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "callerIdPolicyId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "phoneNumberHookId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "hookEnabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "hookUrl": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 1024
                                    },
                                    "hookSecret": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "hookTimeoutMs": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 200,
                                        "maximum": 3000
                                    },
                                    "hookFallback": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "static",
                                            "reject",
                                            "voicemail",
                                            null
                                        ]
                                    },
                                    "inboundEnabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "outboundEnabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "outboundCallerIdNumber": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "outboundCallerIdName": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "smsEnabled": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "smsAssistantId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "recordingMode": {
                                        "anyOf": [
                                            {
                                                "$ref": "#/components/schemas/TelephonyRecordingMode"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "recordingConsentRequired": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "maxConcurrentCalls": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1
                                    },
                                    "status": {
                                        "anyOf": [
                                            {
                                                "$ref": "#/components/schemas/PhoneNumberStatus"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/PhoneNumber"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.phone-numbers.destroy",
                "summary": "Soft-delete only. Releasing at the carrier is an explicit, separate action",
                "tags": [
                    "PhoneNumber"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/phone-numbers/{id}/configure": {
            "post": {
                "operationId": "v1.telephony.phone-numbers.configure",
                "tags": [
                    "PhoneNumber"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/phone-numbers/{id}/release": {
            "post": {
                "operationId": "v1.telephony.phone-numbers.release",
                "tags": [
                    "PhoneNumber"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "anyOf": [
                                                        {
                                                            "$ref": "#/components/schemas/PhoneNumber"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/billing/plans": {
            "get": {
                "operationId": "v1.billing.plans",
                "tags": [
                    "Plan"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "plans": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "key": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "description": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "category": {
                                                                "type": "string"
                                                            },
                                                            "unit_type": {
                                                                "type": "string"
                                                            },
                                                            "entitlements": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "price": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "unit_amount": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "currency": {
                                                                        "type": "string"
                                                                    },
                                                                    "unit_type": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "unit_amount",
                                                                    "currency",
                                                                    "unit_type"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "key",
                                                            "name",
                                                            "description",
                                                            "category",
                                                            "unit_type",
                                                            "entitlements",
                                                            "price"
                                                        ]
                                                    }
                                                },
                                                "addons": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "key": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "description": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "category": {
                                                                "type": "string"
                                                            },
                                                            "unit_type": {
                                                                "type": "string"
                                                            },
                                                            "entitlements": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "price": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "unit_amount": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "currency": {
                                                                        "type": "string"
                                                                    },
                                                                    "unit_type": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "unit_amount",
                                                                    "currency",
                                                                    "unit_type"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "key",
                                                            "name",
                                                            "description",
                                                            "category",
                                                            "unit_type",
                                                            "entitlements",
                                                            "price"
                                                        ]
                                                    }
                                                },
                                                "entitlements": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "anyOf": [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "boolean"
                                                            },
                                                            {
                                                                "type": "string"
                                                            }
                                                        ]
                                                    }
                                                },
                                                "limits": {
                                                    "type": "object",
                                                    "description": "§90. The enforced ceilings with what is already spent against\nthem, so an integration can check headroom before a create\nrather than discovering the limit as a 402 halfway through a\nbulk import. `limit` is null when there is no ceiling —\neither the plan says unlimited or there is no plan.",
                                                    "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                            "limit": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "used": {
                                                                "type": "integer"
                                                            },
                                                            "unlimited": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "limit",
                                                            "used",
                                                            "unlimited"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "plans",
                                                "addons",
                                                "entitlements",
                                                "limits"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/credentials": {
            "get": {
                "operationId": "v1.credentials.index",
                "summary": "List provider credentials. Secret values are absent; `secret_keys` says\nwhich fields are set",
                "tags": [
                    "ProviderCredential"
                ],
                "parameters": [
                    {
                        "name": "active_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `ProviderCredentialResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ProviderCredentialResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.credentials.store",
                "summary": "Store a provider credential. The secret is encrypted before it hits disk",
                "tags": [
                    "ProviderCredential"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "class": {
                                        "type": "string",
                                        "enum": [
                                            "telephony",
                                            "model",
                                            "transcriber",
                                            "voice",
                                            "storage",
                                            "observability",
                                            "integration",
                                            "mcp",
                                            "oauth",
                                            "sip"
                                        ]
                                    },
                                    "provider": {
                                        "type": "string",
                                        "maxLength": 64
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "secrets": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 1
                                    },
                                    "config": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "is_default": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "class",
                                    "provider",
                                    "name",
                                    "secrets"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "provider_credential"
                                                },
                                                "class": {
                                                    "type": "string"
                                                },
                                                "provider": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "config": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "secret_keys": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                },
                                                "active": {
                                                    "type": "boolean"
                                                },
                                                "validation_status": {
                                                    "type": "string"
                                                },
                                                "validated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "validation_error": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "capabilities": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "expires_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "rotated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "class",
                                                "provider",
                                                "name",
                                                "description",
                                                "config",
                                                "secret_keys",
                                                "is_default",
                                                "active",
                                                "validation_status",
                                                "validated_at",
                                                "validation_error",
                                                "capabilities",
                                                "expires_at",
                                                "rotated_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/credentials/{credential}": {
            "get": {
                "operationId": "v1.credentials.show",
                "tags": [
                    "ProviderCredential"
                ],
                "parameters": [
                    {
                        "name": "credential",
                        "in": "path",
                        "required": true,
                        "description": "The credential ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ProviderCredentialResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProviderCredentialResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.credentials.update",
                "summary": "Update metadata and/or rotate individual secret fields",
                "tags": [
                    "ProviderCredential"
                ],
                "parameters": [
                    {
                        "name": "credential",
                        "in": "path",
                        "required": true,
                        "description": "The credential ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "config": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "secrets": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "is_default": {
                                        "type": "boolean"
                                    },
                                    "active": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ProviderCredentialResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProviderCredentialResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.credentials.destroy",
                "tags": [
                    "ProviderCredential"
                ],
                "parameters": [
                    {
                        "name": "credential",
                        "in": "path",
                        "required": true,
                        "description": "The credential ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/credentials/{credential}/test": {
            "post": {
                "operationId": "v1.credentials.test",
                "description": "Delegates to `CredentialValidator`, which makes a real read-only call to\nthe provider. A provider the registry has no probe for comes back as\n`verified: false` — a clearly-labelled \"cannot verify\" rather than a green\ntick it has not earned (§188).",
                "summary": "§31 validate: prove the stored credential works against the provider",
                "tags": [
                    "ProviderCredential"
                ],
                "parameters": [
                    {
                        "name": "credential",
                        "in": "path",
                        "required": true,
                        "description": "The credential ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200 either way: the request succeeded, and the *credential's* verdict\nis the payload. A 4xx here would be indistinguishable from the caller\nhaving got the request wrong.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/contact-center/queues/overview": {
            "get": {
                "operationId": "v1.contact-center.queues.overview",
                "summary": "Every queue's live tile — what the wallboard polls when websockets are down",
                "tags": [
                    "Queue"
                ],
                "responses": {
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "bad_request"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "No tenant bound."
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "waiting": {
                                                    "type": "integer"
                                                },
                                                "longest_wait_seconds": {
                                                    "type": "integer"
                                                },
                                                "active": {
                                                    "type": "integer"
                                                },
                                                "agents_logged_in": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "agents_available": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "agents_busy": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "agents_paused": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "offered_today": {
                                                    "type": "integer"
                                                },
                                                "answered_today": {
                                                    "type": "integer"
                                                },
                                                "abandoned_today": {
                                                    "type": "integer"
                                                },
                                                "callbacks_pending": {
                                                    "type": "integer"
                                                },
                                                "service_level_percent": {
                                                    "type": "number"
                                                },
                                                "abandonment_rate_percent": {
                                                    "type": "number"
                                                },
                                                "queues": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "queue_id": {},
                                                            "queue_name": {
                                                                "type": "string"
                                                            },
                                                            "waiting": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "longest_wait_seconds": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "null"
                                                                    },
                                                                    {
                                                                        "type": "object"
                                                                    },
                                                                    {
                                                                        "type": "integer",
                                                                        "enum": [
                                                                            0
                                                                        ]
                                                                    }
                                                                ]
                                                            },
                                                            "active": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "agents_logged_in": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "agents_available": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "agents_busy": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "offered_today": {
                                                                "type": "integer"
                                                            },
                                                            "answered_today": {
                                                                "type": "integer"
                                                            },
                                                            "abandoned_today": {
                                                                "type": "integer"
                                                            },
                                                            "missed_today": {
                                                                "type": "integer"
                                                            },
                                                            "overflowed_today": {
                                                                "type": "integer"
                                                            },
                                                            "callbacks_pending": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "service_level_percent": {
                                                                "type": "number"
                                                            },
                                                            "service_level_target": {
                                                                "type": "integer"
                                                            },
                                                            "abandonment_rate_percent": {
                                                                "type": "number"
                                                            },
                                                            "average_wait_seconds": {
                                                                "type": "number"
                                                            },
                                                            "max_wait_seconds": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "queue_id",
                                                            "queue_name",
                                                            "waiting",
                                                            "longest_wait_seconds",
                                                            "active",
                                                            "agents_logged_in",
                                                            "agents_available",
                                                            "agents_busy",
                                                            "offered_today",
                                                            "answered_today",
                                                            "abandoned_today",
                                                            "missed_today",
                                                            "overflowed_today",
                                                            "callbacks_pending",
                                                            "service_level_percent",
                                                            "service_level_target",
                                                            "abandonment_rate_percent",
                                                            "average_wait_seconds",
                                                            "max_wait_seconds"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "waiting",
                                                "longest_wait_seconds",
                                                "active",
                                                "agents_logged_in",
                                                "agents_available",
                                                "agents_busy",
                                                "agents_paused",
                                                "offered_today",
                                                "answered_today",
                                                "abandoned_today",
                                                "callbacks_pending",
                                                "service_level_percent",
                                                "abandonment_rate_percent",
                                                "queues"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queues": {
            "get": {
                "operationId": "v1.contact-center.queues.index",
                "tags": [
                    "Queue"
                ],
                "parameters": [
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.contact-center.queues.store",
                "tags": [
                    "Queue"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queues/{id}": {
            "get": {
                "operationId": "v1.contact-center.queues.show",
                "tags": [
                    "Queue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.contact-center.queues.update",
                "tags": [
                    "Queue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.contact-center.queues.destroy",
                "tags": [
                    "Queue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queues/{id}/statistics": {
            "get": {
                "operationId": "v1.contact-center.queues.statistics",
                "summary": "Live counters for one queue (§16 realtime)",
                "tags": [
                    "Queue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "queue_id": {},
                                                "queue_name": {
                                                    "type": "string"
                                                },
                                                "waiting": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "longest_wait_seconds": {
                                                    "anyOf": [
                                                        {
                                                            "type": "null"
                                                        },
                                                        {
                                                            "type": "object"
                                                        },
                                                        {
                                                            "type": "integer",
                                                            "enum": [
                                                                0
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "active": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "agents_logged_in": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "agents_available": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "agents_busy": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "offered_today": {
                                                    "type": "integer"
                                                },
                                                "answered_today": {
                                                    "type": "integer"
                                                },
                                                "abandoned_today": {
                                                    "type": "integer"
                                                },
                                                "missed_today": {
                                                    "type": "integer"
                                                },
                                                "overflowed_today": {
                                                    "type": "integer"
                                                },
                                                "callbacks_pending": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "service_level_percent": {
                                                    "type": "number"
                                                },
                                                "service_level_target": {
                                                    "type": "integer"
                                                },
                                                "abandonment_rate_percent": {
                                                    "type": "number"
                                                },
                                                "average_wait_seconds": {
                                                    "type": "number"
                                                },
                                                "max_wait_seconds": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "queue_id",
                                                "queue_name",
                                                "waiting",
                                                "longest_wait_seconds",
                                                "active",
                                                "agents_logged_in",
                                                "agents_available",
                                                "agents_busy",
                                                "offered_today",
                                                "answered_today",
                                                "abandoned_today",
                                                "missed_today",
                                                "overflowed_today",
                                                "callbacks_pending",
                                                "service_level_percent",
                                                "service_level_target",
                                                "abandonment_rate_percent",
                                                "average_wait_seconds",
                                                "max_wait_seconds"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/queues/{id}/history": {
            "get": {
                "operationId": "v1.contact-center.queues.history",
                "summary": "Historical rollup for a date range (§16). Never scans raw events",
                "tags": [
                    "Queue"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "interval",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "enum": [
                                "15",
                                "30",
                                "60",
                                "1440",
                                null
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "offered": {
                                                    "type": "integer"
                                                },
                                                "answered": {
                                                    "type": "integer"
                                                },
                                                "abandoned": {
                                                    "type": "integer"
                                                },
                                                "timed_out": {
                                                    "type": "integer"
                                                },
                                                "overflowed": {
                                                    "type": "integer"
                                                },
                                                "voicemail": {
                                                    "type": "integer"
                                                },
                                                "callbacks_requested": {
                                                    "type": "integer"
                                                },
                                                "transferred_out": {
                                                    "type": "integer"
                                                },
                                                "abandonment_rate_percent": {
                                                    "type": "number"
                                                },
                                                "service_level_percent": {
                                                    "type": "number"
                                                },
                                                "average_wait_seconds": {
                                                    "type": "number"
                                                },
                                                "max_wait_seconds": {
                                                    "type": "integer"
                                                },
                                                "average_handle_seconds": {
                                                    "type": "number"
                                                },
                                                "occupancy_percent": {
                                                    "type": "number"
                                                },
                                                "transfer_rate_percent": {
                                                    "type": "number"
                                                }
                                            },
                                            "required": [
                                                "offered",
                                                "answered",
                                                "abandoned",
                                                "timed_out",
                                                "overflowed",
                                                "voicemail",
                                                "callbacks_requested",
                                                "transferred_out",
                                                "abandonment_rate_percent",
                                                "service_level_percent",
                                                "average_wait_seconds",
                                                "max_wait_seconds",
                                                "average_handle_seconds",
                                                "occupancy_percent",
                                                "transfer_rate_percent"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/registry": {
            "get": {
                "operationId": "v1.registry.index",
                "summary": "The whole registry in one call: providers, models, voices, telephony",
                "tags": [
                    "Registry"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "model_providers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "api_style": {
                                                                "type": "string"
                                                            },
                                                            "supports_byo_key": {
                                                                "type": "boolean"
                                                            },
                                                            "supports_custom_base_url": {
                                                                "type": "boolean"
                                                            },
                                                            "credential_fields": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "models": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "slug",
                                                            "name",
                                                            "api_style",
                                                            "supports_byo_key",
                                                            "supports_custom_base_url",
                                                            "credential_fields",
                                                            "models"
                                                        ]
                                                    }
                                                },
                                                "transcriber_providers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "streaming": {
                                                                "type": "boolean"
                                                            },
                                                            "models": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "slug": {
                                                                            "type": "string"
                                                                        },
                                                                        "name": {
                                                                            "type": "string"
                                                                        },
                                                                        "multilingual": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "streaming": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "diarization": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "languages": {
                                                                            "type": "array",
                                                                            "items": {}
                                                                        },
                                                                        "price_per_minute": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "pricing_verified": {
                                                                            "type": "boolean"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "slug",
                                                                        "name",
                                                                        "multilingual",
                                                                        "streaming",
                                                                        "diarization",
                                                                        "languages",
                                                                        "price_per_minute",
                                                                        "pricing_verified"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "slug",
                                                            "name",
                                                            "streaming",
                                                            "models"
                                                        ]
                                                    }
                                                },
                                                "voice_providers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "supports_cloning": {
                                                                "type": "boolean"
                                                            },
                                                            "voice_count": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            }
                                                        },
                                                        "required": [
                                                            "slug",
                                                            "name",
                                                            "supports_cloning",
                                                            "voice_count"
                                                        ]
                                                    }
                                                },
                                                "telephony_providers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "supports_inbound": {
                                                                "type": "boolean"
                                                            },
                                                            "supports_outbound": {
                                                                "type": "boolean"
                                                            },
                                                            "supports_sms": {
                                                                "type": "boolean"
                                                            },
                                                            "supports_sip_trunk": {
                                                                "type": "boolean"
                                                            },
                                                            "supports_number_purchase": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "slug",
                                                            "name",
                                                            "supports_inbound",
                                                            "supports_outbound",
                                                            "supports_sms",
                                                            "supports_sip_trunk",
                                                            "supports_number_purchase"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "model_providers",
                                                "transcriber_providers",
                                                "voice_providers",
                                                "telephony_providers"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/registry/model-providers": {
            "get": {
                "operationId": "v1.registry.model-providers",
                "summary": "LLM providers that CallAgent can actually talk to today",
                "tags": [
                    "Registry"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "api_style": {
                                                        "type": "string"
                                                    },
                                                    "default_base_url": {
                                                        "type": "string"
                                                    },
                                                    "supports_byo_key": {
                                                        "type": "boolean"
                                                    },
                                                    "supports_custom_base_url": {
                                                        "type": "boolean"
                                                    },
                                                    "credential_fields": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "minItems": 0,
                                                        "maxItems": 0,
                                                        "additionalItems": false
                                                    }
                                                },
                                                "required": [
                                                    "slug",
                                                    "name",
                                                    "api_style",
                                                    "default_base_url",
                                                    "supports_byo_key",
                                                    "supports_custom_base_url",
                                                    "credential_fields"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/registry/models": {
            "get": {
                "operationId": "v1.registry.models",
                "summary": "LLM models, with §25 capability metadata",
                "tags": [
                    "Registry"
                ],
                "parameters": [
                    {
                        "name": "voice_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "provider": {
                                                        "type": "string"
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "family": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "capabilities": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "context_window": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "max_output": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "input_price_per_million": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "output_price_per_million": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "pricing_verified": {
                                                        "type": "boolean"
                                                    },
                                                    "recommended_for_voice": {
                                                        "type": "boolean"
                                                    },
                                                    "deprecated": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "provider",
                                                    "slug",
                                                    "name",
                                                    "family",
                                                    "capabilities",
                                                    "context_window",
                                                    "max_output",
                                                    "input_price_per_million",
                                                    "output_price_per_million",
                                                    "currency",
                                                    "pricing_verified",
                                                    "recommended_for_voice",
                                                    "deprecated"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/registry/transcribers": {
            "get": {
                "operationId": "v1.registry.transcribers",
                "summary": "Transcriber providers and their models (§27)",
                "tags": [
                    "Registry"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "providers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "streaming": {
                                                                "type": "boolean"
                                                            },
                                                            "supports_diarization": {
                                                                "type": "boolean"
                                                            },
                                                            "credential_fields": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                },
                                                                "minItems": 0,
                                                                "maxItems": 0,
                                                                "additionalItems": false
                                                            }
                                                        },
                                                        "required": [
                                                            "slug",
                                                            "name",
                                                            "streaming",
                                                            "supports_diarization",
                                                            "credential_fields"
                                                        ]
                                                    }
                                                },
                                                "models": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "provider": {
                                                                "type": "string"
                                                            },
                                                            "slug": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "languages": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "multilingual": {
                                                                "type": "boolean"
                                                            },
                                                            "streaming": {
                                                                "type": "boolean"
                                                            },
                                                            "diarization": {
                                                                "type": "boolean"
                                                            },
                                                            "price_per_minute": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "pricing_verified": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "provider",
                                                            "slug",
                                                            "name",
                                                            "languages",
                                                            "multilingual",
                                                            "streaming",
                                                            "diarization",
                                                            "price_per_minute",
                                                            "pricing_verified"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "providers",
                                                "models"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/registry/voices": {
            "get": {
                "operationId": "v1.registry.voices",
                "summary": "The voice catalogue plus this organization's cloned voices (§28)",
                "tags": [
                    "Registry"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "provider": {
                                                        "type": "string"
                                                    },
                                                    "voice_id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "gender": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "accent": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "languages": {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    "preview_url": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "is_cloned": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "provider",
                                                    "voice_id",
                                                    "name",
                                                    "model",
                                                    "gender",
                                                    "accent",
                                                    "languages",
                                                    "preview_url",
                                                    "is_cloned"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/registry/telephony": {
            "get": {
                "operationId": "v1.registry.telephony",
                "summary": "Telephony providers and what each one can do (§8)",
                "tags": [
                    "Registry"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "supports_inbound": {
                                                        "type": "boolean"
                                                    },
                                                    "supports_outbound": {
                                                        "type": "boolean"
                                                    },
                                                    "supports_number_purchase": {
                                                        "type": "boolean"
                                                    },
                                                    "supports_sms": {
                                                        "type": "boolean"
                                                    },
                                                    "supports_sip_trunk": {
                                                        "type": "boolean"
                                                    },
                                                    "supports_media_streams": {
                                                        "type": "boolean"
                                                    },
                                                    "credential_fields": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "minItems": 0,
                                                        "maxItems": 0,
                                                        "additionalItems": false
                                                    }
                                                },
                                                "required": [
                                                    "slug",
                                                    "name",
                                                    "supports_inbound",
                                                    "supports_outbound",
                                                    "supports_number_purchase",
                                                    "supports_sms",
                                                    "supports_sip_trunk",
                                                    "supports_media_streams",
                                                    "credential_fields"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/inbound-routes": {
            "get": {
                "operationId": "v1.telephony.inbound-routes.index",
                "tags": [
                    "Route"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.inbound-routes.store",
                "tags": [
                    "Route"
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/InboundRoute"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/inbound-routes/{id}": {
            "patch": {
                "operationId": "v1.telephony.inbound-routes.update",
                "tags": [
                    "Route"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/InboundRoute"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.inbound-routes.destroy",
                "tags": [
                    "Route"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/outbound-routes": {
            "get": {
                "operationId": "v1.telephony.outbound-routes.index",
                "tags": [
                    "Route"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.outbound-routes.store",
                "tags": [
                    "Route"
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/OutboundRoute"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/outbound-routes/{id}": {
            "patch": {
                "operationId": "v1.telephony.outbound-routes.update",
                "tags": [
                    "Route"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/OutboundRoute"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.outbound-routes.destroy",
                "tags": [
                    "Route"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{trunkId}/dids": {
            "get": {
                "operationId": "v1.telephony.dids.index",
                "tags": [
                    "SipDid"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.dids.store",
                "tags": [
                    "SipDid"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/SipDid"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{trunkId}/dids/{id}": {
            "patch": {
                "operationId": "v1.telephony.dids.update",
                "tags": [
                    "SipDid"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/SipDid"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.dids.destroy",
                "tags": [
                    "SipDid"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/telephony/sip-trunks": {
            "get": {
                "operationId": "v1.telephony.sip-trunks.index",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "enabled_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.sip-trunks.store",
                "tags": [
                    "SipTrunk"
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/SipTrunk"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}": {
            "get": {
                "operationId": "v1.telephony.sip-trunks.show",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/SipTrunk"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.telephony.sip-trunks.update",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/SipTrunk"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.sip-trunks.destroy",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}/test/options": {
            "post": {
                "operationId": "v1.telephony.sip-trunks.test.options",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "trunk_status": {
                                                    "anyOf": [
                                                        {
                                                            "$ref": "#/components/schemas/SipTrunkStatus"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "gateways": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "trunk_status",
                                                "gateways"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}/test/register": {
            "post": {
                "operationId": "v1.telephony.sip-trunks.test.register",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "kind": {
                                                    "type": "string"
                                                },
                                                "outcome": {
                                                    "type": "string"
                                                },
                                                "response_code": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "response_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "latency_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "request_trace": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "response_trace": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                }
                                            },
                                            "required": [
                                                "kind",
                                                "outcome",
                                                "response_code",
                                                "response_reason",
                                                "latency_ms",
                                                "target",
                                                "request_trace",
                                                "response_trace",
                                                "message",
                                                "context"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}/test/inbound": {
            "post": {
                "operationId": "v1.telephony.sip-trunks.test.inbound",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "kind": {
                                                    "type": "string",
                                                    "const": "inbound"
                                                },
                                                "outcome": {
                                                    "type": "string",
                                                    "enum": [
                                                        "success",
                                                        "failure"
                                                    ]
                                                },
                                                "response_code": {
                                                    "type": "null"
                                                },
                                                "response_reason": {
                                                    "type": "null"
                                                },
                                                "latency_ms": {
                                                    "type": "null"
                                                },
                                                "target": {
                                                    "type": "string"
                                                },
                                                "request_trace": {
                                                    "type": "null"
                                                },
                                                "response_trace": {
                                                    "type": "null"
                                                },
                                                "message": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "enum": [
                                                                "Inbound configuration is complete. No inbound call has arrived on this trunk yet — place one to confirm end to end."
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "context": {
                                                    "type": "object",
                                                    "properties": {
                                                        "checks": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string",
                                                                "enum": [
                                                                    "the trunk is configured as outbound-only",
                                                                    "the inbound source ACL is empty and required, so every inbound call will be rejected",
                                                                    "no DID mapping and no fallback destination are configured, so an inbound call has nowhere to go"
                                                                ]
                                                            }
                                                        },
                                                        "last_inbound_at": {}
                                                    },
                                                    "required": [
                                                        "checks",
                                                        "last_inbound_at"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "kind",
                                                "outcome",
                                                "response_code",
                                                "response_reason",
                                                "latency_ms",
                                                "target",
                                                "request_trace",
                                                "response_trace",
                                                "message",
                                                "context"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}/test/outbound": {
            "post": {
                "operationId": "v1.telephony.sip-trunks.test.outbound",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "destination": {
                                        "type": "string",
                                        "maxLength": 64
                                    }
                                },
                                "required": [
                                    "destination"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "kind": {
                                                            "type": "string",
                                                            "const": "outbound"
                                                        },
                                                        "outcome": {
                                                            "type": "string",
                                                            "enum": [
                                                                "success",
                                                                "failure"
                                                            ]
                                                        },
                                                        "response_code": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "enum": [
                                                                486,
                                                                408,
                                                                603,
                                                                404,
                                                                488,
                                                                503,
                                                                400,
                                                                null
                                                            ]
                                                        },
                                                        "response_reason": {
                                                            "type": "string"
                                                        },
                                                        "latency_ms": {
                                                            "type": "integer"
                                                        },
                                                        "target": {
                                                            "type": "string"
                                                        },
                                                        "request_trace": {
                                                            "type": "string"
                                                        },
                                                        "response_trace": {
                                                            "type": "string"
                                                        },
                                                        "message": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "context": {
                                                            "type": "object",
                                                            "properties": {
                                                                "gateway": {
                                                                    "type": "string"
                                                                },
                                                                "dialed": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "gateway",
                                                                "dialed"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "kind",
                                                        "outcome",
                                                        "response_code",
                                                        "response_reason",
                                                        "latency_ms",
                                                        "target",
                                                        "request_trace",
                                                        "response_trace",
                                                        "message",
                                                        "context"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "kind": {
                                                            "type": "string",
                                                            "const": "outbound"
                                                        },
                                                        "outcome": {
                                                            "type": "string",
                                                            "const": "error"
                                                        },
                                                        "response_code": {
                                                            "type": "null"
                                                        },
                                                        "response_reason": {
                                                            "type": "null"
                                                        },
                                                        "latency_ms": {
                                                            "type": "integer"
                                                        },
                                                        "target": {
                                                            "type": "string"
                                                        },
                                                        "request_trace": {
                                                            "type": "null"
                                                        },
                                                        "response_trace": {
                                                            "type": "null"
                                                        },
                                                        "message": {
                                                            "type": "string"
                                                        },
                                                        "context": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "kind",
                                                        "outcome",
                                                        "response_code",
                                                        "response_reason",
                                                        "latency_ms",
                                                        "target",
                                                        "request_trace",
                                                        "response_trace",
                                                        "message",
                                                        "context"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "kind": {
                                                            "type": "string",
                                                            "const": "outbound"
                                                        },
                                                        "outcome": {
                                                            "type": "string",
                                                            "const": "failure"
                                                        },
                                                        "response_code": {
                                                            "type": "null"
                                                        },
                                                        "response_reason": {
                                                            "type": "null"
                                                        },
                                                        "latency_ms": {
                                                            "type": "null"
                                                        },
                                                        "target": {
                                                            "type": "null"
                                                        },
                                                        "request_trace": {
                                                            "type": "null"
                                                        },
                                                        "response_trace": {
                                                            "type": "null"
                                                        },
                                                        "message": {
                                                            "type": "string",
                                                            "const": "This trunk has no enabled gateway to test through."
                                                        },
                                                        "context": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "kind",
                                                        "outcome",
                                                        "response_code",
                                                        "response_reason",
                                                        "latency_ms",
                                                        "target",
                                                        "request_trace",
                                                        "response_trace",
                                                        "message",
                                                        "context"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}/diagnostics": {
            "get": {
                "operationId": "v1.telephony.sip-trunks.diagnostics",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/SipDiagnostic"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{id}/config": {
            "get": {
                "operationId": "v1.telephony.sip-trunks.config",
                "summary": "The generated Sofia XML, so an operator can diff it before applying",
                "tags": [
                    "SipTrunk"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "files": {
                                                    "type": "array",
                                                    "description": "One file per gateway, named with the gateway's ULID\n(BLOCKERS #23) — that name is what the dialplan dials and\nwhat an inbound call arrives tagged with.",
                                                    "items": {}
                                                },
                                                "file_name": {
                                                    "type": "string"
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "stale": {
                                                    "type": "boolean"
                                                },
                                                "xml": {
                                                    "type": "string"
                                                },
                                                "acl": {
                                                    "type": "object",
                                                    "description": "The ACL fragment is the other half of the generated config,\nand for an IP-authenticated trunk it is the half that decides\nwhether a carrier can reach us at all.",
                                                    "properties": {
                                                        "path": {
                                                            "type": "string"
                                                        },
                                                        "file_name": {
                                                            "type": "string"
                                                        },
                                                        "entries": {
                                                            "type": "string"
                                                        },
                                                        "authorising": {
                                                            "type": "string"
                                                        },
                                                        "stale": {
                                                            "type": "string"
                                                        },
                                                        "xml": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "path",
                                                        "file_name",
                                                        "entries",
                                                        "authorising",
                                                        "stale",
                                                        "xml"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "files",
                                                "file_name",
                                                "path",
                                                "stale",
                                                "xml",
                                                "acl"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/telephony/sip-trunks/{trunkId}/gateways": {
            "get": {
                "operationId": "v1.telephony.gateways.index",
                "tags": [
                    "SipTrunkGateway"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returned in failover order, so a client sees the same ordering the\ndialler will use rather than insertion order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.gateways.store",
                "tags": [
                    "SipTrunkGateway"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/SipTrunkGateway"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{trunkId}/gateways/{id}": {
            "patch": {
                "operationId": "v1.telephony.gateways.update",
                "tags": [
                    "SipTrunkGateway"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/SipTrunkGateway"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.gateways.destroy",
                "tags": [
                    "SipTrunkGateway"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/telephony/sip-trunks/{trunkId}/gateways/{id}/test": {
            "post": {
                "operationId": "v1.telephony.gateways.test",
                "tags": [
                    "SipTrunkGateway"
                ],
                "parameters": [
                    {
                        "name": "trunkId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "kind": {
                                                    "type": "string"
                                                },
                                                "outcome": {
                                                    "type": "string"
                                                },
                                                "response_code": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "response_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "latency_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "request_trace": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "response_trace": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context": {
                                                    "type": "object",
                                                    "additionalProperties": {}
                                                }
                                            },
                                            "required": [
                                                "kind",
                                                "outcome",
                                                "response_code",
                                                "response_reason",
                                                "latency_ms",
                                                "target",
                                                "request_trace",
                                                "response_trace",
                                                "message",
                                                "context"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/squads": {
            "get": {
                "operationId": "v1.squads.index",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `SquadResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/SquadResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "members",
                                                            "routes"
                                                        ]
                                                    }
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.squads.store",
                "tags": [
                    "Squad"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreSquadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`SquadResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SquadResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "members",
                                                        "routes"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/squads/{squad}": {
            "get": {
                "operationId": "v1.squads.show",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`SquadResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SquadResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "members",
                                                        "routes"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.squads.update",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateSquadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`SquadResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/SquadResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "members",
                                                        "routes"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.squads.destroy",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/squads/{squad}/publish": {
            "post": {
                "operationId": "v1.squads.publish",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "version_id": {},
                                                "version": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "version_id",
                                                "version"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "validation_error"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/squads/{squad}/snapshot": {
            "get": {
                "operationId": "v1.squads.snapshot",
                "summary": "The routing graph the gateway consumes",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "schema_version": {
                                                    "type": "integer",
                                                    "const": 1
                                                },
                                                "squad": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {},
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "entry_assistant_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "handoff_context_mode": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "handoff_context_size": {
                                                            "type": "integer"
                                                        },
                                                        "silent_handoff": {
                                                            "type": "boolean"
                                                        },
                                                        "handoff_message": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "extract_variables": {
                                                            "type": "array",
                                                            "items": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "entry_assistant_id",
                                                        "handoff_context_mode",
                                                        "handoff_context_size",
                                                        "silent_handoff",
                                                        "handoff_message",
                                                        "extract_variables"
                                                    ]
                                                },
                                                "members": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {},
                                                            "assistant_id": {
                                                                "type": "string"
                                                            },
                                                            "assistant_version_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "pin_mode": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "enabled": {
                                                                "type": "boolean"
                                                            },
                                                            "overrides": {
                                                                "type": "array",
                                                                "items": {}
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "assistant_id",
                                                            "assistant_version_id",
                                                            "pin_mode",
                                                            "name",
                                                            "role",
                                                            "enabled",
                                                            "overrides"
                                                        ]
                                                    }
                                                },
                                                "routes": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {},
                                                            "name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "from_member_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "trigger": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "trigger_value": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "condition": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "destination_type": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "destination_assistant_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "destination_squad_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "destination_queue_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "destination_expression": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "context_mode": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "context_size": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "extract_variables": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "silent": {
                                                                "type": [
                                                                    "boolean",
                                                                    "null"
                                                                ]
                                                            },
                                                            "message": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "priority": {
                                                                "type": "integer"
                                                            },
                                                            "enabled": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "from_member_id",
                                                            "trigger",
                                                            "trigger_value",
                                                            "condition",
                                                            "destination_type",
                                                            "destination_assistant_id",
                                                            "destination_squad_id",
                                                            "destination_queue_id",
                                                            "destination_expression",
                                                            "context_mode",
                                                            "context_size",
                                                            "extract_variables",
                                                            "silent",
                                                            "message",
                                                            "priority",
                                                            "enabled"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "schema_version",
                                                "squad",
                                                "members",
                                                "routes"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/squads/{squad}/validate": {
            "get": {
                "operationId": "v1.squads.validate",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "errors": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "errors"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/squads/{squad}/resolve-handoff": {
            "post": {
                "operationId": "v1.squads.resolve-handoff",
                "summary": "Dry-runs the routing table against a hypothetical signal — the squad\nbuilder's \"test this route\" button, and a genuinely useful debugging tool",
                "tags": [
                    "Squad"
                ],
                "parameters": [
                    {
                        "name": "squad",
                        "in": "path",
                        "required": true,
                        "description": "The squad ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "signal": {
                                        "type": "object",
                                        "properties": {
                                            "tool": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "intent": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            }
                                        }
                                    },
                                    "variables": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "messages": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "from_member_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "signal"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "matched": {
                                                            "type": "boolean"
                                                        },
                                                        "route_id": {
                                                            "type": "null"
                                                        },
                                                        "destination_type": {
                                                            "type": "string"
                                                        },
                                                        "destination": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 0,
                                                            "maxItems": 0,
                                                            "additionalItems": false
                                                        },
                                                        "context_mode": {
                                                            "type": "string"
                                                        },
                                                        "context": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 0,
                                                            "maxItems": 0,
                                                            "additionalItems": false
                                                        },
                                                        "silent": {
                                                            "type": "boolean"
                                                        },
                                                        "message": {
                                                            "type": "null"
                                                        },
                                                        "variables": {
                                                            "type": "string"
                                                        },
                                                        "reason": {
                                                            "type": "string",
                                                            "const": "no_matching_route"
                                                        }
                                                    },
                                                    "required": [
                                                        "matched",
                                                        "route_id",
                                                        "destination_type",
                                                        "destination",
                                                        "context_mode",
                                                        "context",
                                                        "silent",
                                                        "message",
                                                        "variables",
                                                        "reason"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "matched": {
                                                            "type": "boolean"
                                                        },
                                                        "route_id": {
                                                            "type": "string"
                                                        },
                                                        "destination_type": {
                                                            "type": "string"
                                                        },
                                                        "destination": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "assistant_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "assistant_id"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "squad_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "squad_id"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "queue_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "queue_id"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "expression": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ],
                                                                            "description": "A safe template, never an expression to evaluate (§127)."
                                                                        },
                                                                        "resolved": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "expression",
                                                                        "resolved"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    },
                                                                    "minItems": 0,
                                                                    "maxItems": 0,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        },
                                                        "context_mode": {
                                                            "type": "string"
                                                        },
                                                        "context": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                            }
                                                        },
                                                        "silent": {
                                                            "type": "boolean"
                                                        },
                                                        "message": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "variables": {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        "reason": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "matched",
                                                        "route_id",
                                                        "destination_type",
                                                        "destination",
                                                        "context_mode",
                                                        "context",
                                                        "silent",
                                                        "message",
                                                        "variables",
                                                        "reason"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/contact-center/supervisor/calls/{callId}/listen": {
            "post": {
                "operationId": "v1.contact-center.supervisor.listen",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/supervisor/calls/{callId}/whisper": {
            "post": {
                "operationId": "v1.contact-center.supervisor.whisper",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/supervisor/calls/{callId}/barge": {
            "post": {
                "operationId": "v1.contact-center.supervisor.barge",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/supervisor/calls/{callId}/end": {
            "post": {
                "operationId": "v1.contact-center.supervisor.end",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/supervisor/operators/{operatorId}/force-state": {
            "post": {
                "operationId": "v1.contact-center.supervisor.force-state",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "operatorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "state": {
                                        "type": "string",
                                        "enum": [
                                            "offline",
                                            "available",
                                            "busy",
                                            "ringing",
                                            "on_call",
                                            "wrap_up",
                                            "break",
                                            "training",
                                            "meeting",
                                            "custom_pause"
                                        ]
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    }
                                },
                                "required": [
                                    "state"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/contact-center/supervisor/operators/{operatorId}/force-logout": {
            "post": {
                "operationId": "v1.contact-center.supervisor.force-logout",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "operatorId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/supervisor/queue-calls/{queueCallId}/move": {
            "post": {
                "operationId": "v1.contact-center.supervisor.move",
                "tags": [
                    "Supervisor"
                ],
                "parameters": [
                    {
                        "name": "queueCallId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "queue_id": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "queue_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "forbidden"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/suppression-lists": {
            "get": {
                "operationId": "v1.suppression-lists.index",
                "tags": [
                    "Suppression"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.suppression-lists.store",
                "tags": [
                    "Suppression"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 96
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "dnc",
                                            "opt_out",
                                            "internal",
                                            "imported",
                                            "litigator",
                                            null
                                        ]
                                    },
                                    "applies_to_all_campaigns": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "key": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "applies_to_all_campaigns": {
                                                    "type": "boolean"
                                                },
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "entries_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "key",
                                                "description",
                                                "type",
                                                "applies_to_all_campaigns",
                                                "enabled",
                                                "entries_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/suppression-lists/{suppressionListId}": {
            "get": {
                "operationId": "v1.suppression-lists.show",
                "tags": [
                    "Suppression"
                ],
                "parameters": [
                    {
                        "name": "suppressionListId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "key": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "applies_to_all_campaigns": {
                                                    "type": "boolean"
                                                },
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "entries_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "key",
                                                "description",
                                                "type",
                                                "applies_to_all_campaigns",
                                                "enabled",
                                                "entries_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.suppression-lists.update",
                "tags": [
                    "Suppression"
                ],
                "parameters": [
                    {
                        "name": "suppressionListId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "key": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "applies_to_all_campaigns": {
                                                    "type": "boolean"
                                                },
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "entries_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "key",
                                                "description",
                                                "type",
                                                "applies_to_all_campaigns",
                                                "enabled",
                                                "entries_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "v1.suppression-lists.destroy",
                "tags": [
                    "Suppression"
                ],
                "parameters": [
                    {
                        "name": "suppressionListId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/suppression-lists/{suppressionListId}/entries": {
            "get": {
                "operationId": "v1.suppression-lists.entries.index",
                "tags": [
                    "Suppression"
                ],
                "parameters": [
                    {
                        "name": "suppressionListId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "phone_number": {
                                                        "type": "string"
                                                    },
                                                    "reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "source": {
                                                        "type": "string"
                                                    },
                                                    "expires_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "phone_number",
                                                    "reason",
                                                    "source",
                                                    "expires_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.suppression-lists.entries.store",
                "summary": "Bulk add. Numbers are normalised, and already-present numbers are ignored",
                "tags": [
                    "Suppression"
                ],
                "parameters": [
                    {
                        "name": "suppressionListId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "numbers": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "maxLength": 64
                                        },
                                        "minItems": 1,
                                        "maxItems": 10000
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    },
                                    "source": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "manual",
                                            "import",
                                            "api",
                                            "ivr_opt_out",
                                            "call_opt_out",
                                            null
                                        ]
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    },
                                    "default_country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 8
                                    }
                                },
                                "required": [
                                    "numbers"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "added": {
                                                    "type": "integer"
                                                },
                                                "duplicates": {
                                                    "type": "string"
                                                },
                                                "invalid": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "added",
                                                "duplicates",
                                                "invalid"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/suppression-lists/{suppressionListId}/entries/{entry}": {
            "delete": {
                "operationId": "v1.suppression-lists.entries.destroy",
                "tags": [
                    "Suppression"
                ],
                "parameters": [
                    {
                        "name": "suppressionListId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "entry",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/telephony/accounts": {
            "get": {
                "operationId": "v1.telephony.accounts.index",
                "tags": [
                    "TelephonyAccount"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "page": {
                                                    "type": "integer"
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "pages": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "page",
                                                "limit",
                                                "total",
                                                "pages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.telephony.accounts.store",
                "tags": [
                    "TelephonyAccount"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "provider": {
                                        "$ref": "#/components/schemas/TelephonyProviderId"
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "providerCredentialId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "externalAccountId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "isDefault": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "settings": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "provider",
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/TelephonyAccount"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/telephony/accounts/{id}": {
            "get": {
                "operationId": "v1.telephony.accounts.show",
                "tags": [
                    "TelephonyAccount"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/TelephonyAccount"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "patch": {
                "operationId": "v1.telephony.accounts.update",
                "tags": [
                    "TelephonyAccount"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "providerCredentialId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "externalAccountId": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "isDefault": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "settings": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#/components/schemas/TelephonyAccount"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.telephony.accounts.destroy",
                "tags": [
                    "TelephonyAccount"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/accounts/{id}/health": {
            "post": {
                "operationId": "v1.telephony.accounts.health",
                "summary": "Live carrier health check; the result is persisted so the UI can show drift",
                "tags": [
                    "TelephonyAccount"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "latency_ms": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "message": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "details": {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        }
                                                    },
                                                    "required": [
                                                        "status",
                                                        "latency_ms",
                                                        "message",
                                                        "details"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "telephony_error"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "This account has no provider credential attached."
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/telephony/providers": {
            "get": {
                "operationId": "v1.telephony.providers",
                "summary": "The capability matrix (§188). Clients render buttons from this rather than\nfrom a hard-coded list, so a provider we have not implemented is visibly\nunavailable instead of failing when someone clicks it",
                "tags": [
                    "TelephonyAccount"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "implemented": {
                                                        "type": "boolean"
                                                    },
                                                    "reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "capabilities": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                            "type": "string"
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "label",
                                                    "implemented",
                                                    "reason",
                                                    "capabilities"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tools": {
            "get": {
                "operationId": "v1.tools.index",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "published_only",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ToolResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.tools.store",
                "tags": [
                    "Tool"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreToolRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`ToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/tools/{tool}": {
            "get": {
                "operationId": "v1.tools.show",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.tools.update",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateToolRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`ToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.tools.destroy",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        },
                                        "id": {}
                                    },
                                    "required": [
                                        "deleted",
                                        "id"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/tools/{tool}/duplicate": {
            "post": {
                "operationId": "v1.tools.duplicate",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "`ToolResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/tools/{tool}/publish": {
            "post": {
                "operationId": "v1.tools.publish",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "`ToolVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolVersionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "validation_error"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/tools/{tool}/versions": {
            "get": {
                "operationId": "v1.tools.versions.index",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ToolVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ToolVersionResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/tools/{tool}/versions/{version}": {
            "get": {
                "operationId": "v1.tools.versions.show",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "version",
                        "in": "path",
                        "required": true,
                        "description": "The version ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ToolVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolVersionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/tools/{tool}/versions/{version}/restore": {
            "post": {
                "operationId": "v1.tools.versions.restore",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "version",
                        "in": "path",
                        "required": true,
                        "description": "The version ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "`ToolVersionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ToolVersionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/tools/{tool}/validate": {
            "get": {
                "operationId": "v1.tools.validate",
                "tags": [
                    "Tool"
                ],
                "parameters": [
                    {
                        "name": "tool",
                        "in": "path",
                        "required": true,
                        "description": "The tool ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "errors": {
                                                    "type": "array",
                                                    "prefixItems": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string",
                                                                "enum": [
                                                                    "The tool key must be a valid function name (letters, digits and underscores, not starting with a digit).",
                                                                    "A description is required — the model selects tools by it.",
                                                                    "The parameter schema must be a JSON Schema object."
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "string",
                                                            "const": "An async tool returns before the response arrives, so response extraction cannot be configured on it."
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    },
                                                                    "minItems": 0,
                                                                    "maxItems": 0,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string",
                                                                            "const": "Path parameters must be a list."
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string",
                                                                            "const": "Parameters must be a list."
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    },
                                                                    "minItems": 0,
                                                                    "maxItems": 0,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string",
                                                                            "const": "API key auth needs the header name to send the key in."
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string"
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string",
                                                                            "const": "Auth configuration must be an object."
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array",
                                                                    "prefixItems": [
                                                                        {
                                                                            "type": "string",
                                                                            "const": "Response extraction must be a list of paths."
                                                                        }
                                                                    ],
                                                                    "minItems": 1,
                                                                    "maxItems": 1,
                                                                    "additionalItems": false
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "string"
                                                                    }
                                                                }
                                                            ]
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        }
                                                    ],
                                                    "minItems": 11,
                                                    "maxItems": 11,
                                                    "additionalItems": false
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "errors"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/contact-center/calls/{callId}/transfer": {
            "post": {
                "operationId": "v1.contact-center.transfers.store",
                "tags": [
                    "Transfer"
                ],
                "parameters": [
                    {
                        "name": "callId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mode": {
                                        "type": "string",
                                        "enum": [
                                            "blind",
                                            "warm",
                                            "assistant_warm",
                                            "dynamic",
                                            "sip",
                                            "phone",
                                            "queue",
                                            "on_hold_specialist"
                                        ]
                                    },
                                    "destination_type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "assistant",
                                            "squad",
                                            "queue",
                                            "ivr",
                                            "ring_group",
                                            "extension",
                                            "voicemail",
                                            "external",
                                            "sip_uri",
                                            "hook",
                                            null
                                        ]
                                    },
                                    "destination_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "destination": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "operator_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "queue_call_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "mode"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "string"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "null"
                                                                        }
                                                                    ]
                                                                },
                                                                "queued": {
                                                                    "type": "boolean"
                                                                },
                                                                "bridged": {
                                                                    "type": "string"
                                                                },
                                                                "queue_call_id": {}
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error",
                                                                "queued",
                                                                "bridged",
                                                                "queue_call_id"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "unknown_queue"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "string"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "missing_queue_id"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "missing_number"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "missing_uri"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "missing_extension"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "unsupported_destination_type"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "no_live_channel"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "transfer_id": {
                                                                    "type": "string"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "null"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "transfer_id",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "transfer_id": {
                                                                    "type": "null"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "transfer_id",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        },
                                                        {
                                                            "type": "object",
                                                            "properties": {
                                                                "ok": {
                                                                    "type": "boolean"
                                                                },
                                                                "transfer_id": {
                                                                    "type": "null"
                                                                },
                                                                "mode": {
                                                                    "type": "string"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "const": "no_live_channel"
                                                                }
                                                            },
                                                            "required": [
                                                                "ok",
                                                                "transfer_id",
                                                                "mode",
                                                                "error"
                                                            ]
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/transfers/{transferId}": {
            "get": {
                "operationId": "v1.contact-center.transfers.show",
                "tags": [
                    "Transfer"
                ],
                "parameters": [
                    {
                        "name": "transferId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "404": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "not_found"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/transfers/{transferId}/brief": {
            "post": {
                "operationId": "v1.contact-center.transfers.brief",
                "summary": "Step 2 of a warm transfer: brief the specialist before connecting",
                "tags": [
                    "Transfer"
                ],
                "parameters": [
                    {
                        "name": "transferId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "queue_call_id": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "string"
                                                        },
                                                        "error": {
                                                            "type": "string"
                                                        },
                                                        "briefing": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "version": {
                                                                            "type": "integer",
                                                                            "const": 1
                                                                        },
                                                                        "assembled_at": {
                                                                            "type": "string"
                                                                        },
                                                                        "reason": {
                                                                            "type": "string"
                                                                        },
                                                                        "reason_label": {
                                                                            "type": "string",
                                                                            "enum": [
                                                                                "Customer asked for a person",
                                                                                "Assistant invoked the transfer tool",
                                                                                "Assistant confidence below threshold",
                                                                                "Policy rule required a human",
                                                                                "Escalation requested",
                                                                                "Negative sentiment detected",
                                                                                "A tool the assistant needed failed",
                                                                                "Supervisor intervention",
                                                                                "Assistant timed out"
                                                                            ]
                                                                        },
                                                                        "caller": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "number": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "name": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "country": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "dialled": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "number",
                                                                                "name",
                                                                                "country",
                                                                                "dialled"
                                                                            ]
                                                                        },
                                                                        "assistant": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "id": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "version_id": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "name": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "id",
                                                                                "version_id",
                                                                                "name"
                                                                            ]
                                                                        },
                                                                        "call": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "id": {
                                                                                    "type": "string"
                                                                                },
                                                                                "started_at": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "connected_at": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                },
                                                                                "elapsed_seconds": {
                                                                                    "type": "integer"
                                                                                },
                                                                                "direction": {
                                                                                    "type": "string"
                                                                                },
                                                                                "transport": {
                                                                                    "type": "string"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "id",
                                                                                "started_at",
                                                                                "connected_at",
                                                                                "elapsed_seconds",
                                                                                "direction",
                                                                                "transport"
                                                                            ]
                                                                        },
                                                                        "summary": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "string"
                                                                                },
                                                                                {
                                                                                    "type": "null"
                                                                                }
                                                                            ]
                                                                        },
                                                                        "intent": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "string"
                                                                                },
                                                                                {
                                                                                    "type": "null"
                                                                                }
                                                                            ]
                                                                        },
                                                                        "topics": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "string"
                                                                                },
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                }
                                                                            ]
                                                                        },
                                                                        "sentiment": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "label": {
                                                                                    "anyOf": [
                                                                                        {
                                                                                            "type": "string"
                                                                                        },
                                                                                        {
                                                                                            "type": "null"
                                                                                        }
                                                                                    ]
                                                                                },
                                                                                "score": {
                                                                                    "type": [
                                                                                        "string",
                                                                                        "null"
                                                                                    ]
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "label",
                                                                                "score"
                                                                            ]
                                                                        },
                                                                        "transcript": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "array",
                                                                                "items": {}
                                                                            }
                                                                        },
                                                                        "transcript_truncated": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "tool_results": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "array",
                                                                                "items": {}
                                                                            }
                                                                        },
                                                                        "customer": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                },
                                                                                {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "known": {
                                                                                            "type": "boolean"
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "known"
                                                                                    ]
                                                                                }
                                                                            ]
                                                                        },
                                                                        "caller_history": {
                                                                            "description": "§14. The rest of the relationship. Everything above this line is about the four minutes the caller\nhas just spent on the phone. This is the part that was missing:\nthat they rang twice yesterday about the same thing, that Ana\nspoke to them for six minutes and promised to call back, and that\nnobody has. An operator who cannot see it will ask them to\nexplain from the beginning for the third time.",
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "identified": {
                                                                                            "type": "boolean"
                                                                                        },
                                                                                        "unavailable": {
                                                                                            "type": "boolean"
                                                                                        },
                                                                                        "calls": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "string"
                                                                                            },
                                                                                            "minItems": 0,
                                                                                            "maxItems": 0,
                                                                                            "additionalItems": false
                                                                                        },
                                                                                        "promised_callbacks": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "string"
                                                                                            },
                                                                                            "minItems": 0,
                                                                                            "maxItems": 0,
                                                                                            "additionalItems": false
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "identified",
                                                                                        "unavailable",
                                                                                        "calls",
                                                                                        "promised_callbacks"
                                                                                    ]
                                                                                },
                                                                                {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "identified": {
                                                                                            "type": "boolean"
                                                                                        },
                                                                                        "matched_on": {
                                                                                            "type": "string",
                                                                                            "enum": [
                                                                                                "customer",
                                                                                                "number"
                                                                                            ]
                                                                                        },
                                                                                        "lookback_days": {
                                                                                            "type": "integer"
                                                                                        },
                                                                                        "calls": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "array",
                                                                                                "items": {}
                                                                                            }
                                                                                        },
                                                                                        "total": {
                                                                                            "type": "integer",
                                                                                            "minimum": 0
                                                                                        },
                                                                                        "truncated": {
                                                                                            "type": "boolean"
                                                                                        },
                                                                                        "repeat": {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                                "count": {
                                                                                                    "type": "string"
                                                                                                },
                                                                                                "previous": {
                                                                                                    "type": "integer",
                                                                                                    "minimum": 0
                                                                                                },
                                                                                                "window_hours": {
                                                                                                    "type": [
                                                                                                        "object",
                                                                                                        "null"
                                                                                                    ]
                                                                                                },
                                                                                                "threshold": {
                                                                                                    "type": [
                                                                                                        "object",
                                                                                                        "null"
                                                                                                    ]
                                                                                                },
                                                                                                "is_repeat": {
                                                                                                    "type": "boolean"
                                                                                                }
                                                                                            },
                                                                                            "required": [
                                                                                                "count",
                                                                                                "previous",
                                                                                                "window_hours",
                                                                                                "threshold",
                                                                                                "is_repeat"
                                                                                            ]
                                                                                        },
                                                                                        "promised_callbacks": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "anyOf": [
                                                                                                    {
                                                                                                        "type": "array",
                                                                                                        "items": {}
                                                                                                    },
                                                                                                    {
                                                                                                        "type": "string"
                                                                                                    }
                                                                                                ]
                                                                                            }
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "identified",
                                                                                        "matched_on",
                                                                                        "lookback_days",
                                                                                        "calls",
                                                                                        "total",
                                                                                        "truncated",
                                                                                        "repeat",
                                                                                        "promised_callbacks"
                                                                                    ]
                                                                                },
                                                                                {
                                                                                    "type": "object",
                                                                                    "properties": {
                                                                                        "identified": {
                                                                                            "type": "boolean"
                                                                                        },
                                                                                        "matched_on": {
                                                                                            "type": "null"
                                                                                        },
                                                                                        "lookback_days": {
                                                                                            "type": "integer"
                                                                                        },
                                                                                        "calls": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "string"
                                                                                            },
                                                                                            "minItems": 0,
                                                                                            "maxItems": 0,
                                                                                            "additionalItems": false
                                                                                        },
                                                                                        "total": {
                                                                                            "type": "integer"
                                                                                        },
                                                                                        "truncated": {
                                                                                            "type": "boolean"
                                                                                        },
                                                                                        "repeat": {
                                                                                            "type": "object",
                                                                                            "properties": {
                                                                                                "count": {
                                                                                                    "type": "integer",
                                                                                                    "const": 1
                                                                                                },
                                                                                                "previous": {
                                                                                                    "type": "integer"
                                                                                                },
                                                                                                "window_hours": {
                                                                                                    "type": "integer"
                                                                                                },
                                                                                                "threshold": {
                                                                                                    "type": "integer"
                                                                                                },
                                                                                                "is_repeat": {
                                                                                                    "type": "boolean"
                                                                                                }
                                                                                            },
                                                                                            "required": [
                                                                                                "count",
                                                                                                "previous",
                                                                                                "window_hours",
                                                                                                "threshold",
                                                                                                "is_repeat"
                                                                                            ]
                                                                                        },
                                                                                        "promised_callbacks": {
                                                                                            "type": "array",
                                                                                            "items": {
                                                                                                "type": "string"
                                                                                            },
                                                                                            "minItems": 0,
                                                                                            "maxItems": 0,
                                                                                            "additionalItems": false
                                                                                        }
                                                                                    },
                                                                                    "required": [
                                                                                        "identified",
                                                                                        "matched_on",
                                                                                        "lookback_days",
                                                                                        "calls",
                                                                                        "total",
                                                                                        "truncated",
                                                                                        "repeat",
                                                                                        "promised_callbacks"
                                                                                    ]
                                                                                }
                                                                            ]
                                                                        },
                                                                        "recommended_action": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "string"
                                                                                },
                                                                                {
                                                                                    "type": "string",
                                                                                    "enum": [
                                                                                        "The caller asked to speak to a person. Introduce yourself and confirm what they need.",
                                                                                        "The assistant was unsure. Re-confirm the request in your own words before acting.",
                                                                                        "The caller is frustrated. Acknowledge the wait and avoid repeating questions already answered.",
                                                                                        "A system the assistant needed failed. Verify the account manually before promising anything.",
                                                                                        "This was escalated by policy. Review the summary before speaking.",
                                                                                        "The assistant stopped responding. Apologise for the pause and pick up where the transcript ends.",
                                                                                        "A supervisor routed this call to you.",
                                                                                        "The assistant transferred this call. Continue from the summary."
                                                                                    ]
                                                                                }
                                                                            ]
                                                                        },
                                                                        "variables": {
                                                                            "type": "array",
                                                                            "items": {}
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "version",
                                                                        "assembled_at",
                                                                        "reason",
                                                                        "reason_label",
                                                                        "caller",
                                                                        "assistant",
                                                                        "call",
                                                                        "summary",
                                                                        "intent",
                                                                        "topics",
                                                                        "sentiment",
                                                                        "transcript",
                                                                        "transcript_truncated",
                                                                        "tool_results",
                                                                        "customer",
                                                                        "caller_history",
                                                                        "recommended_action",
                                                                        "variables"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                }
                                                            ]
                                                        },
                                                        "spoken": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error",
                                                        "briefing",
                                                        "spoken"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "boolean"
                                                        },
                                                        "error": {
                                                            "type": "string",
                                                            "const": "specialist_not_answered"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "boolean"
                                                        },
                                                        "error": {
                                                            "type": "string",
                                                            "const": "unknown_transfer"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/transfers/{transferId}/complete": {
            "post": {
                "operationId": "v1.contact-center.transfers.complete",
                "tags": [
                    "Transfer"
                ],
                "parameters": [
                    {
                        "name": "transferId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "string"
                                                        },
                                                        "error": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "boolean"
                                                        },
                                                        "error": {
                                                            "type": "string",
                                                            "const": "specialist_not_answered"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "boolean"
                                                        },
                                                        "error": {
                                                            "type": "string",
                                                            "const": "unknown_transfer"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contact-center/transfers/{transferId}/cancel": {
            "post": {
                "operationId": "v1.contact-center.transfers.cancel",
                "tags": [
                    "Transfer"
                ],
                "parameters": [
                    {
                        "name": "transferId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "boolean"
                                                        },
                                                        "error": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "ok": {
                                                            "type": "boolean"
                                                        },
                                                        "error": {
                                                            "type": "string",
                                                            "const": "unknown_transfer"
                                                        }
                                                    },
                                                    "required": [
                                                        "ok",
                                                        "error"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/usage/summary": {
            "get": {
                "operationId": "v1.billing.usage.summary",
                "tags": [
                    "Usage"
                ],
                "parameters": [
                    {
                        "name": "by",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "by": {
                                                    "type": "string"
                                                },
                                                "from": {
                                                    "type": "string"
                                                },
                                                "to": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "by",
                                                "from",
                                                "to"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/billing/usage": {
            "get": {
                "operationId": "v1.billing.usage",
                "tags": [
                    "Usage"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {},
                                                    "call_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "component": {
                                                        "type": "string"
                                                    },
                                                    "provider": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "billing_mode": {
                                                        "type": "string"
                                                    },
                                                    "quantity": {
                                                        "type": "string"
                                                    },
                                                    "unit": {
                                                        "type": "string"
                                                    },
                                                    "billable_units": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "provider_cost": {
                                                        "type": "string"
                                                    },
                                                    "platform_fee": {
                                                        "type": "string"
                                                    },
                                                    "customer_charge": {
                                                        "type": "string"
                                                    },
                                                    "margin": {
                                                        "type": "string"
                                                    },
                                                    "is_free": {
                                                        "type": "boolean"
                                                    },
                                                    "occurred_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "call_id",
                                                    "component",
                                                    "provider",
                                                    "model",
                                                    "billing_mode",
                                                    "quantity",
                                                    "unit",
                                                    "billable_units",
                                                    "currency",
                                                    "provider_cost",
                                                    "platform_fee",
                                                    "customer_charge",
                                                    "margin",
                                                    "is_free",
                                                    "occurred_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "string"
                                                },
                                                "to": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "per_page",
                                                "total",
                                                "last_page",
                                                "from",
                                                "to"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhook-deliveries": {
            "get": {
                "operationId": "v1.webhook-deliveries.index",
                "summary": "List webhook deliveries, newest first",
                "tags": [
                    "WebhookDelivery"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `WebhookDeliveryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookDeliveryResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/webhook-deliveries/{delivery}": {
            "get": {
                "operationId": "v1.webhook-deliveries.show",
                "summary": "Retrieve one delivery, including the per-attempt log",
                "tags": [
                    "WebhookDelivery"
                ],
                "parameters": [
                    {
                        "name": "delivery",
                        "in": "path",
                        "required": true,
                        "description": "The delivery ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`WebhookDeliveryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/WebhookDeliveryResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "attempt_log"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhook-deliveries/{delivery}/redeliver": {
            "post": {
                "operationId": "v1.webhook-deliveries.redeliver",
                "description": "The replay carries the same `event_id`, so a receiver that deduplicates on\nit will recognise the repeat.",
                "summary": "Replay a delivery",
                "tags": [
                    "WebhookDelivery"
                ],
                "parameters": [
                    {
                        "name": "delivery",
                        "in": "path",
                        "required": true,
                        "description": "The delivery ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "webhook_delivery"
                                                },
                                                "webhook_endpoint_id": {
                                                    "type": "string"
                                                },
                                                "event_id": {
                                                    "type": "string"
                                                },
                                                "event_type": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "attempts": {
                                                    "type": "integer"
                                                },
                                                "max_attempts": {
                                                    "type": "integer"
                                                },
                                                "response_status": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "duration_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "error": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "call_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next_attempt_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "delivered_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "redelivery_of_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "payload": {
                                                    "type": "array",
                                                    "description": "The captured exchange is already redacted at write time; this is the\n§65 delivery log the customer inspects.",
                                                    "items": {}
                                                },
                                                "request_headers": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "response_headers": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "response_body": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "attempt_log": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "attempt": {
                                                                        "type": "integer"
                                                                    },
                                                                    "outcome": {
                                                                        "type": "string"
                                                                    },
                                                                    "response_status": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "duration_ms": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "error": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "resolved_ip": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "created_at": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "attempt",
                                                                    "outcome",
                                                                    "response_status",
                                                                    "duration_ms",
                                                                    "error",
                                                                    "resolved_ip",
                                                                    "created_at"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "webhook_endpoint_id",
                                                "event_id",
                                                "event_type",
                                                "status",
                                                "attempts",
                                                "max_attempts",
                                                "response_status",
                                                "duration_ms",
                                                "error",
                                                "call_id",
                                                "assistant_id",
                                                "next_attempt_at",
                                                "delivered_at",
                                                "failed_at",
                                                "redelivery_of_id",
                                                "created_at",
                                                "payload",
                                                "request_headers",
                                                "response_headers",
                                                "response_body",
                                                "attempt_log"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "invalid_state"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Only a completed or failed delivery can be replayed."
                                                },
                                                "documentation_url": {
                                                    "type": "string",
                                                    "const": "https://docs.callagent.dev/webhooks#redelivery"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "message",
                                                "documentation_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhooks/events": {
            "get": {
                "operationId": "v1.webhooks.events",
                "summary": "The event types an endpoint can subscribe to (§65), grouped for display",
                "tags": [
                    "WebhookEndpoint"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "value": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "group": {
                                                        "type": "string",
                                                        "enum": [
                                                            "Assistant",
                                                            "Call",
                                                            "Speech",
                                                            "Tools",
                                                            "Transfer",
                                                            "Recording",
                                                            "Analysis",
                                                            "Campaign",
                                                            "Operator",
                                                            "Billing"
                                                        ]
                                                    },
                                                    "high_volume": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "value",
                                                    "label",
                                                    "group",
                                                    "high_volume"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "operationId": "v1.webhooks.index",
                "summary": "List webhook endpoints",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEndpointResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.webhooks.store",
                "description": "The response is the **only** time the signing secret is returned. Store it\nimmediately; afterwards it can be rotated but never read back.",
                "summary": "Create a webhook endpoint",
                "tags": [
                    "WebhookEndpoint"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 2048
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "events": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "maxLength": 64
                                        }
                                    },
                                    "headers": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "assistant_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "max_attempts": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 12
                                    },
                                    "timeout_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 60
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "name",
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "webhook_endpoint"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "events": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "assistant_ids": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "headers": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "consecutive_failures": {
                                                    "type": "integer"
                                                },
                                                "max_attempts": {
                                                    "type": "integer"
                                                },
                                                "timeout_seconds": {
                                                    "type": "integer"
                                                },
                                                "api_version": {
                                                    "type": "string"
                                                },
                                                "secret_rotated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "secret_overlap_until": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_success_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_failure_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "disabled_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "name",
                                                "url",
                                                "description",
                                                "events",
                                                "assistant_ids",
                                                "headers",
                                                "active",
                                                "status",
                                                "consecutive_failures",
                                                "max_attempts",
                                                "timeout_seconds",
                                                "api_version",
                                                "secret_rotated_at",
                                                "secret_overlap_until",
                                                "last_success_at",
                                                "last_failure_at",
                                                "disabled_reason",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        },
                                        "secret": {
                                            "type": "string"
                                        },
                                        "secret_notice": {
                                            "type": "string",
                                            "const": "Store this signing secret now. It cannot be retrieved again — only rotated."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "secret",
                                        "secret_notice"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/webhooks/{webhook}": {
            "get": {
                "operationId": "v1.webhooks.show",
                "summary": "Retrieve one webhook endpoint",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "put": {
                "operationId": "v1.webhooks.update",
                "summary": "Update a webhook endpoint. The signing secret is not settable here",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 2048
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "headers": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "assistant_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "max_attempts": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 12
                                    },
                                    "timeout_seconds": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 60
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "active": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.webhooks.destroy",
                "summary": "Delete a webhook endpoint. Queued deliveries for it are skipped, not sent",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhooks/{webhook}/rotate-secret": {
            "post": {
                "operationId": "v1.webhooks.rotate-secret",
                "description": "The previous secret keeps signing alongside the new one for\n`overlap_hours`, so a rolling deploy of your verifier does not drop events.\nPass 0 to revoke the old secret immediately.",
                "summary": "Rotate the signing secret",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "overlap_hours": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 168
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "webhook_endpoint"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "events": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "assistant_ids": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "headers": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "consecutive_failures": {
                                                    "type": "integer"
                                                },
                                                "max_attempts": {
                                                    "type": "integer"
                                                },
                                                "timeout_seconds": {
                                                    "type": "integer"
                                                },
                                                "api_version": {
                                                    "type": "string"
                                                },
                                                "secret_rotated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "secret_overlap_until": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_success_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_failure_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "disabled_reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "name",
                                                "url",
                                                "description",
                                                "events",
                                                "assistant_ids",
                                                "headers",
                                                "active",
                                                "status",
                                                "consecutive_failures",
                                                "max_attempts",
                                                "timeout_seconds",
                                                "api_version",
                                                "secret_rotated_at",
                                                "secret_overlap_until",
                                                "last_success_at",
                                                "last_failure_at",
                                                "disabled_reason",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        },
                                        "secret": {
                                            "type": "string"
                                        },
                                        "secret_notice": {
                                            "type": "string",
                                            "const": "Store this signing secret now. It cannot be retrieved again."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "secret",
                                        "secret_notice"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhooks/{webhook}/test": {
            "post": {
                "operationId": "v1.webhooks.test",
                "summary": "Send a signed test event so you can verify your signature check end to end",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhook",
                        "in": "path",
                        "required": true,
                        "description": "The webhook ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "object": {
                                                    "type": "string",
                                                    "const": "webhook_delivery"
                                                },
                                                "webhook_endpoint_id": {
                                                    "type": "string"
                                                },
                                                "event_id": {
                                                    "type": "string"
                                                },
                                                "event_type": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "attempts": {
                                                    "type": "integer"
                                                },
                                                "max_attempts": {
                                                    "type": "integer"
                                                },
                                                "response_status": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "duration_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "error": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "call_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "assistant_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next_attempt_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "delivered_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "failed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "redelivery_of_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "payload": {
                                                    "type": "array",
                                                    "description": "The captured exchange is already redacted at write time; this is the\n§65 delivery log the customer inspects.",
                                                    "items": {}
                                                },
                                                "request_headers": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "response_headers": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "response_body": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "attempt_log": {
                                                    "anyOf": [
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "attempt": {
                                                                        "type": "integer"
                                                                    },
                                                                    "outcome": {
                                                                        "type": "string"
                                                                    },
                                                                    "response_status": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "duration_ms": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "error": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "resolved_ip": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "created_at": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "attempt",
                                                                    "outcome",
                                                                    "response_status",
                                                                    "duration_ms",
                                                                    "error",
                                                                    "resolved_ip",
                                                                    "created_at"
                                                                ]
                                                            }
                                                        },
                                                        {
                                                            "type": "object"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "object",
                                                "webhook_endpoint_id",
                                                "event_id",
                                                "event_type",
                                                "status",
                                                "attempts",
                                                "max_attempts",
                                                "response_status",
                                                "duration_ms",
                                                "error",
                                                "call_id",
                                                "assistant_id",
                                                "next_attempt_at",
                                                "delivered_at",
                                                "failed_at",
                                                "redelivery_of_id",
                                                "created_at",
                                                "payload",
                                                "request_headers",
                                                "response_headers",
                                                "response_body",
                                                "attempt_log"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ApiKeyResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "api_key"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "display": {
                        "type": "string"
                    },
                    "public_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "scopes": {
                        "type": "array",
                        "items": {}
                    },
                    "allowed_origins": {
                        "type": "array",
                        "items": {}
                    },
                    "allowed_assistant_ids": {
                        "type": "array",
                        "items": {}
                    },
                    "allowed_ips": {
                        "type": "array",
                        "items": {}
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_used_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_used_ip": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "rotated_from_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "usable": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "type",
                    "display",
                    "public_key",
                    "scopes",
                    "allowed_origins",
                    "allowed_assistant_ids",
                    "allowed_ips",
                    "expires_at",
                    "last_used_at",
                    "last_used_ip",
                    "revoked_at",
                    "rotated_from_id",
                    "usable",
                    "created_at"
                ],
                "title": "ApiKeyResource"
            },
            "AssistantFirstMessageMode": {
                "type": "string",
                "enum": [
                    "assistant_speaks_first",
                    "assistant_speaks_first_with_model_generated_message",
                    "assistant_waits_for_user"
                ],
                "x-enumNames": [
                    "AssistantSpeaksFirst",
                    "AssistantSpeaksFirstWithModelGenerated",
                    "AssistantWaitsForUser"
                ],
                "title": "AssistantFirstMessageMode"
            },
            "AssistantMode": {
                "type": "string",
                "description": "§29. A realtime (speech-to-speech) assistant has no separate transcriber or voice stage, so the builder hides those tabs and the resolver omits them.\n",
                "enum": [
                    "pipeline",
                    "realtime"
                ],
                "x-enumNames": [
                    "Pipeline",
                    "Realtime"
                ],
                "title": "AssistantMode"
            },
            "AssistantResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "assistant"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": "string"
                    },
                    "is_published": {
                        "type": "boolean"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "current_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "published_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "has_unpublished_changes": {
                        "type": "boolean"
                    },
                    "mode": {
                        "type": "string"
                    },
                    "language": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "additional_languages": {
                        "type": "array",
                        "items": {}
                    },
                    "first_message": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "first_message_mode": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "system_prompt": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "silence_timeout_seconds": {
                        "type": "integer"
                    },
                    "max_duration_seconds": {
                        "type": "integer"
                    },
                    "template_strictness": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "transcriber": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "voice": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "speech_to_speech_model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "start_speaking_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "stop_speaking_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "artifact_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "analysis_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "observability_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "message_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "keypad_input_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "recording_consent_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "voicemail_detection_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "transfer_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "compliance_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "background_sound": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "background_speech_denoising": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "end_call_phrases": {
                        "type": "array",
                        "items": {}
                    },
                    "idle_messages": {
                        "type": "array",
                        "items": {}
                    },
                    "background_messages": {
                        "type": "array",
                        "items": {}
                    },
                    "pronunciations": {
                        "type": "array",
                        "items": {}
                    },
                    "custom_keywords": {
                        "type": "array",
                        "items": {}
                    },
                    "voice_formatting": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "server": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "hooks": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "fallbacks": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "variables": {
                        "type": "array",
                        "items": {}
                    },
                    "variable_values": {
                        "type": "array",
                        "items": {}
                    },
                    "knowledge_only": {
                        "type": "boolean"
                    },
                    "knowledge_only_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": "array",
                        "items": {}
                    },
                    "tools": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ToolAttachmentResource"
                        }
                    },
                    "knowledge_bases": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/KnowledgeBaseResource"
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_published_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "description",
                    "status",
                    "is_published",
                    "version",
                    "current_version_id",
                    "published_version_id",
                    "has_unpublished_changes",
                    "mode",
                    "language",
                    "additional_languages",
                    "first_message",
                    "first_message_mode",
                    "system_prompt",
                    "silence_timeout_seconds",
                    "max_duration_seconds",
                    "template_strictness",
                    "transcriber",
                    "model",
                    "voice",
                    "speech_to_speech_model",
                    "start_speaking_plan",
                    "stop_speaking_plan",
                    "artifact_plan",
                    "analysis_plan",
                    "observability_plan",
                    "message_plan",
                    "keypad_input_plan",
                    "recording_consent_plan",
                    "voicemail_detection_plan",
                    "transfer_plan",
                    "compliance_plan",
                    "background_sound",
                    "background_speech_denoising",
                    "end_call_phrases",
                    "idle_messages",
                    "background_messages",
                    "pronunciations",
                    "custom_keywords",
                    "voice_formatting",
                    "server",
                    "hooks",
                    "fallbacks",
                    "variables",
                    "variable_values",
                    "knowledge_only",
                    "knowledge_only_plan",
                    "metadata",
                    "created_at",
                    "updated_at",
                    "last_published_at"
                ],
                "title": "AssistantResource"
            },
            "AssistantTemplateStrictness": {
                "type": "string",
                "description": "§128. An undefined variable silently rendering as an empty string is how a prompt becomes \"Hello , your appointment on  is confirmed\" in production. The tenant chooses which failure they prefer.\n| |\n|---|\n| `lenient` <br/> Render an empty string. Fast, and wrong quietly. |\n| `warn` <br/> Render the placeholder untouched and log a warning — the default. |\n| `strict` <br/> Throw. The call setup fails loudly instead of shipping a broken prompt. |",
                "enum": [
                    "lenient",
                    "warn",
                    "strict"
                ],
                "x-enumNames": [
                    "Lenient",
                    "Warn",
                    "Strict"
                ],
                "title": "AssistantTemplateStrictness"
            },
            "AssistantVersionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "assistant_version"
                    },
                    "assistant_id": {
                        "type": "string"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "label": {},
                    "change_summary": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "config_hash": {
                        "type": "string"
                    },
                    "config": {
                        "type": "array",
                        "description": "The full snapshot is large; it is returned only when the caller\nasked for this specific version, not in a listing.",
                        "items": {}
                    },
                    "tool_refs": {
                        "type": "array",
                        "items": {}
                    },
                    "knowledge_base_refs": {
                        "type": "array",
                        "items": {}
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "assistant_id",
                    "version",
                    "label",
                    "change_summary",
                    "config_hash",
                    "tool_refs",
                    "knowledge_base_refs",
                    "published_at"
                ],
                "title": "AssistantVersionResource"
            },
            "CustomerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "customer"
                    },
                    "display_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "company": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "timezone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "source": {
                        "type": "string",
                        "description": "§126: which system owns this record."
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "externally_owned": {
                        "type": "boolean"
                    },
                    "do_not_contact": {
                        "type": "boolean"
                    },
                    "conversation_count": {
                        "type": "integer"
                    },
                    "first_seen_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_seen_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "merged_into_customer_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "identifiers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": "string"
                                },
                                "raw_value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "is_primary": {
                                    "type": "boolean"
                                },
                                "verified": {
                                    "type": "boolean"
                                },
                                "source": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "value",
                                "raw_value",
                                "is_primary",
                                "verified",
                                "source"
                            ]
                        }
                    },
                    "attributes": {
                        "type": "array",
                        "items": {
                            "anyOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "number"
                                },
                                {
                                    "type": "boolean"
                                },
                                {
                                    "type": "array",
                                    "items": {}
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    "conversations": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "channel": {
                                    "type": "string"
                                },
                                "direction": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "call_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "assistant_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "outcome": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "summary": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "duration_seconds": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "started_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "ended_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "channel",
                                "direction",
                                "call_id",
                                "assistant_id",
                                "outcome",
                                "summary",
                                "duration_seconds",
                                "started_at",
                                "ended_at"
                            ]
                        }
                    }
                },
                "required": [
                    "id",
                    "object",
                    "display_name",
                    "name",
                    "first_name",
                    "last_name",
                    "company",
                    "locale",
                    "timezone",
                    "source",
                    "external_id",
                    "externally_owned",
                    "do_not_contact",
                    "conversation_count",
                    "first_seen_at",
                    "last_seen_at",
                    "merged_into_customer_id",
                    "metadata",
                    "notes",
                    "created_at"
                ],
                "title": "CustomerResource"
            },
            "InboundRoute": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "priority": {
                        "type": "integer"
                    },
                    "phone_number_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sip_trunk_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "did_pattern": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "did_match_type": {
                        "type": "string"
                    },
                    "caller_pattern": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "caller_match_type": {
                        "type": "string"
                    },
                    "source_ip_acl": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "time_condition_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "destination_type": {
                        "$ref": "#/components/schemas/TelephonyDestinationType"
                    },
                    "destination_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "destination_value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fallback_destination_type": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TelephonyDestinationType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "fallback_destination_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fallback_destination_value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "recording_mode": {
                        "$ref": "#/components/schemas/TelephonyRecordingMode"
                    },
                    "ring_timeout_seconds": {
                        "type": "integer"
                    },
                    "screen_caller": {
                        "type": "boolean"
                    },
                    "set_variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "name",
                    "description",
                    "enabled",
                    "priority",
                    "phone_number_id",
                    "sip_trunk_id",
                    "did_pattern",
                    "did_match_type",
                    "caller_pattern",
                    "caller_match_type",
                    "source_ip_acl",
                    "time_condition_id",
                    "destination_type",
                    "destination_id",
                    "destination_value",
                    "fallback_destination_type",
                    "fallback_destination_id",
                    "fallback_destination_value",
                    "recording_mode",
                    "ring_timeout_seconds",
                    "screen_caller",
                    "set_variables",
                    "metadata",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ],
                "title": "InboundRoute"
            },
            "IntegrationConnectionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "integration_connection"
                    },
                    "integration": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Config is non-secret by construction; secrets live in the credential row.",
                        "items": {}
                    },
                    "granted_capabilities": {
                        "type": "array",
                        "items": {}
                    },
                    "auth": {
                        "type": "string",
                        "enum": [
                            "oauth2",
                            "api_key",
                            "none"
                        ]
                    },
                    "connected_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_tested_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_test_status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_synced_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "integration",
                    "name",
                    "status",
                    "active",
                    "config",
                    "granted_capabilities",
                    "auth",
                    "connected_at",
                    "last_tested_at",
                    "last_test_status",
                    "last_synced_at",
                    "last_error",
                    "created_at"
                ],
                "title": "IntegrationConnectionResource"
            },
            "KnowledgeBaseResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "knowledge_base"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "namespace": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "embedding": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": "string"
                            },
                            "model": {
                                "type": "string"
                            },
                            "dimensions": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "provider",
                            "model",
                            "dimensions"
                        ]
                    },
                    "chunk_size": {
                        "type": "integer"
                    },
                    "chunk_overlap": {
                        "type": "integer"
                    },
                    "retrieval": {
                        "type": "object",
                        "additionalProperties": {}
                    },
                    "custom_provider": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "knowledge_only": {
                        "type": "boolean"
                    },
                    "knowledge_only_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "status": {
                        "type": "string"
                    },
                    "document_count": {
                        "type": "integer"
                    },
                    "chunk_count": {
                        "type": "integer"
                    },
                    "total_bytes": {
                        "type": "integer"
                    },
                    "metadata": {
                        "type": "array",
                        "items": {}
                    },
                    "documents": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/KnowledgeDocumentResource"
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "description",
                    "provider",
                    "namespace",
                    "embedding",
                    "chunk_size",
                    "chunk_overlap",
                    "retrieval",
                    "custom_provider",
                    "knowledge_only",
                    "knowledge_only_plan",
                    "status",
                    "document_count",
                    "chunk_count",
                    "total_bytes",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "title": "KnowledgeBaseResource"
            },
            "KnowledgeDocumentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "knowledge_document"
                    },
                    "knowledge_base_id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "source_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "source_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "mime_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "extension": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "size_bytes": {
                        "type": "integer"
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "progress": {
                        "type": "integer"
                    },
                    "failure_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "failure_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "extracted_chars": {
                        "type": "integer"
                    },
                    "chunk_count": {
                        "type": "integer"
                    },
                    "token_count": {
                        "type": "integer"
                    },
                    "language": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": "array",
                        "items": {}
                    },
                    "ingested_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "knowledge_base_id",
                    "title",
                    "source_type",
                    "source_url",
                    "mime_type",
                    "extension",
                    "size_bytes",
                    "status",
                    "progress",
                    "failure_code",
                    "failure_reason",
                    "extracted_chars",
                    "chunk_count",
                    "token_count",
                    "language",
                    "metadata",
                    "ingested_at",
                    "created_at"
                ],
                "title": "KnowledgeDocumentResource"
            },
            "KnowledgeProvider": {
                "type": "string",
                "description": "§41. pgvector is the only one implemented; the rest exist so the retriever interface is shaped for them and the UI can say \"coming soon\" honestly instead of silently doing nothing (§188).\n",
                "enum": [
                    "pgvector",
                    "custom",
                    "qdrant",
                    "pinecone",
                    "weaviate"
                ],
                "x-enumNames": [
                    "Pgvector",
                    "Custom",
                    "Qdrant",
                    "Pinecone",
                    "Weaviate"
                ],
                "title": "KnowledgeProvider"
            },
            "KnowledgeQueryRequest": {
                "type": "object",
                "properties": {
                    "query": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 4000
                    },
                    "top_k": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 50
                    },
                    "threshold": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 1
                    },
                    "namespace": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "metadata_filters": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "query"
                ],
                "title": "KnowledgeQueryRequest"
            },
            "McpCachedToolResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "mcp_tool"
                    },
                    "mcp_server_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "input_schema": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "output_schema": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "annotations": {
                        "type": "array",
                        "items": {}
                    },
                    "risk_level": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "requires_confirmation": {
                        "type": "boolean"
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "disabled_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "discovered_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "mcp_server_id",
                    "name",
                    "title",
                    "description",
                    "input_schema",
                    "output_schema",
                    "annotations",
                    "risk_level",
                    "requires_confirmation",
                    "enabled",
                    "disabled_reason",
                    "discovered_at",
                    "expires_at"
                ],
                "title": "McpCachedToolResource"
            },
            "McpConfirmationPolicy": {
                "type": "string",
                "description": "§37. Optional confirmation before a tool call actually executes.\n",
                "enum": [
                    "never",
                    "destructive",
                    "always"
                ],
                "x-enumNames": [
                    "Never",
                    "Destructive",
                    "Always"
                ],
                "title": "McpConfirmationPolicy"
            },
            "McpRiskLevel": {
                "type": "string",
                "description": "§37. Ordered by blast radius — `atLeast()` is what the confirmation policy and the per-organization block list are expressed in.\n",
                "enum": [
                    "read",
                    "write",
                    "destructive",
                    "financial",
                    "privileged"
                ],
                "x-enumNames": [
                    "Read",
                    "Write",
                    "Destructive",
                    "Financial",
                    "Privileged"
                ],
                "title": "McpRiskLevel"
            },
            "McpServerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "mcp_server"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "transport": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_type": {
                        "type": "string"
                    },
                    "headers": {
                        "type": "array",
                        "items": {}
                    },
                    "secret_keys": {
                        "type": "array",
                        "items": {}
                    },
                    "provider_credential_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "oauth_connection_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tool_policy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "allowed_tools": {
                        "type": "array",
                        "items": {}
                    },
                    "denied_tools": {
                        "type": "array",
                        "items": {}
                    },
                    "tool_risk_overrides": {
                        "type": "array",
                        "items": {}
                    },
                    "blocked_risk_levels": {
                        "type": "array",
                        "items": {}
                    },
                    "default_risk_level": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "confirmation_policy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "timeout_seconds": {
                        "type": "integer"
                    },
                    "cache_ttl_seconds": {
                        "type": "integer"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status_message": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "protocol_version": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "server_info": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "capabilities": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "tool_count": {
                        "type": "integer"
                    },
                    "last_discovery_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_health_check_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tools": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/McpCachedToolResource"
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "description",
                    "url",
                    "transport",
                    "auth_type",
                    "headers",
                    "secret_keys",
                    "provider_credential_id",
                    "oauth_connection_id",
                    "tool_policy",
                    "allowed_tools",
                    "denied_tools",
                    "tool_risk_overrides",
                    "blocked_risk_levels",
                    "default_risk_level",
                    "confirmation_policy",
                    "timeout_seconds",
                    "cache_ttl_seconds",
                    "active",
                    "status",
                    "status_message",
                    "protocol_version",
                    "server_info",
                    "capabilities",
                    "tool_count",
                    "last_discovery_at",
                    "last_health_check_at",
                    "created_at"
                ],
                "title": "McpServerResource"
            },
            "McpToolPolicy": {
                "type": "string",
                "description": "§37.\n",
                "enum": [
                    "allow_all",
                    "allow_selected",
                    "deny_selected"
                ],
                "x-enumNames": [
                    "AllowAll",
                    "AllowSelected",
                    "DenySelected"
                ],
                "title": "McpToolPolicy"
            },
            "McpTransport": {
                "type": "string",
                "enum": [
                    "streamable_http",
                    "sse",
                    "stdio"
                ],
                "x-enumNames": [
                    "StreamableHttp",
                    "Sse",
                    "Stdio"
                ],
                "title": "McpTransport"
            },
            "OutboundRoute": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "priority": {
                        "type": "integer"
                    },
                    "destination_pattern": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "match_type": {
                        "type": "string"
                    },
                    "countries": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "min_digits": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "max_digits": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "emergency": {
                        "type": "boolean"
                    },
                    "sip_trunk_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "phone_number_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "failover_sip_trunk_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "strip_digits": {
                        "type": "integer"
                    },
                    "prepend_digits": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "caller_id_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "caller_id_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "blocked": {
                        "type": "boolean"
                    },
                    "block_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "max_call_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "rate_per_minute": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "high_cost": {
                        "type": "boolean"
                    },
                    "set_variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "name",
                    "description",
                    "enabled",
                    "priority",
                    "destination_pattern",
                    "match_type",
                    "countries",
                    "min_digits",
                    "max_digits",
                    "emergency",
                    "sip_trunk_id",
                    "phone_number_id",
                    "failover_sip_trunk_id",
                    "strip_digits",
                    "prepend_digits",
                    "caller_id_number",
                    "caller_id_name",
                    "blocked",
                    "block_reason",
                    "max_call_seconds",
                    "rate_per_minute",
                    "high_cost",
                    "set_variables",
                    "metadata",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ],
                "title": "OutboundRoute"
            },
            "PhoneNumber": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "number": {
                        "type": "string"
                    },
                    "friendly_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider": {
                        "$ref": "#/components/schemas/TelephonyProviderId"
                    },
                    "telephony_account_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_credential_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_number_sid": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_account_sid": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "capabilities": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "region": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "locality": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "number_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address_requirement": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "destination_type": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TelephonyDestinationType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "destination_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "destination_value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fallback_destination_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fallback_destination_type": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TelephonyDestinationType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "assistant_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "squad_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "hook_enabled": {
                        "type": "boolean"
                    },
                    "hook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "hook_timeout_ms": {
                        "type": "integer"
                    },
                    "hook_headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "hook_fallback": {
                        "type": "string"
                    },
                    "hook_last_success_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "hook_last_failure_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "hook_last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_enabled": {
                        "type": "boolean"
                    },
                    "outbound_caller_id_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_caller_id_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sip_trunk_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "caller_id_policy_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sms_enabled": {
                        "type": "boolean"
                    },
                    "sms_assistant_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sms_webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "messaging_service_sid": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "recording_mode": {
                        "$ref": "#/components/schemas/TelephonyRecordingMode"
                    },
                    "recording_consent_required": {
                        "type": "boolean"
                    },
                    "voice_webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status_webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "webhooks_configured_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "webhooks_in_sync": {
                        "type": "boolean"
                    },
                    "max_concurrent_calls": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "status": {
                        "$ref": "#/components/schemas/PhoneNumberStatus"
                    },
                    "inbound_enabled": {
                        "type": "boolean"
                    },
                    "imported_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "purchased_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "released_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_inbound_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_outbound_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "monthly_cost": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "setup_cost": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "currency": {
                        "type": "string"
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "settings": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "phone_number_hook_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "number",
                    "friendly_name",
                    "provider",
                    "telephony_account_id",
                    "provider_credential_id",
                    "provider_number_sid",
                    "provider_account_sid",
                    "provider_metadata",
                    "capabilities",
                    "country",
                    "region",
                    "locality",
                    "number_type",
                    "address_requirement",
                    "destination_type",
                    "destination_id",
                    "destination_value",
                    "fallback_destination_id",
                    "fallback_destination_type",
                    "assistant_id",
                    "squad_id",
                    "hook_enabled",
                    "hook_url",
                    "hook_timeout_ms",
                    "hook_headers",
                    "hook_fallback",
                    "hook_last_success_at",
                    "hook_last_failure_at",
                    "hook_last_error",
                    "outbound_enabled",
                    "outbound_caller_id_number",
                    "outbound_caller_id_name",
                    "sip_trunk_id",
                    "caller_id_policy_id",
                    "sms_enabled",
                    "sms_assistant_id",
                    "sms_webhook_url",
                    "messaging_service_sid",
                    "recording_mode",
                    "recording_consent_required",
                    "voice_webhook_url",
                    "status_webhook_url",
                    "webhooks_configured_at",
                    "webhooks_in_sync",
                    "max_concurrent_calls",
                    "status",
                    "inbound_enabled",
                    "imported_at",
                    "purchased_at",
                    "released_at",
                    "last_inbound_at",
                    "last_outbound_at",
                    "monthly_cost",
                    "setup_cost",
                    "currency",
                    "notes",
                    "settings",
                    "metadata",
                    "created_at",
                    "updated_at",
                    "deleted_at",
                    "phone_number_hook_id"
                ],
                "title": "PhoneNumber"
            },
            "PhoneNumberStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "active",
                    "suspended",
                    "released",
                    "error"
                ],
                "x-enumNames": [
                    "Pending",
                    "Active",
                    "Suspended",
                    "Released",
                    "Error"
                ],
                "title": "PhoneNumberStatus"
            },
            "ProviderCredentialResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "provider_credential"
                    },
                    "class": {
                        "type": "string"
                    },
                    "provider": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "secret_keys": {
                        "type": "array",
                        "items": {}
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "validation_status": {
                        "type": "string"
                    },
                    "validated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "validation_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "capabilities": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "rotated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "class",
                    "provider",
                    "name",
                    "description",
                    "config",
                    "secret_keys",
                    "is_default",
                    "active",
                    "validation_status",
                    "validated_at",
                    "validation_error",
                    "capabilities",
                    "expires_at",
                    "rotated_at",
                    "created_at"
                ],
                "title": "ProviderCredentialResource"
            },
            "SipAuthMode": {
                "type": "string",
                "enum": [
                    "credentials",
                    "ip",
                    "both"
                ],
                "x-enumNames": [
                    "Credentials",
                    "Ip",
                    "Both"
                ],
                "title": "SipAuthMode"
            },
            "SipDiagnostic": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "sip_trunk_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sip_trunk_gateway_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "kind": {
                        "type": "string"
                    },
                    "outcome": {
                        "type": "string"
                    },
                    "response_code": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "response_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "latency_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "target": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "request_trace": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "response_trace": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "context": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "triggered_by_user_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "sip_trunk_id",
                    "sip_trunk_gateway_id",
                    "kind",
                    "outcome",
                    "response_code",
                    "response_reason",
                    "latency_ms",
                    "target",
                    "request_trace",
                    "response_trace",
                    "message",
                    "context",
                    "triggered_by_user_id",
                    "created_at"
                ],
                "title": "SipDiagnostic"
            },
            "SipDid": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "sip_trunk_id": {
                        "type": "string"
                    },
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "pattern": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "match_type": {
                        "type": "string"
                    },
                    "priority": {
                        "type": "integer"
                    },
                    "label": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "phone_number_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "destination_type": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TelephonyDestinationType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "destination_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "destination_value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "sip_trunk_id",
                    "number",
                    "pattern",
                    "match_type",
                    "priority",
                    "label",
                    "country",
                    "phone_number_id",
                    "destination_type",
                    "destination_id",
                    "destination_value",
                    "enabled",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "title": "SipDid"
            },
            "SipDtmfMode": {
                "type": "string",
                "description": "§49. rfc2833 (a.k.a. RFC 4733) is the default because it survives transcoding; inband breaks under any lossy codec; info is a signalling-path fallback for carriers that strip telephone-event.\n",
                "enum": [
                    "rfc2833",
                    "inband",
                    "info"
                ],
                "x-enumNames": [
                    "Rfc2833",
                    "Inband",
                    "Info"
                ],
                "title": "SipDtmfMode"
            },
            "SipLeadingPlus": {
                "type": "string",
                "description": "§8.4 \"leading plus behavior\". Carriers disagree violently about whether an outbound Request-URI user should be `+4917612345678`, `4917612345678` or `004917612345678`, and getting it wrong is the single most common reason a new trunk returns 404 on every call.\n",
                "enum": [
                    "keep",
                    "strip",
                    "add",
                    "international_prefix"
                ],
                "x-enumNames": [
                    "Keep",
                    "Strip",
                    "Add",
                    "InternationalPrefix"
                ],
                "title": "SipLeadingPlus"
            },
            "SipSrtpPolicy": {
                "type": "string",
                "enum": [
                    "disabled",
                    "optional",
                    "required"
                ],
                "x-enumNames": [
                    "Disabled",
                    "Optional",
                    "Required"
                ],
                "title": "SipSrtpPolicy"
            },
            "SipTransport": {
                "type": "string",
                "enum": [
                    "udp",
                    "tcp",
                    "tls"
                ],
                "x-enumNames": [
                    "Udp",
                    "Tcp",
                    "Tls"
                ],
                "title": "SipTransport"
            },
            "SipTrunk": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider": {
                        "$ref": "#/components/schemas/TelephonyProviderId"
                    },
                    "telephony_account_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_credential_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "direction": {
                        "$ref": "#/components/schemas/SipTrunkDirection"
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "auth_mode": {
                        "$ref": "#/components/schemas/SipAuthMode"
                    },
                    "username": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "auth_username": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "realm": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "from_user": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "from_domain": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "proxy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_proxy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "contact_host": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "register": {
                        "type": "boolean"
                    },
                    "register_expiry_seconds": {
                        "type": "integer"
                    },
                    "register_transport": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/SipTransport"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "register_proxy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "register_on_startup": {
                        "type": "boolean"
                    },
                    "retry_seconds": {
                        "type": "integer"
                    },
                    "registered_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "registration_expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "transport": {
                        "$ref": "#/components/schemas/SipTransport"
                    },
                    "srtp_policy": {
                        "$ref": "#/components/schemas/SipSrtpPolicy"
                    },
                    "verify_tls_peer": {
                        "type": "boolean"
                    },
                    "tls_sni": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tls_version": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "codecs": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "dtmf_mode": {
                        "$ref": "#/components/schemas/SipDtmfMode"
                    },
                    "dtmf_duration_ms": {
                        "type": "integer"
                    },
                    "inter_digit_delay_ms": {
                        "type": "integer"
                    },
                    "ptime_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "bypass_media": {
                        "type": "boolean"
                    },
                    "late_negotiation": {
                        "type": "boolean"
                    },
                    "comfort_noise": {
                        "type": "boolean"
                    },
                    "options_ping_enabled": {
                        "type": "boolean"
                    },
                    "options_ping_seconds": {
                        "type": "integer"
                    },
                    "keepalive_seconds": {
                        "type": "integer"
                    },
                    "nat_keepalive": {
                        "type": "boolean"
                    },
                    "status": {
                        "$ref": "#/components/schemas/SipTrunkStatus"
                    },
                    "status_checked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_response_code": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_latency_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "inbound_source_acl": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "inbound_require_acl": {
                        "type": "boolean"
                    },
                    "inbound_did_source": {
                        "type": "string"
                    },
                    "inbound_did_header": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "inbound_caller_id_source": {
                        "type": "string"
                    },
                    "inbound_strip_plus": {
                        "type": "boolean"
                    },
                    "inbound_number_prefix": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "inbound_strip_digits": {
                        "type": "integer"
                    },
                    "inbound_destination_type": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/TelephonyDestinationType"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "inbound_destination_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "inbound_destination_value": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_caller_id_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_caller_id_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_caller_id_privacy": {
                        "type": "boolean"
                    },
                    "leading_plus": {
                        "$ref": "#/components/schemas/SipLeadingPlus"
                    },
                    "international_prefix": {
                        "type": "string"
                    },
                    "outbound_prefix": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_strip_digits": {
                        "type": "integer"
                    },
                    "sip_uri_template": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "allow_sip_uri_dialing": {
                        "type": "boolean"
                    },
                    "custom_sip_headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "outbound_channel_variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "supports_refer": {
                        "type": "boolean"
                    },
                    "supports_sip_info": {
                        "type": "boolean"
                    },
                    "supports_sip_message": {
                        "type": "boolean"
                    },
                    "supports_sip_notify": {
                        "type": "boolean"
                    },
                    "follow_302_redirects": {
                        "type": "boolean"
                    },
                    "send_pai": {
                        "type": "boolean"
                    },
                    "send_rpid": {
                        "type": "boolean"
                    },
                    "send_diversion_on_transfer": {
                        "type": "boolean"
                    },
                    "max_concurrent_calls": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "max_calls_per_second": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sofia_profile": {
                        "type": "string"
                    },
                    "gateway_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "generated_config": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "generated_config_hash": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "config_applied_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "settings": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "name",
                    "slug",
                    "description",
                    "provider",
                    "telephony_account_id",
                    "provider_credential_id",
                    "direction",
                    "enabled",
                    "auth_mode",
                    "username",
                    "auth_username",
                    "realm",
                    "from_user",
                    "from_domain",
                    "proxy",
                    "outbound_proxy",
                    "contact_host",
                    "register",
                    "register_expiry_seconds",
                    "register_transport",
                    "register_proxy",
                    "register_on_startup",
                    "retry_seconds",
                    "registered_at",
                    "registration_expires_at",
                    "transport",
                    "srtp_policy",
                    "verify_tls_peer",
                    "tls_sni",
                    "tls_version",
                    "codecs",
                    "dtmf_mode",
                    "dtmf_duration_ms",
                    "inter_digit_delay_ms",
                    "ptime_ms",
                    "bypass_media",
                    "late_negotiation",
                    "comfort_noise",
                    "options_ping_enabled",
                    "options_ping_seconds",
                    "keepalive_seconds",
                    "nat_keepalive",
                    "status",
                    "status_checked_at",
                    "last_response_code",
                    "last_latency_ms",
                    "last_error",
                    "consecutive_failures",
                    "inbound_source_acl",
                    "inbound_require_acl",
                    "inbound_did_source",
                    "inbound_did_header",
                    "inbound_caller_id_source",
                    "inbound_strip_plus",
                    "inbound_number_prefix",
                    "inbound_strip_digits",
                    "inbound_destination_type",
                    "inbound_destination_id",
                    "inbound_destination_value",
                    "outbound_caller_id_number",
                    "outbound_caller_id_name",
                    "outbound_caller_id_privacy",
                    "leading_plus",
                    "international_prefix",
                    "outbound_prefix",
                    "outbound_strip_digits",
                    "sip_uri_template",
                    "allow_sip_uri_dialing",
                    "custom_sip_headers",
                    "outbound_channel_variables",
                    "supports_refer",
                    "supports_sip_info",
                    "supports_sip_message",
                    "supports_sip_notify",
                    "follow_302_redirects",
                    "send_pai",
                    "send_rpid",
                    "send_diversion_on_transfer",
                    "max_concurrent_calls",
                    "max_calls_per_second",
                    "sofia_profile",
                    "gateway_name",
                    "generated_config",
                    "generated_config_hash",
                    "config_applied_at",
                    "settings",
                    "metadata",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ],
                "title": "SipTrunk"
            },
            "SipTrunkDirection": {
                "type": "string",
                "enum": [
                    "inbound",
                    "outbound",
                    "both"
                ],
                "x-enumNames": [
                    "Inbound",
                    "Outbound",
                    "Both"
                ],
                "title": "SipTrunkDirection"
            },
            "SipTrunkGateway": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "sip_trunk_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "host": {
                        "type": "string"
                    },
                    "port": {
                        "type": "integer"
                    },
                    "transport": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/SipTransport"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "priority": {
                        "type": "integer"
                    },
                    "weight": {
                        "type": "integer"
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "failover_only": {
                        "type": "boolean"
                    },
                    "max_concurrent_calls": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "username": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "realm": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "outbound_proxy": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "register": {
                        "type": "boolean"
                    },
                    "status": {
                        "$ref": "#/components/schemas/SipTrunkStatus"
                    },
                    "status_checked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_response_code": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_latency_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "sip_trunk_id",
                    "name",
                    "host",
                    "port",
                    "transport",
                    "priority",
                    "weight",
                    "enabled",
                    "failover_only",
                    "max_concurrent_calls",
                    "username",
                    "realm",
                    "outbound_proxy",
                    "register",
                    "status",
                    "status_checked_at",
                    "last_response_code",
                    "last_latency_ms",
                    "last_error",
                    "consecutive_failures",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "title": "SipTrunkGateway"
            },
            "SipTrunkStatus": {
                "type": "string",
                "enum": [
                    "unknown",
                    "up",
                    "down",
                    "registering",
                    "failed",
                    "disabled"
                ],
                "x-enumNames": [
                    "Unknown",
                    "Up",
                    "Down",
                    "Registering",
                    "Failed",
                    "Disabled"
                ],
                "title": "SipTrunkStatus"
            },
            "SquadDestinationType": {
                "type": "string",
                "description": "§45.\n",
                "enum": [
                    "assistant",
                    "squad",
                    "human_queue",
                    "dynamic",
                    "end"
                ],
                "x-enumNames": [
                    "Assistant",
                    "Squad",
                    "HumanQueue",
                    "Dynamic",
                    "End"
                ],
                "title": "SquadDestinationType"
            },
            "SquadHandoffContextMode": {
                "type": "string",
                "description": "§46. How much of the conversation the receiving assistant inherits.\n",
                "enum": [
                    "all_messages",
                    "last_n",
                    "user_only",
                    "user_assistant",
                    "summary",
                    "none"
                ],
                "x-enumNames": [
                    "AllMessages",
                    "LastN",
                    "UserOnly",
                    "UserAssistant",
                    "Summary",
                    "None"
                ],
                "title": "SquadHandoffContextMode"
            },
            "SquadResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "squad"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_published": {
                        "type": "boolean"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "current_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "entry_assistant_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "handoff_context_mode": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "handoff_context_size": {
                        "type": "integer"
                    },
                    "handoff_extract_variables": {
                        "type": "array",
                        "items": {}
                    },
                    "silent_handoff": {
                        "type": "boolean"
                    },
                    "handoff_message": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": "array",
                        "items": {}
                    },
                    "members": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "assistant_id": {
                                    "type": "string"
                                },
                                "assistant_version_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "pin_mode": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "alias": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "role": {
                                    "type": "string"
                                },
                                "enabled": {
                                    "type": "boolean"
                                },
                                "sort_order": {
                                    "type": "integer"
                                },
                                "overrides": {
                                    "type": "array",
                                    "items": {}
                                }
                            },
                            "required": [
                                "id",
                                "assistant_id",
                                "assistant_version_id",
                                "pin_mode",
                                "alias",
                                "role",
                                "enabled",
                                "sort_order",
                                "overrides"
                            ]
                        }
                    },
                    "routes": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "from_squad_member_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "trigger": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "trigger_value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "condition": {
                                    "type": "array",
                                    "items": {}
                                },
                                "destination_type": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_assistant_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_squad_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_queue_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_expression": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "context_mode": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "context_size": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "extract_variables": {
                                    "type": "array",
                                    "items": {}
                                },
                                "silent": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                },
                                "message": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "priority": {
                                    "type": "integer"
                                },
                                "enabled": {
                                    "type": "boolean"
                                }
                            },
                            "required": [
                                "id",
                                "name",
                                "from_squad_member_id",
                                "trigger",
                                "trigger_value",
                                "condition",
                                "destination_type",
                                "destination_assistant_id",
                                "destination_squad_id",
                                "destination_queue_id",
                                "destination_expression",
                                "context_mode",
                                "context_size",
                                "extract_variables",
                                "silent",
                                "message",
                                "priority",
                                "enabled"
                            ]
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "description",
                    "status",
                    "is_published",
                    "version",
                    "current_version_id",
                    "entry_assistant_id",
                    "handoff_context_mode",
                    "handoff_context_size",
                    "handoff_extract_variables",
                    "silent_handoff",
                    "handoff_message",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "title": "SquadResource"
            },
            "SquadRouteTrigger": {
                "type": "string",
                "description": "§45.\n",
                "enum": [
                    "tool",
                    "intent",
                    "variable",
                    "condition",
                    "always"
                ],
                "x-enumNames": [
                    "Tool",
                    "Intent",
                    "Variable",
                    "Condition",
                    "Always"
                ],
                "title": "SquadRouteTrigger"
            },
            "StoreAssistantRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "mode": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AssistantMode"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "language": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16
                    },
                    "additional_languages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 16
                        }
                    },
                    "first_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 5000
                    },
                    "first_message_mode": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AssistantFirstMessageMode"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "system_prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100000
                    },
                    "template_strictness": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AssistantTemplateStrictness"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "silence_timeout_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 600
                    },
                    "max_duration_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 10,
                        "maximum": 3600
                    },
                    "transcriber": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 48
                            }
                        }
                    },
                    "model": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 48
                            },
                            "model": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 96
                            }
                        }
                    },
                    "voice": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 48
                            }
                        }
                    },
                    "speech_to_speech_model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "start_speaking_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "stop_speaking_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "artifact_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "analysis_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "observability_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "message_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "keypad_input_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "recording_consent_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "voicemail_detection_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "transfer_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "compliance_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "background_sound": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "background_speech_denoising": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "server": {
                        "type": "object",
                        "properties": {
                            "url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "maxLength": 2048
                            }
                        }
                    },
                    "hooks": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "fallbacks": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "end_call_phrases": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    "idle_messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "background_messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "pronunciations": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "custom_keywords": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "voice_formatting": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                                },
                                "source": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "static",
                                        "call",
                                        "contact",
                                        "webhook",
                                        "tool",
                                        "handoff",
                                        "environment",
                                        null
                                    ]
                                }
                            }
                        }
                    },
                    "variable_values": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "knowledge_only": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "knowledge_only_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "tools": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Tenancy: `exists` is scoped by hand because the global Eloquent\nscope does not apply to the validator's own query.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "tool_id": {
                                    "type": "string"
                                },
                                "pin_mode": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/ToolPinMode"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "tool_version_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "alias": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 96
                                },
                                "enabled": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "tool_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "knowledge_base_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "structured_output_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreAssistantRequest"
            },
            "StoreKnowledgeBaseRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "provider": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/KnowledgeProvider"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "namespace": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "embedding_provider": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 48
                    },
                    "embedding_model": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 96
                    },
                    "chunk_size": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 64,
                        "maximum": 4000
                    },
                    "chunk_overlap": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2000
                    },
                    "retrieval": {
                        "type": "object",
                        "properties": {
                            "top_k": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1,
                                "maximum": 50
                            },
                            "threshold": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 1
                            },
                            "vector_weight": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 1
                            },
                            "lexical_weight": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 1
                            },
                            "max_context_chars": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 200,
                                "maximum": 100000
                            },
                            "citations": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "inline",
                                    "footnote",
                                    "none",
                                    null
                                ]
                            },
                            "metadata_filters": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "custom_provider": {
                        "type": "object",
                        "properties": {
                            "url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "maxLength": 2048
                            },
                            "headers": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            },
                            "timeout_seconds": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1,
                                "maximum": 60
                            }
                        }
                    },
                    "knowledge_only": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "knowledge_only_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreKnowledgeBaseRequest"
            },
            "StoreKnowledgeDocumentRequest": {
                "type": "object",
                "properties": {
                    "source_type": {
                        "type": "string",
                        "enum": [
                            "file",
                            "url",
                            "text"
                        ]
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "file": {
                        "type": "string",
                        "format": "binary",
                        "contentMediaType": "application/octet-stream",
                        "description": "The extension list is the one the extractor genuinely handles —\naccepting a PDF we cannot parse would be a silent ingestion of\nnothing (§188)."
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "text": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000000
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "source_type"
                ],
                "title": "StoreKnowledgeDocumentRequest"
            },
            "StoreMcpServerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "transport": {
                        "$ref": "#/components/schemas/McpTransport"
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "stdio_config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "auth_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "none",
                            "static_headers",
                            "bearer",
                            "oauth",
                            "credential",
                            null
                        ]
                    },
                    "headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "bearer_token": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Secrets arrive as their own field and are encrypted before storage;\nthey are never echoed back by the resource.",
                        "maxLength": 4096
                    },
                    "provider_credential_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "oauth_connection_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tool_policy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpToolPolicy"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "allowed_tools": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    "denied_tools": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    "tool_risk_overrides": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "blocked_risk_levels": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/McpRiskLevel"
                        }
                    },
                    "default_risk_level": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpRiskLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "confirmation_policy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpConfirmationPolicy"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "timeout_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 120
                    },
                    "cache_ttl_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 60,
                        "maximum": 86400
                    },
                    "active": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name",
                    "transport"
                ],
                "title": "StoreMcpServerRequest"
            },
            "StoreSquadRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "entry_assistant_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "handoff_context_mode": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/SquadHandoffContextMode"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "handoff_context_size": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 200
                    },
                    "handoff_extract_variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "silent_handoff": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "handoff_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "members": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "assistant_id": {
                                    "type": "string"
                                },
                                "role": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "entry",
                                        "member",
                                        null
                                    ]
                                },
                                "alias": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 96
                                },
                                "pin_mode": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/ToolPinMode"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "assistant_version_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "enabled": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "routes": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "trigger": {
                                    "$ref": "#/components/schemas/SquadRouteTrigger"
                                },
                                "trigger_value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "condition": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "destination_type": {
                                    "$ref": "#/components/schemas/SquadDestinationType"
                                },
                                "destination_assistant_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_squad_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_queue_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_expression": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 2000
                                },
                                "context_mode": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/SquadHandoffContextMode"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "context_size": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 200
                                },
                                "extract_variables": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "silent": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                },
                                "message": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 2000
                                },
                                "priority": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 10000
                                },
                                "enabled": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                }
                            }
                        }
                    }
                },
                "required": [
                    "name"
                ],
                "title": "StoreSquadRequest"
            },
            "StoreStructuredOutputRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "key": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 96
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    },
                    "template": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "summary",
                            "sentiment",
                            "success",
                            "follow_up",
                            "lead_qualification",
                            "customer_fields",
                            "appointment",
                            "order_data",
                            "compliance",
                            null
                        ]
                    },
                    "target": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "call",
                            "chat",
                            "both",
                            null
                        ]
                    },
                    "schema": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "minItems": 1
                    },
                    "prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20000
                    },
                    "model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "enabled": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name",
                    "schema"
                ],
                "title": "StoreStructuredOutputRequest"
            },
            "StoreToolRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "key": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
                        "maxLength": 96
                    },
                    "description": {
                        "type": "string",
                        "maxLength": 2000
                    },
                    "type": {
                        "$ref": "#/components/schemas/ToolType"
                    },
                    "parameters_schema": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "rejection_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "server": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "is_async": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "timeout_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 120
                    },
                    "requires_confirmation": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "risk_level": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpRiskLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "name",
                    "description",
                    "type"
                ],
                "title": "StoreToolRequest"
            },
            "StructuredOutputResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "structured_output"
                    },
                    "name": {
                        "type": "string"
                    },
                    "key": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "template": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "target": {
                        "type": "string"
                    },
                    "schema": {
                        "type": "array",
                        "items": {}
                    },
                    "prompt": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_published": {
                        "type": "boolean"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "current_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "metadata": {
                        "type": "array",
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "key",
                    "description",
                    "template",
                    "target",
                    "schema",
                    "prompt",
                    "model",
                    "status",
                    "is_published",
                    "version",
                    "current_version_id",
                    "enabled",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "title": "StructuredOutputResource"
            },
            "TelephonyAccount": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "organization_id": {
                        "type": "string"
                    },
                    "provider": {
                        "$ref": "#/components/schemas/TelephonyProviderId"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_credential_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_account_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_account_label": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_subaccount": {
                        "type": "boolean"
                    },
                    "parent_external_account_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "voice_webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status_webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sms_webhook_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "health_status": {
                        "type": "string"
                    },
                    "health_checked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "health_message": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "numbers_synced_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "numbers_count": {
                        "type": "integer"
                    },
                    "capabilities": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "settings": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "deleted_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "organization_id",
                    "provider",
                    "name",
                    "description",
                    "provider_credential_id",
                    "external_account_id",
                    "external_account_label",
                    "is_subaccount",
                    "parent_external_account_id",
                    "voice_webhook_url",
                    "status_webhook_url",
                    "sms_webhook_url",
                    "is_default",
                    "active",
                    "health_status",
                    "health_checked_at",
                    "health_message",
                    "numbers_synced_at",
                    "numbers_count",
                    "capabilities",
                    "settings",
                    "metadata",
                    "created_at",
                    "updated_at",
                    "deleted_at"
                ],
                "title": "TelephonyAccount"
            },
            "TelephonyDestinationType": {
                "type": "string",
                "description": "Where an inbound call goes once the tenant has been resolved (§10, §66). Deliberately a string enum plus a nullable ULID rather than a real polymorphic relation: the target tables (assistants, queues, ivrs, ring_groups, extensions) are owned by four different agents and land in four different migration ranges, so a hard foreign key here would force a build order that does not exist.\n",
                "enum": [
                    "assistant",
                    "squad",
                    "queue",
                    "ivr",
                    "ring_group",
                    "extension",
                    "voicemail",
                    "external",
                    "sip_uri",
                    "hook"
                ],
                "x-enumNames": [
                    "Assistant",
                    "Squad",
                    "Queue",
                    "Ivr",
                    "RingGroup",
                    "Extension",
                    "Voicemail",
                    "External",
                    "SipUri",
                    "Hook"
                ],
                "title": "TelephonyDestinationType"
            },
            "TelephonyProviderId": {
                "type": "string",
                "description": "§8.1. The telephony providers CallAgent can terminate or originate through. The value is what is stored in `phone_numbers.provider`, `sip_trunks.provider` and `provider_credentials.provider` — keep them stable, they are persisted.\n",
                "enum": [
                    "twilio",
                    "telnyx",
                    "didww",
                    "plivo",
                    "zadarma",
                    "didlogic",
                    "chime",
                    "byo_sip",
                    "custom_sip"
                ],
                "x-enumNames": [
                    "Twilio",
                    "Telnyx",
                    "Didww",
                    "Plivo",
                    "Zadarma",
                    "Didlogic",
                    "Chime",
                    "ByoSip",
                    "CustomSip"
                ],
                "title": "TelephonyProviderId"
            },
            "TelephonyRecordingMode": {
                "type": "string",
                "description": "§51. `dual_channel` is what makes speaker-attributed transcripts and accurate talk-over metrics possible, so it is preferred wherever the carrier offers it.\n",
                "enum": [
                    "disabled",
                    "mono",
                    "dual_channel",
                    "inherit"
                ],
                "x-enumNames": [
                    "Disabled",
                    "Mono",
                    "DualChannel",
                    "Inherit"
                ],
                "title": "TelephonyRecordingMode"
            },
            "ToolAttachmentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "key": {
                        "type": "string"
                    },
                    "type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "pin_mode": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tool_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "alias": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "sort_order": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "key",
                    "type",
                    "pin_mode",
                    "tool_version_id",
                    "alias",
                    "enabled",
                    "sort_order"
                ],
                "title": "ToolAttachmentResource"
            },
            "ToolPinMode": {
                "type": "string",
                "description": "§109. \"latest\" resolves at publish time, not at call time — otherwise editing a tool would silently change the behaviour of an already-published assistant.\n",
                "enum": [
                    "latest",
                    "pinned"
                ],
                "x-enumNames": [
                    "Latest",
                    "Pinned"
                ],
                "title": "ToolPinMode"
            },
            "ToolResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "tool"
                    },
                    "name": {
                        "type": "string"
                    },
                    "key": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_published": {
                        "type": "boolean"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "current_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "parameters_schema": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "rejection_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "server": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "is_async": {
                        "type": "boolean"
                    },
                    "timeout_seconds": {
                        "type": "integer"
                    },
                    "requires_confirmation": {
                        "type": "boolean"
                    },
                    "risk_level": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "mcp_server_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "mcp_tool_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": "array",
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "key",
                    "description",
                    "type",
                    "status",
                    "is_published",
                    "version",
                    "current_version_id",
                    "parameters_schema",
                    "config",
                    "messages",
                    "rejection_plan",
                    "server",
                    "is_async",
                    "timeout_seconds",
                    "requires_confirmation",
                    "risk_level",
                    "mcp_server_id",
                    "mcp_tool_name",
                    "metadata",
                    "created_at",
                    "updated_at"
                ],
                "title": "ToolResource"
            },
            "ToolType": {
                "type": "string",
                "description": "§32. The type drives everything downstream: which form fields the builder shows, which validator runs, and whether the Voice Gateway executes the tool in-process, over HTTP, or in an isolated sandbox worker.\n",
                "enum": [
                    "api_request",
                    "function",
                    "transfer_call",
                    "handoff",
                    "end_call",
                    "sms",
                    "dtmf",
                    "voicemail",
                    "sip_request",
                    "query",
                    "knowledge_base",
                    "mcp",
                    "google_calendar_create_event",
                    "google_calendar_availability",
                    "google_sheets_append_row",
                    "slack_send_message",
                    "gohighlevel_availability",
                    "gohighlevel_event_create",
                    "gohighlevel_contact_create",
                    "gohighlevel_contact_get",
                    "bash",
                    "computer",
                    "text_editor",
                    "client_side",
                    "custom_provider"
                ],
                "x-enumNames": [
                    "ApiRequest",
                    "Function",
                    "TransferCall",
                    "Handoff",
                    "EndCall",
                    "Sms",
                    "Dtmf",
                    "Voicemail",
                    "SipRequest",
                    "Query",
                    "KnowledgeBase",
                    "Mcp",
                    "GoogleCalendarCreateEvent",
                    "GoogleCalendarAvailability",
                    "GoogleSheetsAppendRow",
                    "SlackSendMessage",
                    "GoHighLevelAvailability",
                    "GoHighLevelEventCreate",
                    "GoHighLevelContactCreate",
                    "GoHighLevelContactGet",
                    "Bash",
                    "Computer",
                    "TextEditor",
                    "ClientSide",
                    "CustomProvider"
                ],
                "title": "ToolType"
            },
            "ToolVersionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "tool_version"
                    },
                    "tool_id": {
                        "type": "string"
                    },
                    "version": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "key": {
                        "type": "string"
                    },
                    "type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "parameters_schema": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "config_hash": {
                        "type": "string"
                    },
                    "change_summary": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "tool_id",
                    "version",
                    "name",
                    "key",
                    "type",
                    "description",
                    "parameters_schema",
                    "config",
                    "config_hash",
                    "change_summary",
                    "published_at"
                ],
                "title": "ToolVersionResource"
            },
            "UpdateAssistantRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "mode": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AssistantMode"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "language": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16
                    },
                    "additional_languages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 16
                        }
                    },
                    "first_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 5000
                    },
                    "first_message_mode": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AssistantFirstMessageMode"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "system_prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100000
                    },
                    "template_strictness": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/AssistantTemplateStrictness"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "silence_timeout_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 600
                    },
                    "max_duration_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 10,
                        "maximum": 3600
                    },
                    "transcriber": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 48
                            }
                        }
                    },
                    "model": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 48
                            },
                            "model": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 96
                            }
                        }
                    },
                    "voice": {
                        "type": "object",
                        "properties": {
                            "provider": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 48
                            }
                        }
                    },
                    "speech_to_speech_model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "start_speaking_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "stop_speaking_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "artifact_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "analysis_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "observability_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "message_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "keypad_input_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "recording_consent_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "voicemail_detection_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "transfer_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "compliance_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "background_sound": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "background_speech_denoising": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "server": {
                        "type": "object",
                        "properties": {
                            "url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "maxLength": 2048
                            }
                        }
                    },
                    "hooks": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "fallbacks": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "end_call_phrases": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    "idle_messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "background_messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "pronunciations": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "custom_keywords": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "voice_formatting": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                                },
                                "source": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "static",
                                        "call",
                                        "contact",
                                        "webhook",
                                        "tool",
                                        "handoff",
                                        "environment",
                                        null
                                    ]
                                }
                            }
                        }
                    },
                    "variable_values": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "knowledge_only": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "knowledge_only_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "tools": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "Tenancy: `exists` is scoped by hand because the global Eloquent\nscope does not apply to the validator's own query.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "tool_id": {
                                    "type": "string"
                                },
                                "pin_mode": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/ToolPinMode"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "tool_version_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "alias": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 96
                                },
                                "enabled": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "tool_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "knowledge_base_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "structured_output_ids": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "UpdateAssistantRequest"
            },
            "UpdateKnowledgeBaseRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "provider": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/KnowledgeProvider"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "namespace": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "embedding_provider": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 48
                    },
                    "embedding_model": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 96
                    },
                    "chunk_size": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 64,
                        "maximum": 4000
                    },
                    "chunk_overlap": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 2000
                    },
                    "retrieval": {
                        "type": "object",
                        "properties": {
                            "top_k": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1,
                                "maximum": 50
                            },
                            "threshold": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 1
                            },
                            "vector_weight": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 1
                            },
                            "lexical_weight": {
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "minimum": 0,
                                "maximum": 1
                            },
                            "max_context_chars": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 200,
                                "maximum": 100000
                            },
                            "citations": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "inline",
                                    "footnote",
                                    "none",
                                    null
                                ]
                            },
                            "metadata_filters": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "custom_provider": {
                        "type": "object",
                        "properties": {
                            "url": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "uri",
                                "maxLength": 2048
                            },
                            "headers": {
                                "type": [
                                    "array",
                                    "null"
                                ],
                                "items": {
                                    "type": "string"
                                }
                            },
                            "timeout_seconds": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1,
                                "maximum": 60
                            }
                        }
                    },
                    "knowledge_only": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "knowledge_only_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "UpdateKnowledgeBaseRequest"
            },
            "UpdateMcpServerRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "transport": {
                        "$ref": "#/components/schemas/McpTransport"
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "stdio_config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "auth_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "none",
                            "static_headers",
                            "bearer",
                            "oauth",
                            "credential",
                            null
                        ]
                    },
                    "headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "bearer_token": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Secrets arrive as their own field and are encrypted before storage;\nthey are never echoed back by the resource.",
                        "maxLength": 4096
                    },
                    "provider_credential_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "oauth_connection_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tool_policy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpToolPolicy"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "allowed_tools": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    "denied_tools": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string",
                            "maxLength": 255
                        }
                    },
                    "tool_risk_overrides": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "blocked_risk_levels": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "$ref": "#/components/schemas/McpRiskLevel"
                        }
                    },
                    "default_risk_level": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpRiskLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "confirmation_policy": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpConfirmationPolicy"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "timeout_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 120
                    },
                    "cache_ttl_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 60,
                        "maximum": 86400
                    },
                    "active": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "UpdateMcpServerRequest"
            },
            "UpdateSquadRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "entry_assistant_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "handoff_context_mode": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/SquadHandoffContextMode"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "handoff_context_size": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 200
                    },
                    "handoff_extract_variables": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "silent_handoff": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "handoff_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "members": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "assistant_id": {
                                    "type": "string"
                                },
                                "role": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "entry",
                                        "member",
                                        null
                                    ]
                                },
                                "alias": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 96
                                },
                                "pin_mode": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/ToolPinMode"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "assistant_version_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "enabled": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "routes": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "trigger": {
                                    "$ref": "#/components/schemas/SquadRouteTrigger"
                                },
                                "trigger_value": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "condition": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "destination_type": {
                                    "$ref": "#/components/schemas/SquadDestinationType"
                                },
                                "destination_assistant_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_squad_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_queue_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "destination_expression": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 2000
                                },
                                "context_mode": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/SquadHandoffContextMode"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "context_size": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 1,
                                    "maximum": 200
                                },
                                "extract_variables": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "silent": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                },
                                "message": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 2000
                                },
                                "priority": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 10000
                                },
                                "enabled": {
                                    "type": [
                                        "boolean",
                                        "null"
                                    ]
                                }
                            }
                        }
                    }
                },
                "title": "UpdateSquadRequest"
            },
            "UpdateStructuredOutputRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "key": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 96
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    },
                    "template": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "summary",
                            "sentiment",
                            "success",
                            "follow_up",
                            "lead_qualification",
                            "customer_fields",
                            "appointment",
                            "order_data",
                            "compliance",
                            null
                        ]
                    },
                    "target": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "call",
                            "chat",
                            "both",
                            null
                        ]
                    },
                    "schema": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "prompt": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 20000
                    },
                    "model": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "enabled": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "UpdateStructuredOutputRequest"
            },
            "UpdateToolRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "key": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
                        "maxLength": 96
                    },
                    "description": {
                        "type": "string",
                        "maxLength": 2000
                    },
                    "type": {
                        "$ref": "#/components/schemas/ToolType"
                    },
                    "parameters_schema": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "config": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "messages": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "rejection_plan": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "server": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "is_async": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "timeout_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 1,
                        "maximum": 120
                    },
                    "requires_confirmation": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "risk_level": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/McpRiskLevel"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "title": "UpdateToolRequest"
            },
            "WebhookDeliveryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "webhook_delivery"
                    },
                    "webhook_endpoint_id": {
                        "type": "string"
                    },
                    "event_id": {
                        "type": "string"
                    },
                    "event_type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "attempts": {
                        "type": "integer"
                    },
                    "max_attempts": {
                        "type": "integer"
                    },
                    "response_status": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "duration_ms": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "call_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "assistant_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "next_attempt_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "delivered_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "failed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "redelivery_of_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "payload": {
                        "type": "array",
                        "description": "The captured exchange is already redacted at write time; this is the\n§65 delivery log the customer inspects.",
                        "items": {}
                    },
                    "request_headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "response_headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "response_body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "attempt_log": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "attempt": {
                                    "type": "integer"
                                },
                                "outcome": {
                                    "type": "string"
                                },
                                "response_status": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "duration_ms": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "error": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "resolved_ip": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "created_at": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "attempt",
                                "outcome",
                                "response_status",
                                "duration_ms",
                                "error",
                                "resolved_ip",
                                "created_at"
                            ]
                        }
                    }
                },
                "required": [
                    "id",
                    "object",
                    "webhook_endpoint_id",
                    "event_id",
                    "event_type",
                    "status",
                    "attempts",
                    "max_attempts",
                    "response_status",
                    "duration_ms",
                    "error",
                    "call_id",
                    "assistant_id",
                    "next_attempt_at",
                    "delivered_at",
                    "failed_at",
                    "redelivery_of_id",
                    "created_at",
                    "payload",
                    "request_headers",
                    "response_headers",
                    "response_body"
                ],
                "title": "WebhookDeliveryResource"
            },
            "WebhookEndpointResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "object": {
                        "type": "string",
                        "const": "webhook_endpoint"
                    },
                    "name": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "events": {
                        "type": "array",
                        "items": {}
                    },
                    "assistant_ids": {
                        "type": "array",
                        "items": {}
                    },
                    "headers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "status": {
                        "type": "string"
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "max_attempts": {
                        "type": "integer"
                    },
                    "timeout_seconds": {
                        "type": "integer"
                    },
                    "api_version": {
                        "type": "string"
                    },
                    "secret_rotated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "secret_overlap_until": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_success_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_failure_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "disabled_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "object",
                    "name",
                    "url",
                    "description",
                    "events",
                    "assistant_ids",
                    "headers",
                    "active",
                    "status",
                    "consecutive_failures",
                    "max_attempts",
                    "timeout_seconds",
                    "api_version",
                    "secret_rotated_at",
                    "secret_overlap_until",
                    "last_success_at",
                    "last_failure_at",
                    "disabled_reason",
                    "created_at",
                    "updated_at"
                ],
                "title": "WebhookEndpointResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "A CallAgent API key. Private keys (ca_sk_…) are server-side; public keys (ca_pk_…) are exchanged at POST /client-tokens for a short-lived JWT."
            }
        }
    },
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "externalDocs": {
        "description": "Guides, webhook reference and SDK documentation",
        "url": "https://docs.callagent.dev"
    }
}
