{
  "components": {
    "schemas": {
      "Agent": {
        "properties": {
          "channels": {
            "description": "Where people can reach it. One of: `voice`, `chat`, `phone`, `whatsapp`. New words may be added.",
            "items": {
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "direction": {
            "description": "Whether it answers or calls. One of: `inbound`, `outbound`. New words may be added.",
            "title": "Direction",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "description": "What the agent is built to do. One of: `form_filling`, `workflow`, `faq`, `custom`, `desk`. New words may be added.",
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "agent",
            "default": "agent",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "published_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "status": {
            "description": "Only a published agent places calls. One of: `draft`, `published`, `archived`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "description",
          "kind",
          "direction",
          "status",
          "channels",
          "published_at",
          "created_at",
          "updated_at"
        ],
        "title": "Agent",
        "type": "object"
      },
      "AgentCreate": {
        "additionalProperties": false,
        "properties": {
          "definition": {
            "additionalProperties": true,
            "description": "An agent definition, as `GET /v1/agents/{id}/definition` answers with or the console exports.",
            "title": "Definition",
            "type": "object"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its name. The definition's own, made free in the project, unless you say.",
            "title": "Name"
          },
          "project_id": {
            "description": "The project the agent is made in.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "definition"
        ],
        "title": "AgentCreate",
        "type": "object"
      },
      "AgentDefinition": {
        "description": "An agent as a document: everything about how it behaves, and everything outside it by name.\n\nThe console's own export format, so a file exported from one and a definition read from the\nother are the same thing. No credential, no id of another object, no phone number and no domain\ntravels in it: tools, knowledge bases, a calendar and a callback agent are named in\n`references` and bound by name where the definition lands.",
        "properties": {
          "agent": {
            "additionalProperties": true,
            "description": "Its name, kind, direction, channels, prompt, configuration, voice, languages, analysis and knowledge settings.",
            "title": "Agent",
            "type": "object"
          },
          "exported_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Exported At",
            "type": "string"
          },
          "format": {
            "description": "The document's version, `agently.agent/1`.",
            "title": "Format",
            "type": "string"
          },
          "object": {
            "const": "agent_definition",
            "default": "agent_definition",
            "title": "Object",
            "type": "string"
          },
          "references": {
            "additionalProperties": true,
            "description": "Everything outside the agent it uses, by name: `tools`, `knowledge_bases`, `calendar`, `callback_agent`, and the knowledge each specialist or language narrows to.",
            "title": "References",
            "type": "object"
          }
        },
        "required": [
          "format",
          "exported_at",
          "agent",
          "references"
        ],
        "title": "AgentDefinition",
        "type": "object"
      },
      "AgentDefinitionReplace": {
        "additionalProperties": false,
        "properties": {
          "definition": {
            "additionalProperties": true,
            "description": "The agent's new definition. Its kind and direction must be the agent's own.",
            "title": "Definition",
            "type": "object"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A new name, if it is to change.",
            "title": "Name"
          }
        },
        "required": [
          "definition"
        ],
        "title": "AgentDefinitionReplace",
        "type": "object"
      },
      "AgentDeleted": {
        "properties": {
          "deleted": {
            "const": true,
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "const": "agent",
            "default": "agent",
            "title": "Object",
            "type": "string"
          },
          "purges_at": {
            "description": "When it is gone for good. Until then the console can restore it.",
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Purges At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "purges_at"
        ],
        "title": "AgentDeleted",
        "type": "object"
      },
      "AgentDetail": {
        "properties": {
          "analysis_enabled": {
            "title": "Analysis Enabled",
            "type": "boolean"
          },
          "analysis_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for `analysis`.",
            "title": "Analysis Schema",
            "type": "object"
          },
          "channels": {
            "description": "Where people can reach it. One of: `voice`, `chat`, `phone`, `whatsapp`. New words may be added.",
            "items": {
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "collected_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for `collected`.",
            "title": "Collected Schema",
            "type": "object"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "direction": {
            "description": "Whether it answers or calls. One of: `inbound`, `outbound`. New words may be added.",
            "title": "Direction",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "description": "What the agent is built to do. One of: `form_filling`, `workflow`, `faq`, `custom`, `desk`. New words may be added.",
            "title": "Kind",
            "type": "string"
          },
          "languages": {
            "$ref": "#/components/schemas/Languages"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "agent",
            "default": "agent",
            "title": "Object",
            "type": "string"
          },
          "phone_numbers": {
            "description": "The numbers this agent answers or calls from, in the order a call picks from when it names none.",
            "items": {
              "$ref": "#/components/schemas/PhoneNumber"
            },
            "title": "Phone Numbers",
            "type": "array"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "published_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "status": {
            "description": "Only a published agent places calls. One of: `draft`, `published`, `archived`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "variables_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for the `variables` a conversation can start with, and its `version`, which changes when the list changes.",
            "title": "Variables Schema",
            "type": "object"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "description",
          "kind",
          "direction",
          "status",
          "channels",
          "published_at",
          "created_at",
          "updated_at",
          "languages",
          "variables_schema",
          "collected_schema",
          "analysis_enabled",
          "analysis_schema",
          "phone_numbers"
        ],
        "title": "AgentDetail",
        "type": "object"
      },
      "AgentDirection": {
        "enum": [
          "inbound",
          "outbound"
        ],
        "title": "AgentDirection",
        "type": "string"
      },
      "AgentKind": {
        "enum": [
          "form_filling",
          "workflow",
          "faq",
          "custom",
          "desk"
        ],
        "title": "AgentKind",
        "type": "string"
      },
      "AgentList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Agent"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "AgentList",
        "type": "object"
      },
      "AgentPublishRequest": {
        "additionalProperties": false,
        "properties": {
          "note": {
            "default": "",
            "description": "What changed, kept with the version.",
            "maxLength": 500,
            "title": "Note",
            "type": "string"
          }
        },
        "title": "AgentPublishRequest",
        "type": "object"
      },
      "AgentStatus": {
        "enum": [
          "draft",
          "published",
          "archived"
        ],
        "title": "AgentStatus",
        "type": "string"
      },
      "AgentVersionList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AgentVersionObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "AgentVersionList",
        "type": "object"
      },
      "AgentVersionObject": {
        "description": "One published version of an agent: what pinning a conversation to it gets.",
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "note": {
            "description": "What the person who published it said about it.",
            "title": "Note",
            "type": "string"
          },
          "object": {
            "const": "agent_version",
            "default": "agent_version",
            "title": "Object",
            "type": "string"
          },
          "published_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Published At",
            "type": "string"
          },
          "variables_schema": {
            "additionalProperties": true,
            "description": "What a conversation pinned to this version can start with: the agent's `variables_schema`, as this version had it.",
            "title": "Variables Schema",
            "type": "object"
          },
          "version": {
            "description": "Its number: what `agent_version` pins a conversation to.",
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "agent_id",
          "version",
          "note",
          "published_at",
          "variables_schema"
        ],
        "title": "AgentVersionObject",
        "type": "object"
      },
      "AgentWritten": {
        "properties": {
          "analysis_enabled": {
            "title": "Analysis Enabled",
            "type": "boolean"
          },
          "analysis_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for `analysis`.",
            "title": "Analysis Schema",
            "type": "object"
          },
          "channels": {
            "description": "Where people can reach it. One of: `voice`, `chat`, `phone`, `whatsapp`. New words may be added.",
            "items": {
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "collected_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for `collected`.",
            "title": "Collected Schema",
            "type": "object"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "direction": {
            "description": "Whether it answers or calls. One of: `inbound`, `outbound`. New words may be added.",
            "title": "Direction",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "description": "What the agent is built to do. One of: `form_filling`, `workflow`, `faq`, `custom`, `desk`. New words may be added.",
            "title": "Kind",
            "type": "string"
          },
          "languages": {
            "$ref": "#/components/schemas/Languages"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "agent",
            "default": "agent",
            "title": "Object",
            "type": "string"
          },
          "phone_numbers": {
            "description": "The numbers this agent answers or calls from, in the order a call picks from when it names none.",
            "items": {
              "$ref": "#/components/schemas/PhoneNumber"
            },
            "title": "Phone Numbers",
            "type": "array"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "published_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "status": {
            "description": "Only a published agent places calls. One of: `draft`, `published`, `archived`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "unbound": {
            "description": "What the definition names that this project has nothing by that name for — each left out, with what the agent does instead.",
            "items": {
              "$ref": "#/components/schemas/UnboundReference"
            },
            "title": "Unbound",
            "type": "array"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "variables_schema": {
            "additionalProperties": true,
            "description": "JSON Schema for the `variables` a conversation can start with, and its `version`, which changes when the list changes.",
            "title": "Variables Schema",
            "type": "object"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "description",
          "kind",
          "direction",
          "status",
          "channels",
          "published_at",
          "created_at",
          "updated_at",
          "languages",
          "variables_schema",
          "collected_schema",
          "analysis_enabled",
          "analysis_schema",
          "phone_numbers",
          "unbound"
        ],
        "title": "AgentWritten",
        "type": "object"
      },
      "Analysis": {
        "properties": {
          "criteria": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Criterion"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Criteria"
          },
          "extractions": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extractions"
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`success`, `partial`, `failure` or `unknown`.",
            "title": "Outcome"
          },
          "outcome_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outcome Reason"
          },
          "sentiment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`positive`, `neutral` or `negative`.",
            "title": "Sentiment"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "topic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          }
        },
        "title": "Analysis",
        "type": "object"
      },
      "Attachment": {
        "properties": {
          "byte_size": {
            "title": "Byte Size",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "object": {
            "const": "attachment",
            "default": "attachment",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "id",
          "mime_type",
          "byte_size"
        ],
        "title": "Attachment",
        "type": "object"
      },
      "AuditActor": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A person's email address, while their account exists.",
            "title": "Email"
          },
          "id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The person's or the key's id. Null for the platform, and for a person whose account has since been deleted.",
            "title": "Id"
          },
          "name": {
            "description": "Who acted, as they were called when they did it.",
            "title": "Name",
            "type": "string"
          },
          "type": {
            "description": "Who acted: `person`, `api_key`, or `platform` for something the platform did itself, such as deleting what its retention period reached. New words may be added.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "id",
          "name",
          "email"
        ],
        "title": "AuditActor",
        "type": "object"
      },
      "AuditEvent": {
        "description": "One thing somebody did in the organization: in the console, or with an API key.",
        "properties": {
          "action": {
            "description": "What was done, like `agent.published` or `api_key.created`. New actions may be added.",
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/AuditActor"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "meta": {
            "additionalProperties": true,
            "description": "The details the action recorded.",
            "title": "Meta",
            "type": "object"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "What the ids in `target` and `meta` are called today, keyed by the id. An id whose object is gone is not here.",
            "title": "Names",
            "type": "object"
          },
          "object": {
            "const": "audit_event",
            "default": "audit_event",
            "title": "Object",
            "type": "string"
          },
          "target": {
            "description": "What it was done to, as `kind:id`, like `agent:8a1f…`.",
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "id",
          "action",
          "actor",
          "target",
          "names",
          "meta",
          "created_at"
        ],
        "title": "AuditEvent",
        "type": "object"
      },
      "AuditEventList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AuditEvent"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass it back as `cursor` for the next page. It comes back on the last page too: keep it, and ask again later for what was done since.",
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "AuditEventList",
        "type": "object"
      },
      "Body_replaceKnowledgeDocument": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "The new version.",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_replaceKnowledgeDocument",
        "type": "object"
      },
      "Body_uploadAttachment": {
        "properties": {
          "agent_id": {
            "description": "The agent the picture is for.",
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "A JPEG, PNG, WebP or GIF.",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "agent_id",
          "file"
        ],
        "title": "Body_uploadAttachment",
        "type": "object"
      },
      "Body_uploadKnowledgeDocument": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "The file.",
            "title": "File",
            "type": "string"
          },
          "generate_faqs": {
            "default": false,
            "description": "Also write questions and answers from it. Each one costs credit.",
            "title": "Generate Faqs",
            "type": "boolean"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_uploadKnowledgeDocument",
        "type": "object"
      },
      "CallCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "description": "The outbound agent that makes the call.",
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Answer with this published version of the agent rather than what is live now — its number from `GET /v1/agents/{id}/versions`. Its values and languages are that version's, and every turn of the conversation keeps it.",
            "title": "Agent Version"
          },
          "call_window": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallWindow"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only start the call within these hours. Outside them it is refused with `outside_call_window`, which says when the window opens — schedule it for then with `POST /v1/scheduled-calls`."
          },
          "external_id": {
            "anyOf": [
              {
                "description": "Your own id for this conversation — a lead, a ticket, an order. Find it again with `GET /v1/conversations?external_id=`. Not unique, and not the `Idempotency-Key`.",
                "maxLength": 200,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "from_number": {
            "anyOf": [
              {
                "maxLength": 32,
                "minLength": 2,
                "pattern": "^\\+?[0-9]{2,31}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's numbers to call from. Or send `phone_number_id`, never both; with neither, the agent's own number.",
            "title": "From Number"
          },
          "language": {
            "anyOf": [
              {
                "maxLength": 16,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's language versions, like `ar`.",
            "title": "Language"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Your own data, returned on every read and event. The agent never sees it.",
            "maxProperties": 20,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's numbers to call from, by its id.",
            "title": "Phone Number Id"
          },
          "to_number": {
            "description": "The number to call, in international format, like `+966501234567`.",
            "examples": [
              "+966501234567"
            ],
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^\\+?[0-9]{2,31}$",
            "title": "To Number",
            "type": "string"
          },
          "variables": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Values for the agent's `{{placeholders}}` — text, numbers or true/false. See the agent's `variables_schema`.",
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "agent_id",
          "to_number"
        ],
        "title": "CallCreate",
        "type": "object"
      },
      "CallWindow": {
        "additionalProperties": false,
        "description": "The hours a call may start in, read in one time zone (`services/calling_hours`).",
        "properties": {
          "days": {
            "description": "The days of the week calls may start on, there. Every day unless you say.",
            "items": {
              "enum": [
                "mon",
                "tue",
                "wed",
                "thu",
                "fri",
                "sat",
                "sun"
              ],
              "type": "string"
            },
            "maxItems": 7,
            "minItems": 1,
            "title": "Days",
            "type": "array"
          },
          "end": {
            "description": "When calls stop starting, `HH:MM`, after `start` on the same day. A call already talking is never cut off.",
            "examples": [
              "18:00"
            ],
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "title": "End",
            "type": "string"
          },
          "start": {
            "description": "The earliest a call may start, `HH:MM`.",
            "examples": [
              "09:00"
            ],
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "title": "Start",
            "type": "string"
          },
          "timezone": {
            "description": "An IANA time zone — the hours are read there.",
            "examples": [
              "Asia/Riyadh"
            ],
            "maxLength": 64,
            "minLength": 1,
            "title": "Timezone",
            "type": "string"
          }
        },
        "required": [
          "timezone",
          "start",
          "end"
        ],
        "title": "CallWindow",
        "type": "object"
      },
      "Campaign": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "callbacks": {
            "$ref": "#/components/schemas/CampaignCallbacksObject"
          },
          "calling_hours": {
            "$ref": "#/components/schemas/CampaignCallingHoursObject"
          },
          "contacts": {
            "$ref": "#/components/schemas/CampaignCounts"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "livemode": {
            "title": "Livemode",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "campaign",
            "default": "campaign",
            "title": "Object",
            "type": "string"
          },
          "pacing": {
            "$ref": "#/components/schemas/CampaignPacingObject"
          },
          "paused_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it paused itself, when it did.",
            "title": "Paused Reason"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "start_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a draft will start by itself.",
            "title": "Start At"
          },
          "started_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "description": "`draft` until it starts; `running` while it calls; `paused`, by you or because it could not go on — `paused_reason` says which; `completed` once nobody is left to call; `cancelled` if you stopped it. One of: `draft`, `running`, `paused`, `completed`, `cancelled`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "voicemail": {
            "$ref": "#/components/schemas/CampaignVoicemailObject"
          }
        },
        "required": [
          "id",
          "livemode",
          "name",
          "status",
          "project_id",
          "agent_id",
          "phone_number_id",
          "paused_reason",
          "pacing",
          "calling_hours",
          "voicemail",
          "callbacks",
          "contacts",
          "start_at",
          "started_at",
          "finished_at",
          "created_at"
        ],
        "title": "Campaign",
        "type": "object"
      },
      "CampaignCallbacks": {
        "additionalProperties": false,
        "properties": {
          "allowed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether a person may ask the agent to call back at a time of their own. False unless you say.",
            "title": "Allowed"
          },
          "max_callbacks": {
            "anyOf": [
              {
                "maximum": 10.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How often one person may move their call. 2 unless you say.",
            "title": "Max Callbacks"
          },
          "window_days": {
            "anyOf": [
              {
                "maximum": 30.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many days after the first call a callback may land. 30 unless you say.",
            "title": "Window Days"
          }
        },
        "title": "CampaignCallbacks",
        "type": "object"
      },
      "CampaignCallbacksObject": {
        "properties": {
          "allowed": {
            "title": "Allowed",
            "type": "boolean"
          },
          "max_callbacks": {
            "title": "Max Callbacks",
            "type": "integer"
          },
          "window_days": {
            "title": "Window Days",
            "type": "integer"
          }
        },
        "required": [
          "allowed",
          "max_callbacks",
          "window_days"
        ],
        "title": "CampaignCallbacksObject",
        "type": "object"
      },
      "CampaignCallingHours": {
        "additionalProperties": false,
        "properties": {
          "days": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat",
                    "sun"
                  ],
                  "type": "string"
                },
                "maxItems": 7,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The days calls are made on. Every day unless you say.",
            "title": "Days"
          },
          "end_hour": {
            "anyOf": [
              {
                "maximum": 24.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The hour calls stop starting, 1–24, after `start_hour`. 20 unless you say.",
            "title": "End Hour"
          },
          "start_hour": {
            "anyOf": [
              {
                "maximum": 23.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The first hour a call may start, 0–23. 9 unless you say.",
            "title": "Start Hour"
          }
        },
        "title": "CampaignCallingHours",
        "type": "object"
      },
      "CampaignCallingHoursObject": {
        "properties": {
          "days": {
            "items": {
              "type": "string"
            },
            "title": "Days",
            "type": "array"
          },
          "end_hour": {
            "title": "End Hour",
            "type": "integer"
          },
          "start_hour": {
            "title": "Start Hour",
            "type": "integer"
          }
        },
        "required": [
          "start_hour",
          "end_hour",
          "days"
        ],
        "title": "CampaignCallingHoursObject",
        "type": "object"
      },
      "CampaignContact": {
        "properties": {
          "attempts": {
            "description": "Calls placed to them so far.",
            "title": "Attempts",
            "type": "integer"
          },
          "callback_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A time they asked to be called back at.",
            "title": "Callback At"
          },
          "campaign_id": {
            "format": "uuid",
            "title": "Campaign Id",
            "type": "string"
          },
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Their latest conversation.",
            "title": "Conversation Id"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the latest call ended on the line. One of: `answered`, `no_answer`, `busy`, `declined`, `failed`, `unreachable`, `voicemail`, `voicemail_left`. New words may be added.",
            "title": "Disposition"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the platform did not call them, when it did not.",
            "title": "Error"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When they are next called, if queued.",
            "title": "Next Attempt At"
          },
          "object": {
            "const": "campaign_contact",
            "default": "campaign_contact",
            "title": "Object",
            "type": "string"
          },
          "status": {
            "description": "`queued` until their turn or their next try; `dialing` on a call; `done` once reached; `exhausted` when every try is used; `failed` when the platform refused to call them. One of: `queued`, `dialing`, `done`, `failed`, `exhausted`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "to_number": {
            "title": "To Number",
            "type": "string"
          },
          "variables": {
            "additionalProperties": true,
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "id",
          "campaign_id",
          "status",
          "to_number",
          "attempts",
          "next_attempt_at",
          "callback_at",
          "conversation_id",
          "disposition",
          "error",
          "timezone",
          "variables",
          "metadata",
          "external_id",
          "created_at"
        ],
        "title": "CampaignContact",
        "type": "object"
      },
      "CampaignContactCreate": {
        "additionalProperties": false,
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "description": "Your own id for this conversation — a lead, a ticket, an order. Find it again with `GET /v1/conversations?external_id=`. Not unique, and not the `Idempotency-Key`.",
                "maxLength": 200,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Your own data, carried onto every conversation with this person. The agent never sees it.",
            "maxProperties": 20,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where this person is, like `America/Chicago`: the calling hours are read there. Leave it out for your organization's own time zone.",
            "title": "Timezone"
          },
          "to_number": {
            "description": "The number to call, in international format.",
            "examples": [
              "+966501234567"
            ],
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^\\+?[0-9]{2,31}$",
            "title": "To Number",
            "type": "string"
          },
          "variables": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "This person's values for the agent's `{{placeholders}}`.",
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "to_number"
        ],
        "title": "CampaignContactCreate",
        "type": "object"
      },
      "CampaignContactList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CampaignContact"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CampaignContactList",
        "type": "object"
      },
      "CampaignContactStatus": {
        "enum": [
          "queued",
          "dialing",
          "done",
          "failed",
          "exhausted"
        ],
        "title": "CampaignContactStatus",
        "type": "string"
      },
      "CampaignContactsAdded": {
        "properties": {
          "added": {
            "description": "People added to the list.",
            "title": "Added",
            "type": "integer"
          },
          "already_in_campaign": {
            "description": "Numbers skipped because the campaign already holds them.",
            "items": {
              "type": "string"
            },
            "title": "Already In Campaign",
            "type": "array"
          },
          "campaign_id": {
            "format": "uuid",
            "title": "Campaign Id",
            "type": "string"
          },
          "object": {
            "const": "campaign_contacts_added",
            "default": "campaign_contacts_added",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "campaign_id",
          "added",
          "already_in_campaign"
        ],
        "title": "CampaignContactsAdded",
        "type": "object"
      },
      "CampaignContactsCreate": {
        "additionalProperties": false,
        "properties": {
          "contacts": {
            "description": "The people to add, up to 1,000 in one request.",
            "items": {
              "$ref": "#/components/schemas/CampaignContactCreate"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Contacts",
            "type": "array"
          }
        },
        "required": [
          "contacts"
        ],
        "title": "CampaignContactsCreate",
        "type": "object"
      },
      "CampaignCounts": {
        "properties": {
          "dialing": {
            "description": "Being called now.",
            "title": "Dialing",
            "type": "integer"
          },
          "done": {
            "description": "Reached, or a message was left.",
            "title": "Done",
            "type": "integer"
          },
          "exhausted": {
            "description": "Every try used without reaching them.",
            "title": "Exhausted",
            "type": "integer"
          },
          "failed": {
            "description": "Not called: the platform refused it — `error` says why.",
            "title": "Failed",
            "type": "integer"
          },
          "queued": {
            "description": "Waiting for their turn, or for their next try.",
            "title": "Queued",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "queued",
          "dialing",
          "done",
          "failed",
          "exhausted"
        ],
        "title": "CampaignCounts",
        "type": "object"
      },
      "CampaignCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "description": "The outbound agent that makes the calls.",
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "callbacks": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignCallbacks"
              },
              {
                "type": "null"
              }
            ]
          },
          "calling_hours": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignCallingHours"
              },
              {
                "type": "null"
              }
            ],
            "description": "When calls may start, read in each contact's own `timezone` — or your organization's, for a contact without one."
          },
          "contacts": {
            "description": "The people to call, up to 1,000 in one request.",
            "items": {
              "$ref": "#/components/schemas/CampaignContactCreate"
            },
            "maxItems": 1000,
            "title": "Contacts",
            "type": "array"
          },
          "name": {
            "description": "What the campaign is called in the console.",
            "maxLength": 120,
            "minLength": 1,
            "pattern": "^[^\\x00-\\x1f\\x7f]+$",
            "title": "Name",
            "type": "string"
          },
          "pacing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignPacing"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's numbers to call from. The agent's own unless you say.",
            "title": "Phone Number Id"
          },
          "start": {
            "default": false,
            "description": "Start dialling now.",
            "title": "Start",
            "type": "boolean"
          },
          "start_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start dialling at this moment instead, with its offset — `2026-10-12T09:00:00+03:00`. A time without one is UTC.",
            "title": "Start At"
          },
          "voicemail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CampaignVoicemail"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "agent_id",
          "name"
        ],
        "title": "CampaignCreate",
        "type": "object"
      },
      "CampaignList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Campaign"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CampaignList",
        "type": "object"
      },
      "CampaignPacing": {
        "additionalProperties": false,
        "properties": {
          "dials_per_minute": {
            "anyOf": [
              {
                "maximum": 600.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "New calls a minute, at most. 20 unless you say.",
            "title": "Dials Per Minute"
          },
          "max_attempts": {
            "anyOf": [
              {
                "maximum": 10.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tries for each person — a busy line, no answer — before they are left alone. 3 unless you say.",
            "title": "Max Attempts"
          },
          "max_concurrent": {
            "anyOf": [
              {
                "maximum": 200.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Calls at the same time, at most. 5 unless you say.",
            "title": "Max Concurrent"
          },
          "retry_backoff_minutes": {
            "anyOf": [
              {
                "items": {
                  "maximum": 1440.0,
                  "minimum": 1.0,
                  "type": "integer"
                },
                "maxItems": 10,
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Minutes to wait before each next try, up to a day each. `[5, 30, 120]` unless you say.",
            "title": "Retry Backoff Minutes"
          }
        },
        "title": "CampaignPacing",
        "type": "object"
      },
      "CampaignPacingObject": {
        "properties": {
          "dials_per_minute": {
            "title": "Dials Per Minute",
            "type": "integer"
          },
          "max_attempts": {
            "title": "Max Attempts",
            "type": "integer"
          },
          "max_concurrent": {
            "title": "Max Concurrent",
            "type": "integer"
          },
          "retry_backoff_minutes": {
            "items": {
              "type": "integer"
            },
            "title": "Retry Backoff Minutes",
            "type": "array"
          }
        },
        "required": [
          "max_concurrent",
          "dials_per_minute",
          "max_attempts",
          "retry_backoff_minutes"
        ],
        "title": "CampaignPacingObject",
        "type": "object"
      },
      "CampaignResume": {
        "additionalProperties": false,
        "properties": {
          "reset_attempts": {
            "default": false,
            "description": "Give everybody not reached so far every try back. A callback somebody booked keeps its time.",
            "title": "Reset Attempts",
            "type": "boolean"
          }
        },
        "title": "CampaignResume",
        "type": "object"
      },
      "CampaignStatus": {
        "enum": [
          "draft",
          "running",
          "paused",
          "completed",
          "cancelled"
        ],
        "title": "CampaignStatus",
        "type": "string"
      },
      "CampaignVoicemail": {
        "additionalProperties": false,
        "properties": {
          "behaviour": {
            "anyOf": [
              {
                "enum": [
                  "hang_up",
                  "leave_message"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What a call does when an answering machine picks up. `hang_up` unless you say.",
            "title": "Behaviour"
          },
          "message": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What to say onto the machine, with the agent's `{{placeholders}}`. Needed for `leave_message`.",
            "title": "Message"
          },
          "retry_after_message": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Keep trying for a person after leaving a message. False unless you say.",
            "title": "Retry After Message"
          }
        },
        "title": "CampaignVoicemail",
        "type": "object"
      },
      "CampaignVoicemailObject": {
        "properties": {
          "behaviour": {
            "description": "`hang_up` or `leave_message`. New words may be added.",
            "title": "Behaviour",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "retry_after_message": {
            "title": "Retry After Message",
            "type": "boolean"
          }
        },
        "required": [
          "behaviour",
          "message",
          "retry_after_message"
        ],
        "title": "CampaignVoicemailObject",
        "type": "object"
      },
      "Capabilities": {
        "description": "What this deployment of Aigently runs — a company's own copy may switch parts off.",
        "properties": {
          "channels": {
            "items": {
              "type": "string"
            },
            "title": "Channels",
            "type": "array"
          },
          "credits_enforced": {
            "title": "Credits Enforced",
            "type": "boolean"
          },
          "telephony": {
            "title": "Telephony",
            "type": "boolean"
          },
          "whatsapp": {
            "title": "Whatsapp",
            "type": "boolean"
          }
        },
        "required": [
          "channels",
          "telephony",
          "whatsapp",
          "credits_enforced"
        ],
        "title": "Capabilities",
        "type": "object"
      },
      "Channel": {
        "enum": [
          "voice",
          "chat",
          "phone",
          "whatsapp"
        ],
        "title": "Channel",
        "type": "string"
      },
      "ChatCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "description": "The agent to chat with.",
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Answer with this published version of the agent rather than what is live now — its number from `GET /v1/agents/{id}/versions`. Its values and languages are that version's, and every turn of the conversation keeps it.",
            "title": "Agent Version"
          },
          "attachment_ids": {
            "description": "Pictures to send with it, from `POST /v1/attachments`.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 4,
            "title": "Attachment Ids",
            "type": "array"
          },
          "external_id": {
            "anyOf": [
              {
                "description": "Your own id for this conversation — a lead, a ticket, an order. Find it again with `GET /v1/conversations?external_id=`. Not unique, and not the `Idempotency-Key`.",
                "maxLength": 200,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "language": {
            "anyOf": [
              {
                "maxLength": 16,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's language versions, like `ar`.",
            "title": "Language"
          },
          "message": {
            "description": "What the person wrote.",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Your own data, returned on every read and event. The agent never sees it.",
            "maxProperties": 20,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          },
          "stream": {
            "default": false,
            "description": "Send the reply as it is written, as server-sent events. `Accept: text/event-stream` does the same.",
            "title": "Stream",
            "type": "boolean"
          },
          "variables": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Values for the agent's `{{placeholders}}`. See its `variables_schema`.",
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "message",
          "agent_id"
        ],
        "title": "ChatCreate",
        "type": "object"
      },
      "ChatTurn": {
        "description": "One exchange: what the agent said back, and where the conversation stands after it.",
        "properties": {
          "collected": {
            "additionalProperties": true,
            "description": "The answers collected so far.",
            "title": "Collected",
            "type": "object"
          },
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "finished": {
            "description": "The agent has nothing more to ask. The chat stays open until it is ended.",
            "title": "Finished",
            "type": "boolean"
          },
          "form_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form Complete"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "object": {
            "const": "chat.turn",
            "default": "chat.turn",
            "title": "Object",
            "type": "string"
          },
          "opening": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent's greeting, on the first turn only — show it above the reply.",
            "title": "Opening"
          },
          "reply": {
            "title": "Reply",
            "type": "string"
          },
          "specialist": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Which of a desk agent's specialists answered.",
            "title": "Specialist"
          },
          "trail": {
            "description": "The specialists the conversation has passed through.",
            "items": {
              "type": "string"
            },
            "title": "Trail",
            "type": "array"
          }
        },
        "required": [
          "conversation_id",
          "opening",
          "reply",
          "collected",
          "form_complete",
          "finished",
          "language",
          "specialist",
          "trail"
        ],
        "title": "ChatTurn",
        "type": "object"
      },
      "Contact": {
        "properties": {
          "attributes": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Attributes",
            "type": "object"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "contact",
            "default": "contact",
            "title": "Object",
            "type": "string"
          },
          "phone": {
            "title": "Phone",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "phone",
          "name",
          "attributes",
          "timezone",
          "created_at",
          "updated_at"
        ],
        "title": "Contact",
        "type": "object"
      },
      "ContactCreate": {
        "additionalProperties": false,
        "properties": {
          "attributes": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "What an agent may say about them: its `{{placeholders}}` take these by name. Kept as text.",
            "maxProperties": 50,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Attributes",
            "type": "object"
          },
          "name": {
            "default": "",
            "description": "What the console calls them. Never spoken.",
            "maxLength": 200,
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "description": "Their number, in international format.",
            "examples": [
              "+966501234567"
            ],
            "maxLength": 32,
            "minLength": 2,
            "title": "Phone",
            "type": "string"
          },
          "project_id": {
            "description": "The project whose phonebook they join.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where they are, like `Asia/Riyadh`: a campaign's calling hours are read there. Leave it out for your organization's own.",
            "title": "Timezone"
          }
        },
        "required": [
          "phone",
          "project_id"
        ],
        "title": "ContactCreate",
        "type": "object"
      },
      "ContactDeleted": {
        "properties": {
          "deleted": {
            "const": true,
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "const": "contact",
            "default": "contact",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "ContactDeleted",
        "type": "object"
      },
      "ContactFields": {
        "additionalProperties": false,
        "properties": {
          "attributes": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "What an agent may say about them: its `{{placeholders}}` take these by name. Kept as text.",
            "maxProperties": 50,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Attributes",
            "type": "object"
          },
          "name": {
            "default": "",
            "description": "What the console calls them. Never spoken.",
            "maxLength": 200,
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "description": "Their number, in international format.",
            "examples": [
              "+966501234567"
            ],
            "maxLength": 32,
            "minLength": 2,
            "title": "Phone",
            "type": "string"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where they are, like `Asia/Riyadh`: a campaign's calling hours are read there. Leave it out for your organization's own.",
            "title": "Timezone"
          }
        },
        "required": [
          "phone"
        ],
        "title": "ContactFields",
        "type": "object"
      },
      "ContactImport": {
        "additionalProperties": false,
        "properties": {
          "contacts": {
            "description": "The people, up to 1,000 in one request.",
            "items": {
              "$ref": "#/components/schemas/ContactFields"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Contacts",
            "type": "array"
          },
          "project_id": {
            "description": "The project whose phonebook they join.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "update_existing": {
            "default": true,
            "description": "Whether a number already there takes these details. False leaves it as it is and counts it as skipped.",
            "title": "Update Existing",
            "type": "boolean"
          }
        },
        "required": [
          "project_id",
          "contacts"
        ],
        "title": "ContactImport",
        "type": "object"
      },
      "ContactImported": {
        "properties": {
          "added": {
            "title": "Added",
            "type": "integer"
          },
          "errors": {
            "description": "Each row not taken, by its place in `contacts` — the rest were.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Errors",
            "type": "array"
          },
          "object": {
            "const": "contact_import",
            "default": "contact_import",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "skipped": {
            "description": "Numbers already there, left as they were.",
            "title": "Skipped",
            "type": "integer"
          },
          "updated": {
            "title": "Updated",
            "type": "integer"
          }
        },
        "required": [
          "project_id",
          "added",
          "updated",
          "skipped",
          "errors"
        ],
        "title": "ContactImported",
        "type": "object"
      },
      "ContactList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ContactList",
        "type": "object"
      },
      "ContactUpdate": {
        "additionalProperties": false,
        "properties": {
          "attributes": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "maxLength": 500,
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "maxProperties": 50,
                "propertyNames": {
                  "maxLength": 64,
                  "minLength": 1
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Replaces every attribute they had: send the whole set.",
            "title": "Attributes"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "phone": {
            "anyOf": [
              {
                "maxLength": 32,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Send `null` for your organization's own time zone.",
            "title": "Timezone"
          }
        },
        "title": "ContactUpdate",
        "type": "object"
      },
      "Context": {
        "description": "What the context lookup made of an inbound call (§9.2).",
        "properties": {
          "applied_before_first_reply": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the values were in the agent's prompt for its first reply.",
            "title": "Applied Before First Reply"
          },
          "ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How long your server took to answer.",
            "title": "Ms"
          },
          "problems": {
            "description": "What went wrong, or which values did not fit and were dropped.",
            "items": {
              "$ref": "#/components/schemas/ContextProblem"
            },
            "title": "Problems",
            "type": "array"
          },
          "status": {
            "description": "`pending`, `ok`, `timeout`, `bad_status`, `too_large`, `invalid_answer`, `refused`, `failed` or `busy`. Anything but `ok` means the agent answered without the values.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "status",
          "ms",
          "applied_before_first_reply",
          "problems"
        ],
        "title": "Context",
        "type": "object"
      },
      "ContextProblem": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "field": {
            "description": "What did not fit, like `variables.visits`; empty when it was the request.",
            "title": "Field",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "field",
          "code",
          "message"
        ],
        "title": "ContextProblem",
        "type": "object"
      },
      "Conversation": {
        "description": "`docs/plans/public-api-and-sdks.md` §6.4 — built by `services/conversation_object`.",
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The newest version of the agent published when the conversation started.",
            "title": "Agent Version"
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Analysis"
              },
              {
                "type": "null"
              }
            ]
          },
          "analysis_status": {
            "description": "`disabled`, `pending`, `completed`, `failed` or `skipped`. New words may be added.",
            "title": "Analysis Status",
            "type": "string"
          },
          "answered_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "caller": {
            "description": "What the phone network sent as the caller. Anyone can set it.",
            "title": "Caller",
            "type": "string"
          },
          "campaign_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "changed_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Changed At",
            "type": "string"
          },
          "channel": {
            "description": "Where it happened. One of: `voice`, `chat`, `phone`, `whatsapp`. New words may be added.",
            "title": "Channel",
            "type": "string"
          },
          "collected": {
            "additionalProperties": true,
            "title": "Collected",
            "type": "object"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Context"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the context lookup made of this call; null where none ran."
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Phone calls only. One of: `inbound`, `outbound`. New words may be added.",
            "title": "Direction"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What happened on the phone line. One of: `answered`, `no_answer`, `busy`, `declined`, `failed`, `unreachable`, `voicemail`, `voicemail_left`. New words may be added.",
            "title": "Disposition"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "end_reason": {
            "title": "End Reason",
            "type": "string"
          },
          "ended_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "ended_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What ended it. One of: `agent`, `caller`, `system`, `transfer`, `operator`, `failure`, `api`. New words may be added.",
            "title": "Ended By"
          },
          "error": {
            "title": "Error",
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A stable reason a failed conversation failed.",
            "title": "Error Code"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your own id for it, as you sent it.",
            "title": "External Id"
          },
          "form_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form Complete"
          },
          "from_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Number"
          },
          "handoff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Handoff"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ignored_variables": {
            "items": {
              "type": "string"
            },
            "title": "Ignored Variables",
            "type": "array"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "livemode": {
            "title": "Livemode",
            "type": "boolean"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "mode": {
            "description": "`sandbox` is made by a test key, not real. One of: `test`, `live`, `sandbox`. New words may be added.",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "conversation",
            "default": "conversation",
            "title": "Object",
            "type": "string"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "recording_status": {
            "description": "`none`, `pending` or `available`.",
            "title": "Recording Status",
            "type": "string"
          },
          "revision": {
            "description": "Goes up each time we send an event about it.",
            "title": "Revision",
            "type": "integer"
          },
          "sip_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sip Status Code"
          },
          "started_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "description": "Where it stands. One of: `pending`, `active`, `completed`, `failed`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "to_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Number"
          },
          "turn_count": {
            "title": "Turn Count",
            "type": "integer"
          },
          "variable_sources": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Variable Sources",
            "type": "object"
          },
          "variables": {
            "additionalProperties": true,
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "id",
          "revision",
          "mode",
          "livemode",
          "project_id",
          "agent_id",
          "agent_version",
          "channel",
          "direction",
          "status",
          "disposition",
          "ended_by",
          "end_reason",
          "error",
          "error_code",
          "sip_status_code",
          "caller",
          "from_number",
          "to_number",
          "phone_number_id",
          "campaign_id",
          "language",
          "variables",
          "variable_sources",
          "ignored_variables",
          "metadata",
          "external_id",
          "context",
          "collected",
          "form_complete",
          "analysis_status",
          "analysis",
          "recording_status",
          "handoff",
          "turn_count",
          "started_at",
          "answered_at",
          "ended_at",
          "changed_at",
          "duration_seconds"
        ],
        "title": "Conversation",
        "type": "object"
      },
      "ConversationCommandObject": {
        "description": "Something a live call was asked to do.",
        "properties": {
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "description": "Why it failed, when it did.",
            "title": "Error",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "description": "`say`, `note` or `transfer`. New words may be added.",
            "title": "Kind",
            "type": "string"
          },
          "object": {
            "const": "conversation_command",
            "default": "conversation_command",
            "title": "Object",
            "type": "string"
          },
          "status": {
            "description": "`sent`, `taken` when the call's agent has it, then `done` or `failed`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "conversation_id",
          "kind",
          "status",
          "error",
          "created_at",
          "updated_at"
        ],
        "title": "ConversationCommandObject",
        "type": "object"
      },
      "ConversationList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConversationListItem"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass it back as `cursor` for the next page. With `order=changed` it comes back on the last page too: keep it, and ask again later for what changed since.",
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ConversationList",
        "type": "object"
      },
      "ConversationListItem": {
        "description": "A conversation as the list returns it. Only a search adds anything, so `match` lives here\nand not on `Conversation`, which every other answer and every event embeds.",
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The newest version of the agent published when the conversation started.",
            "title": "Agent Version"
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Analysis"
              },
              {
                "type": "null"
              }
            ]
          },
          "analysis_status": {
            "description": "`disabled`, `pending`, `completed`, `failed` or `skipped`. New words may be added.",
            "title": "Analysis Status",
            "type": "string"
          },
          "answered_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "caller": {
            "description": "What the phone network sent as the caller. Anyone can set it.",
            "title": "Caller",
            "type": "string"
          },
          "campaign_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "changed_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Changed At",
            "type": "string"
          },
          "channel": {
            "description": "Where it happened. One of: `voice`, `chat`, `phone`, `whatsapp`. New words may be added.",
            "title": "Channel",
            "type": "string"
          },
          "collected": {
            "additionalProperties": true,
            "title": "Collected",
            "type": "object"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Context"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the context lookup made of this call; null where none ran."
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Phone calls only. One of: `inbound`, `outbound`. New words may be added.",
            "title": "Direction"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What happened on the phone line. One of: `answered`, `no_answer`, `busy`, `declined`, `failed`, `unreachable`, `voicemail`, `voicemail_left`. New words may be added.",
            "title": "Disposition"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "end_reason": {
            "title": "End Reason",
            "type": "string"
          },
          "ended_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "ended_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What ended it. One of: `agent`, `caller`, `system`, `transfer`, `operator`, `failure`, `api`. New words may be added.",
            "title": "Ended By"
          },
          "error": {
            "title": "Error",
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A stable reason a failed conversation failed.",
            "title": "Error Code"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your own id for it, as you sent it.",
            "title": "External Id"
          },
          "form_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form Complete"
          },
          "from_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Number"
          },
          "handoff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Handoff"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ignored_variables": {
            "items": {
              "type": "string"
            },
            "title": "Ignored Variables",
            "type": "array"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "livemode": {
            "title": "Livemode",
            "type": "boolean"
          },
          "match": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only with `q`: the passage that matched, as plain text.",
            "title": "Match"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "mode": {
            "description": "`sandbox` is made by a test key, not real. One of: `test`, `live`, `sandbox`. New words may be added.",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "conversation",
            "default": "conversation",
            "title": "Object",
            "type": "string"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "recording_status": {
            "description": "`none`, `pending` or `available`.",
            "title": "Recording Status",
            "type": "string"
          },
          "revision": {
            "description": "Goes up each time we send an event about it.",
            "title": "Revision",
            "type": "integer"
          },
          "sip_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sip Status Code"
          },
          "started_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "description": "Where it stands. One of: `pending`, `active`, `completed`, `failed`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "to_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Number"
          },
          "turn_count": {
            "title": "Turn Count",
            "type": "integer"
          },
          "variable_sources": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Variable Sources",
            "type": "object"
          },
          "variables": {
            "additionalProperties": true,
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "id",
          "revision",
          "mode",
          "livemode",
          "project_id",
          "agent_id",
          "agent_version",
          "channel",
          "direction",
          "status",
          "disposition",
          "ended_by",
          "end_reason",
          "error",
          "error_code",
          "sip_status_code",
          "caller",
          "from_number",
          "to_number",
          "phone_number_id",
          "campaign_id",
          "language",
          "variables",
          "variable_sources",
          "ignored_variables",
          "metadata",
          "external_id",
          "context",
          "collected",
          "form_complete",
          "analysis_status",
          "analysis",
          "recording_status",
          "handoff",
          "turn_count",
          "started_at",
          "answered_at",
          "ended_at",
          "changed_at",
          "duration_seconds"
        ],
        "title": "ConversationListItem",
        "type": "object"
      },
      "ConversationMode": {
        "enum": [
          "test",
          "live",
          "sandbox"
        ],
        "title": "ConversationMode",
        "type": "string"
      },
      "ConversationStatus": {
        "enum": [
          "pending",
          "active",
          "completed",
          "failed"
        ],
        "title": "ConversationStatus",
        "type": "string"
      },
      "ConversationWithTranscript": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The newest version of the agent published when the conversation started.",
            "title": "Agent Version"
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Analysis"
              },
              {
                "type": "null"
              }
            ]
          },
          "analysis_status": {
            "description": "`disabled`, `pending`, `completed`, `failed` or `skipped`. New words may be added.",
            "title": "Analysis Status",
            "type": "string"
          },
          "answered_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Answered At"
          },
          "caller": {
            "description": "What the phone network sent as the caller. Anyone can set it.",
            "title": "Caller",
            "type": "string"
          },
          "campaign_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Campaign Id"
          },
          "changed_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Changed At",
            "type": "string"
          },
          "channel": {
            "description": "Where it happened. One of: `voice`, `chat`, `phone`, `whatsapp`. New words may be added.",
            "title": "Channel",
            "type": "string"
          },
          "collected": {
            "additionalProperties": true,
            "title": "Collected",
            "type": "object"
          },
          "context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Context"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the context lookup made of this call; null where none ran."
          },
          "cost": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Cost"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only with `include=cost`, which needs `billing:read`."
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Phone calls only. One of: `inbound`, `outbound`. New words may be added.",
            "title": "Direction"
          },
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What happened on the phone line. One of: `answered`, `no_answer`, `busy`, `declined`, `failed`, `unreachable`, `voicemail`, `voicemail_left`. New words may be added.",
            "title": "Disposition"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "end_reason": {
            "title": "End Reason",
            "type": "string"
          },
          "ended_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "ended_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What ended it. One of: `agent`, `caller`, `system`, `transfer`, `operator`, `failure`, `api`. New words may be added.",
            "title": "Ended By"
          },
          "error": {
            "title": "Error",
            "type": "string"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A stable reason a failed conversation failed.",
            "title": "Error Code"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your own id for it, as you sent it.",
            "title": "External Id"
          },
          "form_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Form Complete"
          },
          "from_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Number"
          },
          "handoff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Handoff"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ignored_variables": {
            "items": {
              "type": "string"
            },
            "title": "Ignored Variables",
            "type": "array"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "livemode": {
            "title": "Livemode",
            "type": "boolean"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "mode": {
            "description": "`sandbox` is made by a test key, not real. One of: `test`, `live`, `sandbox`. New words may be added.",
            "title": "Mode",
            "type": "string"
          },
          "object": {
            "const": "conversation",
            "default": "conversation",
            "title": "Object",
            "type": "string"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number Id"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "recording_status": {
            "description": "`none`, `pending` or `available`.",
            "title": "Recording Status",
            "type": "string"
          },
          "revision": {
            "description": "Goes up each time we send an event about it.",
            "title": "Revision",
            "type": "integer"
          },
          "sip_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sip Status Code"
          },
          "started_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "status": {
            "description": "Where it stands. One of: `pending`, `active`, `completed`, `failed`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "to_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Number"
          },
          "transcript": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Transcript"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only with `include=transcript`."
          },
          "turn_count": {
            "title": "Turn Count",
            "type": "integer"
          },
          "variable_sources": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Variable Sources",
            "type": "object"
          },
          "variables": {
            "additionalProperties": true,
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "id",
          "revision",
          "mode",
          "livemode",
          "project_id",
          "agent_id",
          "agent_version",
          "channel",
          "direction",
          "status",
          "disposition",
          "ended_by",
          "end_reason",
          "error",
          "error_code",
          "sip_status_code",
          "caller",
          "from_number",
          "to_number",
          "phone_number_id",
          "campaign_id",
          "language",
          "variables",
          "variable_sources",
          "ignored_variables",
          "metadata",
          "external_id",
          "context",
          "collected",
          "form_complete",
          "analysis_status",
          "analysis",
          "recording_status",
          "handoff",
          "turn_count",
          "started_at",
          "answered_at",
          "ended_at",
          "changed_at",
          "duration_seconds"
        ],
        "title": "ConversationWithTranscript",
        "type": "object"
      },
      "Cost": {
        "properties": {
          "credits": {
            "description": "What the conversation cost, in credits: its own charge and every analysis of it, less any refund. A test key's chats cost what their model used; its calls cost nothing.",
            "title": "Credits",
            "type": "number"
          }
        },
        "required": [
          "credits"
        ],
        "title": "Cost",
        "type": "object"
      },
      "CreditBalance": {
        "properties": {
          "available": {
            "description": "What can still be spent: the balance, less what conversations in progress hold, plus any credit line.",
            "title": "Available",
            "type": "number"
          },
          "balance": {
            "description": "Credit on the account, in credits.",
            "title": "Balance",
            "type": "number"
          },
          "enforced": {
            "description": "Whether running out stops conversations on this deployment. When false, credit is counted and nothing is refused.",
            "title": "Enforced",
            "type": "boolean"
          },
          "free_left": {
            "description": "How much of the balance is free credit still unspent.",
            "title": "Free Left",
            "type": "number"
          },
          "object": {
            "const": "credit_balance",
            "default": "credit_balance",
            "title": "Object",
            "type": "string"
          },
          "since": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Since",
            "type": "string"
          },
          "spent_this_month": {
            "description": "Spent since the first of this month, UTC.",
            "title": "Spent This Month",
            "type": "number"
          },
          "suspended": {
            "description": "New conversations are refused until credit is added.",
            "title": "Suspended",
            "type": "boolean"
          },
          "unlimited": {
            "description": "The organization is never refused for credit.",
            "title": "Unlimited",
            "type": "boolean"
          }
        },
        "required": [
          "balance",
          "available",
          "free_left",
          "spent_this_month",
          "since",
          "enforced",
          "suspended",
          "unlimited"
        ],
        "title": "CreditBalance",
        "type": "object"
      },
      "CreditEntryKind": {
        "enum": [
          "grant",
          "refund",
          "removal",
          "conversation",
          "analysis",
          "extraction",
          "knowledge",
          "evaluation",
          "adjustment"
        ],
        "title": "CreditEntryKind",
        "type": "string"
      },
      "CreditTransaction": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Id"
          },
          "amount": {
            "description": "Credits: positive adds, negative spends.",
            "title": "Amount",
            "type": "number"
          },
          "balance_after": {
            "title": "Balance After",
            "type": "number"
          },
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "description": "What moved credit. Spending it: `conversation`, `analysis`, `extraction`, `knowledge`, `evaluation`. Adding it: `grant`, `refund`. Corrections: `removal`, `adjustment`. More kinds may be added.",
            "title": "Kind",
            "type": "string"
          },
          "livemode": {
            "description": "False for what a test key spent.",
            "title": "Livemode",
            "type": "boolean"
          },
          "object": {
            "const": "credit_transaction",
            "default": "credit_transaction",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          }
        },
        "required": [
          "id",
          "created_at",
          "kind",
          "description",
          "amount",
          "balance_after",
          "conversation_id",
          "project_id",
          "agent_id",
          "livemode"
        ],
        "title": "CreditTransaction",
        "type": "object"
      },
      "CreditTransactionList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CreditTransaction"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "CreditTransactionList",
        "type": "object"
      },
      "Criterion": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "met": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Met"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "text",
          "met"
        ],
        "title": "Criterion",
        "type": "object"
      },
      "Deleted": {
        "properties": {
          "deleted": {
            "const": true,
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "id"
        ],
        "title": "Deleted",
        "type": "object"
      },
      "DeletedConversation": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "deleted_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Deleted At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "const": "deleted_conversation",
            "default": "deleted_conversation",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "reason": {
            "description": "Why it was deleted. One of: `retention`, `console`, `agent_deleted`, `project_deleted`, `api`. New words may be added.",
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "agent_id",
          "deleted_at",
          "reason"
        ],
        "title": "DeletedConversation",
        "type": "object"
      },
      "DeletedConversationList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DeletedConversation"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DeletedConversationList",
        "type": "object"
      },
      "Direction": {
        "enum": [
          "inbound",
          "outbound"
        ],
        "title": "Direction",
        "type": "string"
      },
      "Disposition": {
        "enum": [
          "answered",
          "no_answer",
          "busy",
          "declined",
          "failed",
          "unreachable",
          "voicemail",
          "voicemail_left"
        ],
        "title": "Disposition",
        "type": "string"
      },
      "DoNotCallCreate": {
        "additionalProperties": false,
        "properties": {
          "number": {
            "description": "The number, in international form. Spaces, dashes and brackets are ignored.",
            "maxLength": 40,
            "minLength": 7,
            "title": "Number",
            "type": "string"
          },
          "reason": {
            "default": "",
            "description": "Why, in your words.",
            "maxLength": 300,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "number"
        ],
        "title": "DoNotCallCreate",
        "type": "object"
      },
      "DoNotCallEntry": {
        "properties": {
          "added_by": {
            "description": "Who listed it: a person, or an API key by name.",
            "title": "Added By",
            "type": "string"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "last_refused_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Refused At"
          },
          "number": {
            "description": "In international form, like `+12025550100`.",
            "title": "Number",
            "type": "string"
          },
          "object": {
            "const": "do_not_call_entry",
            "default": "do_not_call_entry",
            "title": "Object",
            "type": "string"
          },
          "reason": {
            "description": "Why it was listed, as whoever listed it put it.",
            "title": "Reason",
            "type": "string"
          },
          "refused_calls": {
            "description": "Calls refused because it is listed.",
            "title": "Refused Calls",
            "type": "integer"
          }
        },
        "required": [
          "number",
          "reason",
          "added_by",
          "created_at",
          "refused_calls",
          "last_refused_at"
        ],
        "title": "DoNotCallEntry",
        "type": "object"
      },
      "DoNotCallList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DoNotCallEntry"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "DoNotCallList",
        "type": "object"
      },
      "DoNotCallRemoved": {
        "properties": {
          "deleted": {
            "const": true,
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "object": {
            "const": "do_not_call_entry",
            "default": "do_not_call_entry",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "number"
        ],
        "title": "DoNotCallRemoved",
        "type": "object"
      },
      "EndedBy": {
        "enum": [
          "agent",
          "caller",
          "system",
          "transfer",
          "operator",
          "failure",
          "api"
        ],
        "title": "EndedBy",
        "type": "string"
      },
      "EvaluationCreate": {
        "additionalProperties": false,
        "properties": {
          "expectations": {
            "items": {
              "$ref": "#/components/schemas/EvaluationExpectationCreate"
            },
            "maxItems": 10,
            "minItems": 1,
            "title": "Expectations",
            "type": "array"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "turns": {
            "description": "What the caller says, in order.",
            "items": {
              "maxLength": 2000,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 12,
            "minItems": 1,
            "title": "Turns",
            "type": "array"
          }
        },
        "required": [
          "name",
          "turns",
          "expectations"
        ],
        "title": "EvaluationCreate",
        "type": "object"
      },
      "EvaluationExpectation": {
        "properties": {
          "id": {
            "description": "Its name, unique in the evaluation.",
            "title": "Id",
            "type": "string"
          },
          "text": {
            "description": "What must be true of the agent's replies.",
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "text"
        ],
        "title": "EvaluationExpectation",
        "type": "object"
      },
      "EvaluationExpectationCreate": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "Its name, unique in the evaluation.",
            "maxLength": 60,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "text": {
            "description": "What must be true.",
            "maxLength": 600,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "text"
        ],
        "title": "EvaluationExpectationCreate",
        "type": "object"
      },
      "EvaluationLatest": {
        "properties": {
          "error": {
            "description": "Why it was not checked, when it was not.",
            "title": "Error",
            "type": "string"
          },
          "outcome": {
            "description": "`passed`, `failed`, or `not_checked` when it could not be rehearsed — which says nothing about the agent. New words may be added.",
            "title": "Outcome",
            "type": "string"
          },
          "rehearsed_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Rehearsed At",
            "type": "string"
          },
          "verdicts": {
            "items": {
              "$ref": "#/components/schemas/EvaluationVerdict"
            },
            "title": "Verdicts",
            "type": "array"
          }
        },
        "required": [
          "outcome",
          "verdicts",
          "error",
          "rehearsed_at"
        ],
        "title": "EvaluationLatest",
        "type": "object"
      },
      "EvaluationList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/EvaluationObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "EvaluationList",
        "type": "object"
      },
      "EvaluationObject": {
        "description": "A saved conversation: what a caller says, and what must be true of the agent's replies.",
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expectations": {
            "items": {
              "$ref": "#/components/schemas/EvaluationExpectation"
            },
            "title": "Expectations",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "latest_result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvaluationLatest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Its most recent rehearsal — from the console, from publishing or from the API — or null before the first."
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "evaluation",
            "default": "evaluation",
            "title": "Object",
            "type": "string"
          },
          "turns": {
            "description": "What the caller says, in order.",
            "items": {
              "type": "string"
            },
            "title": "Turns",
            "type": "array"
          }
        },
        "required": [
          "id",
          "agent_id",
          "name",
          "turns",
          "expectations",
          "latest_result",
          "created_at"
        ],
        "title": "EvaluationObject",
        "type": "object"
      },
      "EvaluationResult": {
        "properties": {
          "error": {
            "description": "Why it was not checked, when it was not.",
            "title": "Error",
            "type": "string"
          },
          "evaluation_id": {
            "format": "uuid",
            "title": "Evaluation Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "outcome": {
            "description": "`passed`, `failed`, or `not_checked` when it could not be rehearsed — which says nothing about the agent. New words may be added.",
            "title": "Outcome",
            "type": "string"
          },
          "transcript": {
            "description": "The rehearsal, both halves.",
            "items": {
              "$ref": "#/components/schemas/EvaluationTurn"
            },
            "title": "Transcript",
            "type": "array"
          },
          "verdicts": {
            "description": "One per expectation.",
            "items": {
              "$ref": "#/components/schemas/EvaluationVerdict"
            },
            "title": "Verdicts",
            "type": "array"
          }
        },
        "required": [
          "evaluation_id",
          "name",
          "outcome",
          "verdicts",
          "error",
          "transcript"
        ],
        "title": "EvaluationResult",
        "type": "object"
      },
      "EvaluationRunObject": {
        "description": "One rehearsal of every saved conversation an agent has.",
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "description": "Why nothing was rehearsed, when nothing was.",
            "title": "Error",
            "type": "string"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "finished_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "not_checked": {
            "title": "Not Checked",
            "type": "integer"
          },
          "object": {
            "const": "evaluation_run",
            "default": "evaluation_run",
            "title": "Object",
            "type": "string"
          },
          "passed": {
            "title": "Passed",
            "type": "integer"
          },
          "results": {
            "description": "Every saved conversation's outcome, once the run is finished.",
            "items": {
              "$ref": "#/components/schemas/EvaluationResult"
            },
            "title": "Results",
            "type": "array"
          },
          "started_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "description": "`queued`, `running` or `finished`. Ask again until it is `finished`. New words may be added.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "agent_id",
          "status",
          "passed",
          "failed",
          "not_checked",
          "results",
          "error",
          "created_at",
          "started_at",
          "finished_at"
        ],
        "title": "EvaluationRunObject",
        "type": "object"
      },
      "EvaluationTurn": {
        "properties": {
          "role": {
            "description": "`user` for what the caller said, `assistant` for the agent.",
            "title": "Role",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "role",
          "text"
        ],
        "title": "EvaluationTurn",
        "type": "object"
      },
      "EvaluationVerdict": {
        "properties": {
          "id": {
            "description": "The expectation it judges.",
            "title": "Id",
            "type": "string"
          },
          "met": {
            "title": "Met",
            "type": "boolean"
          },
          "why": {
            "description": "The judge's reason, in one sentence.",
            "title": "Why",
            "type": "string"
          }
        },
        "required": [
          "id",
          "met",
          "why"
        ],
        "title": "EvaluationVerdict",
        "type": "object"
      },
      "Event": {
        "description": "One event, as a webhook receiver was sent it — under the same id.",
        "properties": {
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "additionalProperties": true,
            "description": "What a receiver was sent: the conversation, for an event about one.",
            "title": "Data",
            "type": "object"
          },
          "event": {
            "description": "Its type, like `conversation.ended`.",
            "title": "Event",
            "type": "string"
          },
          "id": {
            "description": "The event's id, which every delivery of it carries too.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "livemode": {
            "description": "False for an event about what a test key made.",
            "title": "Livemode",
            "type": "boolean"
          },
          "object": {
            "const": "event",
            "default": "event",
            "title": "Object",
            "type": "string"
          },
          "revision": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The conversation's revision when this event was made, for an event about one. Of two copies of a conversation, keep the higher.",
            "title": "Revision"
          }
        },
        "required": [
          "id",
          "event",
          "created_at",
          "livemode",
          "revision",
          "data"
        ],
        "title": "Event",
        "type": "object"
      },
      "EventList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass it back as `cursor` for the next page. It comes back on the last page too: keep it, and ask again later for what happened since.",
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "EventList",
        "type": "object"
      },
      "Handoff": {
        "properties": {
          "contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact"
          },
          "destination": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination"
          },
          "requested_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested At"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "required": [
          "status",
          "requested_at",
          "destination",
          "summary",
          "contact"
        ],
        "title": "Handoff",
        "type": "object"
      },
      "Include": {
        "enum": [
          "transcript",
          "cost"
        ],
        "title": "Include",
        "type": "string"
      },
      "KnowledgeBaseList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeBaseObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "KnowledgeBaseList",
        "type": "object"
      },
      "KnowledgeBaseObject": {
        "properties": {
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "knowledge_base",
            "default": "knowledge_base",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "sources": {
            "description": "Files, website pages and topics in it.",
            "title": "Sources",
            "type": "integer"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "description",
          "sources",
          "created_at",
          "updated_at"
        ],
        "title": "KnowledgeBaseObject",
        "type": "object"
      },
      "KnowledgeCrawl": {
        "properties": {
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "knowledge_base_id": {
            "format": "uuid",
            "title": "Knowledge Base Id",
            "type": "string"
          },
          "last_run_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "max_pages": {
            "title": "Max Pages",
            "type": "integer"
          },
          "next_run_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Run At"
          },
          "object": {
            "const": "knowledge_crawl",
            "default": "knowledge_crawl",
            "title": "Object",
            "type": "string"
          },
          "pages_added": {
            "title": "Pages Added",
            "type": "integer"
          },
          "refresh_days": {
            "description": "Read again every this many days; 0 for never.",
            "title": "Refresh Days",
            "type": "integer"
          },
          "status": {
            "description": "How far its latest reading got. One of: `pending`, `crawling`, `awaiting_review`, `completed`, `failed`, `cancelled`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "knowledge_base_id",
          "url",
          "status",
          "pages_added",
          "max_pages",
          "error",
          "refresh_days",
          "last_run_at",
          "next_run_at",
          "created_at"
        ],
        "title": "KnowledgeCrawl",
        "type": "object"
      },
      "KnowledgeCrawlList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeCrawl"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "KnowledgeCrawlList",
        "type": "object"
      },
      "KnowledgeDocument": {
        "properties": {
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "expires_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it stops being used, if it ever does.",
            "title": "Expires At"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "items": {
            "description": "How many pieces of it agents can find.",
            "title": "Items",
            "type": "integer"
          },
          "kind": {
            "description": "`file` for a file sent to it; `url` for a page of a website it read; `topic` and `faq` for what was written in the console. One of: `file`, `faq`, `topic`, `url`. New words may be added.",
            "title": "Kind",
            "type": "string"
          },
          "knowledge_base_id": {
            "format": "uuid",
            "title": "Knowledge Base Id",
            "type": "string"
          },
          "object": {
            "const": "knowledge_document",
            "default": "knowledge_document",
            "title": "Object",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The page, for a source a website gave it.",
            "title": "Source Url"
          },
          "status": {
            "description": "`pending` until the indexer takes it, `processing` while it reads it, `indexed` once agents answer from it, `failed` when it could not — `error` says why — and `held` for a website page waiting for review in the console. One of: `pending`, `processing`, `indexed`, `failed`, `held`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "knowledge_base_id",
          "kind",
          "filename",
          "source_url",
          "size_bytes",
          "status",
          "error",
          "items",
          "expires_at",
          "created_at",
          "updated_at"
        ],
        "title": "KnowledgeDocument",
        "type": "object"
      },
      "KnowledgeDocumentDeleted": {
        "properties": {
          "deleted": {
            "const": true,
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "const": "knowledge_document",
            "default": "knowledge_document",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "KnowledgeDocumentDeleted",
        "type": "object"
      },
      "KnowledgeDocumentList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeDocument"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "KnowledgeDocumentList",
        "type": "object"
      },
      "KnowledgeDocumentStatus": {
        "enum": [
          "pending",
          "processing",
          "indexed",
          "failed",
          "held"
        ],
        "title": "KnowledgeDocumentStatus",
        "type": "string"
      },
      "Language": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "code",
          "label"
        ],
        "title": "Language",
        "type": "object"
      },
      "Languages": {
        "properties": {
          "auto_detect": {
            "title": "Auto Detect",
            "type": "boolean"
          },
          "available": {
            "description": "Each language this agent speaks besides its base one. Send its `code` as `language` to use it.",
            "items": {
              "$ref": "#/components/schemas/Language"
            },
            "title": "Available",
            "type": "array"
          },
          "default": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The language used when a conversation asks for none.",
            "title": "Default"
          }
        },
        "required": [
          "default",
          "auto_detect",
          "available"
        ],
        "title": "Languages",
        "type": "object"
      },
      "Limits": {
        "description": "Every ceiling that applies to this key, and how much of the calls one is in use now.",
        "properties": {
          "calls_at_once": {
            "title": "Calls At Once",
            "type": "integer"
          },
          "calls_in_progress": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Calls In Progress"
          },
          "calls_per_day": {
            "title": "Calls Per Day",
            "type": "integer"
          },
          "calls_per_minute": {
            "title": "Calls Per Minute",
            "type": "integer"
          },
          "reads_per_minute": {
            "title": "Reads Per Minute",
            "type": "integer"
          },
          "writes_per_minute": {
            "title": "Writes Per Minute",
            "type": "integer"
          }
        },
        "required": [
          "reads_per_minute",
          "writes_per_minute",
          "calls_per_minute",
          "calls_per_day",
          "calls_at_once",
          "calls_in_progress"
        ],
        "title": "Limits",
        "type": "object"
      },
      "LiveLineObject": {
        "description": "One line of a call, as it was said.",
        "properties": {
          "at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "object": {
            "const": "live_line",
            "default": "live_line",
            "title": "Object",
            "type": "string"
          },
          "role": {
            "description": "`user` for the caller, `assistant` for the agent.",
            "title": "Role",
            "type": "string"
          },
          "seq": {
            "description": "Its place in the call, from 1. Send the last one back as `after`.",
            "title": "Seq",
            "type": "integer"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "seq",
          "role",
          "text",
          "at"
        ],
        "title": "LiveLineObject",
        "type": "object"
      },
      "LiveTranscript": {
        "description": "What was said on a call since `after`, as it is said.",
        "properties": {
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "ended": {
            "description": "Whether the call has ended and every line it reported has been read: stop asking, and read the conversation's transcript for the record.",
            "title": "Ended",
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/LiveLineObject"
            },
            "title": "Lines",
            "type": "array"
          },
          "next_after": {
            "description": "Send this back as `after` to read only what follows.",
            "title": "Next After",
            "type": "integer"
          },
          "object": {
            "const": "live_transcript",
            "default": "live_transcript",
            "title": "Object",
            "type": "string"
          },
          "status": {
            "description": "The conversation's status, as on the conversation.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "conversation_id",
          "status",
          "lines",
          "next_after",
          "ended"
        ],
        "title": "LiveTranscript",
        "type": "object"
      },
      "McpServerCreate": {
        "additionalProperties": false,
        "properties": {
          "allowed_tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 60,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Tools"
          },
          "auth_key_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A tool credential from the vault, assigned to the project.",
            "title": "Auth Key Id"
          },
          "name": {
            "description": "snake_case: it prefixes every tool name from it.",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9_]{0,63}$",
            "title": "Name",
            "type": "string"
          },
          "project_id": {
            "description": "The project it belongs to.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "timeout_ms": {
            "default": 8000,
            "maximum": 30000.0,
            "minimum": 500.0,
            "title": "Timeout Ms",
            "type": "integer"
          },
          "url": {
            "maxLength": 1024,
            "minLength": 8,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "name",
          "url"
        ],
        "title": "McpServerCreate",
        "type": "object"
      },
      "McpServerList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/McpServerObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "McpServerList",
        "type": "object"
      },
      "McpServerObject": {
        "description": "One remote MCP server whose tools an agent can be given.",
        "properties": {
          "allowed_tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only these of its tools; null for all.",
            "title": "Allowed Tools"
          },
          "auth_key_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The vault credential sent with each request.",
            "title": "Auth Key Id"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "The first half of every tool name the model is shown from it.",
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "mcp_server",
            "default": "mcp_server",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "timeout_ms": {
            "title": "Timeout Ms",
            "type": "integer"
          },
          "url": {
            "description": "Its address, with the path and query hidden: a hosted server's path is often its credential.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "url",
          "auth_key_id",
          "allowed_tools",
          "timeout_ms",
          "created_at"
        ],
        "title": "McpServerObject",
        "type": "object"
      },
      "McpServerUpdate": {
        "additionalProperties": false,
        "description": "Send only what changes; `null` clears `auth_key_id` or `allowed_tools`.",
        "properties": {
          "allowed_tools": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 60,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Tools"
          },
          "auth_key_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Key Id"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "pattern": "^[a-z][a-z0-9_]{0,63}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "timeout_ms": {
            "anyOf": [
              {
                "maximum": 30000.0,
                "minimum": 500.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timeout Ms"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 1024,
                "minLength": 8,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "McpServerUpdate",
        "type": "object"
      },
      "Me": {
        "properties": {
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          },
          "daily_call_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Call Limit"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/Limits"
          },
          "mode": {
            "enum": [
              "live",
              "test"
            ],
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "api_key",
            "default": "api_key",
            "title": "Object",
            "type": "string"
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationRef"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "reach": {
            "$ref": "#/components/schemas/Reach"
          }
        },
        "required": [
          "id",
          "name",
          "mode",
          "permissions",
          "reach",
          "daily_call_limit",
          "organization",
          "capabilities",
          "limits"
        ],
        "title": "Me",
        "type": "object"
      },
      "MessageCreate": {
        "additionalProperties": false,
        "properties": {
          "attachment_ids": {
            "description": "Pictures to send with it, from `POST /v1/attachments`.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 4,
            "title": "Attachment Ids",
            "type": "array"
          },
          "message": {
            "description": "What the person wrote.",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "stream": {
            "default": false,
            "description": "Send the reply as it is written, as server-sent events. `Accept: text/event-stream` does the same.",
            "title": "Stream",
            "type": "boolean"
          }
        },
        "required": [
          "message"
        ],
        "title": "MessageCreate",
        "type": "object"
      },
      "NoteRequest": {
        "additionalProperties": false,
        "properties": {
          "respond": {
            "default": false,
            "description": "Whether the agent answers it at once, rather than using it on its next turn.",
            "title": "Respond",
            "type": "boolean"
          },
          "text": {
            "description": "Information for the agent from your own systems. It reaches the agent as information, never as instructions, and the caller does not hear it.",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "NoteRequest",
        "type": "object"
      },
      "Order": {
        "enum": [
          "newest",
          "oldest",
          "changed"
        ],
        "title": "Order",
        "type": "string"
      },
      "OrganizationRef": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "OrganizationRef",
        "type": "object"
      },
      "Outcome": {
        "enum": [
          "success",
          "partial",
          "failure",
          "unknown"
        ],
        "title": "Outcome",
        "type": "string"
      },
      "PhoneNumber": {
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent this number belongs to: it answers when the number is called.",
            "title": "Agent Id"
          },
          "can_place_calls": {
            "description": "Whether an agent may call from this number — `phone_number_id` on a call.",
            "title": "Can Place Calls",
            "type": "boolean"
          },
          "can_receive_calls": {
            "title": "Can Receive Calls",
            "type": "boolean"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "direction": {
            "description": "Which way it carries calls. One of: `inbound`, `outbound`, `both`. New words may be added.",
            "title": "Direction",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "number": {
            "description": "The number in international format, like `+966112345678`.",
            "title": "Number",
            "type": "string"
          },
          "object": {
            "const": "phone_number",
            "default": "phone_number",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "description": "Whether it is in service. One of: `active`, `disabled`. New words may be added.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "project_id",
          "agent_id",
          "direction",
          "status",
          "can_receive_calls",
          "can_place_calls",
          "created_at"
        ],
        "title": "PhoneNumber",
        "type": "object"
      },
      "PhoneNumberList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PhoneNumber"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "PhoneNumberList",
        "type": "object"
      },
      "PhoneNumberUpdate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent the number belongs to, in the number's project — or `null` for none. Required: leaving it out is not the same as `null`.",
            "title": "Agent Id"
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "PhoneNumberUpdate",
        "type": "object"
      },
      "Problem": {
        "description": "RFC 9457 problem details — what every `/v1` error answers with.",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "errors": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Errors"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "integer"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "request_id"
        ],
        "title": "Problem",
        "type": "object"
      },
      "Project": {
        "properties": {
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "frozen": {
            "title": "Frozen",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "project",
            "default": "project",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "frozen",
          "created_at"
        ],
        "title": "Project",
        "type": "object"
      },
      "ProjectList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Project"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ProjectList",
        "type": "object"
      },
      "Reach": {
        "properties": {
          "addresses": {
            "description": "The address ranges the key works from, in CIDR form. Empty: anywhere.",
            "items": {
              "type": "string"
            },
            "title": "Addresses",
            "type": "array"
          },
          "agent_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Agent Ids",
            "type": "array"
          },
          "all_projects": {
            "title": "All Projects",
            "type": "boolean"
          },
          "project_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Project Ids",
            "type": "array"
          }
        },
        "required": [
          "all_projects",
          "project_ids",
          "agent_ids",
          "addresses"
        ],
        "title": "Reach",
        "type": "object"
      },
      "Recording": {
        "properties": {
          "audio_channels": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Who is on each channel of the stereo file: the caller left, the agent right.",
            "title": "Audio Channels",
            "type": "object"
          },
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "expires_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "object": {
            "const": "recording",
            "default": "recording",
            "title": "Object",
            "type": "string"
          },
          "url": {
            "description": "A link to the audio. It stops working at `expires_at`.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "conversation_id",
          "url",
          "expires_at",
          "content_type",
          "audio_channels",
          "duration_seconds"
        ],
        "title": "Recording",
        "type": "object"
      },
      "Removed": {
        "properties": {
          "deleted": {
            "const": true,
            "default": true,
            "title": "Deleted",
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "object": {
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "object",
          "id"
        ],
        "title": "Removed",
        "type": "object"
      },
      "SayRequest": {
        "additionalProperties": false,
        "properties": {
          "text": {
            "description": "Said by the agent, word for word, in its voice.",
            "maxLength": 500,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "SayRequest",
        "type": "object"
      },
      "ScheduledCall": {
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The published version it will be answered with, when the request pinned one.",
            "title": "Agent Version"
          },
          "call_window": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallWindow"
              },
              {
                "type": "null"
              }
            ]
          },
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The conversation, once it is placed.",
            "title": "Conversation Id"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dial_at": {
            "description": "When it will be placed — already moved into its window, if it has one.",
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Dial At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it was refused at its time — the code `POST /v1/calls` would answer.",
            "title": "Error Code"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "finished_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "from_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Number Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "livemode": {
            "title": "Livemode",
            "type": "boolean"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "object": {
            "const": "scheduled_call",
            "default": "scheduled_call",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "description": "`scheduled` until its time; `placed` once it became a conversation; `cancelled` if you called it off; `failed` if it was refused at its time. One of: `scheduled`, `placed`, `cancelled`, `failed`. New words may be added.",
            "title": "Status",
            "type": "string"
          },
          "to_number": {
            "title": "To Number",
            "type": "string"
          },
          "variables": {
            "additionalProperties": true,
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "livemode",
          "dial_at",
          "project_id",
          "agent_id",
          "to_number",
          "from_number_id",
          "language",
          "variables",
          "metadata",
          "external_id",
          "agent_version",
          "call_window",
          "conversation_id",
          "error_code",
          "error",
          "created_at",
          "finished_at"
        ],
        "title": "ScheduledCall",
        "type": "object"
      },
      "ScheduledCallCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "description": "The outbound agent that makes the call.",
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Answer with this published version of the agent rather than what is live now — its number from `GET /v1/agents/{id}/versions`. Its values and languages are that version's, and every turn of the conversation keeps it.",
            "title": "Agent Version"
          },
          "call_window": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallWindow"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only start the call within these hours. Outside them it is refused with `outside_call_window`, which says when the window opens — schedule it for then with `POST /v1/scheduled-calls`."
          },
          "dial_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The earliest the call may be placed. Now unless you say; with a `call_window`, the window's first opening at or after it. At most 30 days ahead.",
            "title": "Dial At"
          },
          "external_id": {
            "anyOf": [
              {
                "description": "Your own id for this conversation — a lead, a ticket, an order. Find it again with `GET /v1/conversations?external_id=`. Not unique, and not the `Idempotency-Key`.",
                "maxLength": 200,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "from_number": {
            "anyOf": [
              {
                "maxLength": 32,
                "minLength": 2,
                "pattern": "^\\+?[0-9]{2,31}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's numbers to call from. Or send `phone_number_id`, never both; with neither, the agent's own number.",
            "title": "From Number"
          },
          "language": {
            "anyOf": [
              {
                "maxLength": 16,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's language versions, like `ar`.",
            "title": "Language"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Your own data, returned on every read and event. The agent never sees it.",
            "maxProperties": 20,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's numbers to call from, by its id.",
            "title": "Phone Number Id"
          },
          "to_number": {
            "description": "The number to call, in international format, like `+966501234567`.",
            "examples": [
              "+966501234567"
            ],
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^\\+?[0-9]{2,31}$",
            "title": "To Number",
            "type": "string"
          },
          "variables": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Values for the agent's `{{placeholders}}` — text, numbers or true/false. See the agent's `variables_schema`.",
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "agent_id",
          "to_number"
        ],
        "title": "ScheduledCallCreate",
        "type": "object"
      },
      "ScheduledCallList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ScheduledCall"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ScheduledCallList",
        "type": "object"
      },
      "ScheduledCallStatus": {
        "enum": [
          "scheduled",
          "placed",
          "cancelled",
          "failed"
        ],
        "title": "ScheduledCallStatus",
        "type": "string"
      },
      "SecretRotation": {
        "additionalProperties": false,
        "properties": {
          "keep_previous_for": {
            "default": "now",
            "description": "How long the old secret keeps signing beside the new one: `now` ends it at once, which is the answer to a leak; an overlap lets you update your receiver first.",
            "enum": [
              "now",
              "1h",
              "24h",
              "7d"
            ],
            "title": "Keep Previous For",
            "type": "string"
          }
        },
        "title": "SecretRotation",
        "type": "object"
      },
      "TestInboundCall": {
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          },
          "lookup": {
            "$ref": "#/components/schemas/TestLookup"
          },
          "object": {
            "const": "test_inbound_call",
            "default": "test_inbound_call",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "conversation",
          "lookup"
        ],
        "title": "TestInboundCall",
        "type": "object"
      },
      "TestInboundCallCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The inbound agent the call reaches. Or send `phone_number_id`.",
            "title": "Agent Id"
          },
          "from_number": {
            "description": "The test number the call comes from, like `+12025550100`.",
            "examples": [
              "+12025550100"
            ],
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^\\+?[0-9]{2,31}$",
            "title": "From Number",
            "type": "string"
          },
          "phone_number_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of your numbers; the call reaches the agent it rings.",
            "title": "Phone Number Id"
          }
        },
        "required": [
          "from_number"
        ],
        "title": "TestInboundCallCreate",
        "type": "object"
      },
      "TestLookup": {
        "description": "What the agent's context lookup made of a test call.",
        "properties": {
          "accepted": {
            "additionalProperties": true,
            "description": "The values the agent will use.",
            "title": "Accepted",
            "type": "object"
          },
          "greeting": {
            "description": "The agent's opening line, with the values in it.",
            "title": "Greeting",
            "type": "string"
          },
          "ignored": {
            "description": "Names it sent that this agent never uses.",
            "items": {
              "type": "string"
            },
            "title": "Ignored",
            "type": "array"
          },
          "ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ms"
          },
          "problems": {
            "items": {
              "$ref": "#/components/schemas/ContextProblem"
            },
            "title": "Problems",
            "type": "array"
          },
          "source": {
            "description": "Where the answer came from: your machine through `aigently listen`, the test address, the sample answer on the agent's Phone settings, or nowhere — the agent has no lookup.",
            "enum": [
              "listen",
              "test_address",
              "sample",
              "none"
            ],
            "title": "Source",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "As `context.status`; null with no lookup.",
            "title": "Status"
          }
        },
        "required": [
          "source",
          "status",
          "ms",
          "accepted",
          "ignored",
          "problems",
          "greeting"
        ],
        "title": "TestLookup",
        "type": "object"
      },
      "ToolCreate": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "http": {
            "additionalProperties": true,
            "description": "`method`, `url`, `headers`, `auth` — `{\"type\": \"bearer\", \"vault_key_id\": …}` names a credential from `POST /v1/vault/secrets` — and `timeout_ms`.",
            "title": "Http",
            "type": "object"
          },
          "name": {
            "description": "What the model calls it: letters, digits and underscores.",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
            "title": "Name",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": true,
            "description": "The JSON Schema of what the model sends it.",
            "title": "Parameters",
            "type": "object"
          },
          "project_id": {
            "description": "The project it belongs to.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "speaking_hint": {
            "default": "",
            "maxLength": 200,
            "title": "Speaking Hint",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "name",
          "description",
          "parameters",
          "http"
        ],
        "title": "ToolCreate",
        "type": "object"
      },
      "ToolList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ToolObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "ToolList",
        "type": "object"
      },
      "ToolObject": {
        "description": "One tool: an HTTP request an agent can make mid-conversation, described for its model.",
        "properties": {
          "agent_count": {
            "description": "How many agents carry it: who an edit reaches.",
            "title": "Agent Count",
            "type": "integer"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "description": "What the model is told it does.",
            "title": "Description",
            "type": "string"
          },
          "http": {
            "additionalProperties": true,
            "description": "The request: `method`, `url` (with `{slots}` the model fills), `headers`, `auth` and `timeout_ms`. Header values are hidden: keep secrets in the vault and name them in `auth`.",
            "title": "Http",
            "type": "object"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "What the model calls it.",
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "tool",
            "default": "tool",
            "title": "Object",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": true,
            "description": "The JSON Schema of what the model sends it.",
            "title": "Parameters",
            "type": "object"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "speaking_hint": {
            "description": "Said on a call while it runs, if the model does not.",
            "title": "Speaking Hint",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "name",
          "description",
          "parameters",
          "http",
          "speaking_hint",
          "agent_count",
          "created_at"
        ],
        "title": "ToolObject",
        "type": "object"
      },
      "ToolUpdate": {
        "additionalProperties": false,
        "description": "Send only what changes.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "http": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The whole request again. A value still reading `••••` as it was read keeps what is stored.",
            "title": "Http"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "speaking_hint": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Speaking Hint"
          }
        },
        "title": "ToolUpdate",
        "type": "object"
      },
      "Transcript": {
        "properties": {
          "conversation_id": {
            "format": "uuid",
            "title": "Conversation Id",
            "type": "string"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/TranscriptEntry"
            },
            "title": "Entries",
            "type": "array"
          },
          "object": {
            "const": "transcript",
            "default": "transcript",
            "title": "Object",
            "type": "string"
          },
          "truncated": {
            "description": "Whether a long chat's oldest lines were dropped.",
            "title": "Truncated",
            "type": "boolean"
          }
        },
        "required": [
          "conversation_id",
          "truncated",
          "entries"
        ],
        "title": "Transcript",
        "type": "object"
      },
      "TranscriptEntry": {
        "properties": {
          "arguments": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arguments"
          },
          "at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "At"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "elapsed_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Elapsed Ms"
          },
          "index": {
            "title": "Index",
            "type": "integer"
          },
          "interrupted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interrupted"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What a note is about.",
            "title": "Kind"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A tool's name.",
            "title": "Name"
          },
          "offset_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the line falls in the recording.",
            "title": "Offset Seconds"
          },
          "role": {
            "description": "`user`, `assistant`, `tool` or `note`.",
            "title": "Role",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How a tool call went.",
            "title": "Status"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "required": [
          "index",
          "role",
          "at"
        ],
        "title": "TranscriptEntry",
        "type": "object"
      },
      "TransferRequest": {
        "additionalProperties": false,
        "properties": {
          "summary": {
            "default": "",
            "description": "What the person who answers is told.",
            "maxLength": 1000,
            "title": "Summary",
            "type": "string"
          },
          "to_number": {
            "anyOf": [
              {
                "maxLength": 32,
                "minLength": 2,
                "pattern": "^\\+?[0-9]{2,31}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where to put the caller through, in international format, like `+966501234567`. Leave it out for the agent's own transfer number.",
            "title": "To Number"
          }
        },
        "title": "TransferRequest",
        "type": "object"
      },
      "UnboundReference": {
        "properties": {
          "consequence": {
            "description": "What the agent does without it.",
            "title": "Consequence",
            "type": "string"
          },
          "kind": {
            "description": "`tool`, `MCP server`, `knowledge base`, `calendar`, `callback agent` or `voice setting`, in the console's own words. New words may be added.",
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "name",
          "consequence"
        ],
        "title": "UnboundReference",
        "type": "object"
      },
      "VaultSecretCreate": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "project_ids": {
            "description": "The projects whose tools may send it.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "title": "Project Ids",
            "type": "array"
          },
          "provider": {
            "default": "custom",
            "maxLength": 60,
            "minLength": 1,
            "title": "Provider",
            "type": "string"
          },
          "secret": {
            "description": "The value. Never sent back.",
            "maxLength": 512,
            "minLength": 8,
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "name",
          "secret"
        ],
        "title": "VaultSecretCreate",
        "type": "object"
      },
      "VaultSecretList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/VaultSecretObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "VaultSecretList",
        "type": "object"
      },
      "VaultSecretObject": {
        "description": "A tool credential in the vault. Its value is never sent back, by anything.",
        "properties": {
          "bound_hosts": {
            "description": "Where it may be sent: pinned by its first use. Only an owner, in the console, sends it somewhere new.",
            "items": {
              "type": "string"
            },
            "title": "Bound Hosts",
            "type": "array"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_four": {
            "description": "Its last four characters, to tell two apart.",
            "title": "Last Four",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "vault_secret",
            "default": "vault_secret",
            "title": "Object",
            "type": "string"
          },
          "project_ids": {
            "description": "The projects whose tools may send it.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Project Ids",
            "type": "array"
          },
          "provider": {
            "description": "Your own label for whose credential it is.",
            "title": "Provider",
            "type": "string"
          },
          "status": {
            "description": "`active`, or `revoked`. New words may be added.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "provider",
          "last_four",
          "status",
          "project_ids",
          "bound_hosts",
          "created_at"
        ],
        "title": "VaultSecretObject",
        "type": "object"
      },
      "VaultSecretUpdate": {
        "additionalProperties": false,
        "description": "Send only what changes.",
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "project_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The whole list of projects again.",
            "title": "Project Ids"
          },
          "provider": {
            "anyOf": [
              {
                "maxLength": 60,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your own label for whose it is.",
            "title": "Provider"
          },
          "secret": {
            "anyOf": [
              {
                "maxLength": 512,
                "minLength": 8,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A new value, replacing the old.",
            "title": "Secret"
          }
        },
        "title": "VaultSecretUpdate",
        "type": "object"
      },
      "WebCall": {
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          },
          "expires_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "object": {
            "const": "web_call",
            "default": "web_call",
            "title": "Object",
            "type": "string"
          },
          "token": {
            "description": "Joins this one call, from the page, for 15 minutes. Give it to the page that will talk, and to nobody else.",
            "title": "Token",
            "type": "string"
          },
          "url": {
            "description": "The voice service's address, for the page to join.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "conversation",
          "url",
          "token",
          "expires_at"
        ],
        "title": "WebCall",
        "type": "object"
      },
      "WebCallCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "description": "The agent to talk to. Browser voice must be on.",
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "agent_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Answer with this published version of the agent rather than what is live now — its number from `GET /v1/agents/{id}/versions`. Its values and languages are that version's, and every turn of the conversation keeps it.",
            "title": "Agent Version"
          },
          "external_id": {
            "anyOf": [
              {
                "description": "Your own id for this conversation — a lead, a ticket, an order. Find it again with `GET /v1/conversations?external_id=`. Not unique, and not the `Idempotency-Key`.",
                "maxLength": 200,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "language": {
            "anyOf": [
              {
                "maxLength": 16,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "One of the agent's language versions, like `ar`.",
            "title": "Language"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Your own data, returned on every read and event. The agent never sees it.",
            "maxProperties": 20,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          },
          "participant_name": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the call names the person in the page. `Caller` unless you say.",
            "title": "Participant Name"
          },
          "variables": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Values for the agent's `{{placeholders}}`. See its `variables_schema`.",
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "agent_id"
        ],
        "title": "WebCallCreate",
        "type": "object"
      },
      "WebhookDelivery": {
        "properties": {
          "attempts": {
            "title": "Attempts",
            "type": "integer"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "event": {
            "title": "Event",
            "type": "string"
          },
          "event_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The event's id, as the event feed lists it.",
            "title": "Event Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_error": {
            "description": "Why the last attempt failed, when it did.",
            "title": "Last Error",
            "type": "string"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it is tried next, while pending.",
            "title": "Next Attempt At"
          },
          "object": {
            "const": "webhook_delivery",
            "default": "webhook_delivery",
            "title": "Object",
            "type": "string"
          },
          "status": {
            "description": "`pending`, `delivered` or `failed`.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_id",
          "event",
          "status",
          "attempts",
          "last_error",
          "created_at",
          "delivered_at",
          "next_attempt_at"
        ],
        "title": "WebhookDelivery",
        "type": "object"
      },
      "WebhookDeliveryList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "WebhookDeliveryList",
        "type": "object"
      },
      "WebhookDeliveryStatus": {
        "enum": [
          "pending",
          "delivered",
          "failed"
        ],
        "title": "WebhookDeliveryStatus",
        "type": "string"
      },
      "WebhookReceiver": {
        "properties": {
          "agent_ids": {
            "description": "Empty is every agent in the project.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Agent Ids",
            "type": "array"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "include_values": {
            "title": "Include Values",
            "type": "boolean"
          },
          "livemode": {
            "description": "A live receiver hears real conversations; a test one, only what test keys made.",
            "title": "Livemode",
            "type": "boolean"
          },
          "object": {
            "const": "webhook_receiver",
            "default": "webhook_receiver",
            "title": "Object",
            "type": "string"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "While a rotated secret's predecessor still signs beside it, when it stops.",
            "title": "Previous Secret Expires At"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "url",
          "events",
          "enabled",
          "livemode",
          "include_values",
          "agent_ids",
          "previous_secret_expires_at",
          "created_at"
        ],
        "title": "WebhookReceiver",
        "type": "object"
      },
      "WebhookReceiverCreate": {
        "additionalProperties": false,
        "properties": {
          "agent_ids": {
            "description": "Only these agents' conversations. Empty is every agent in the project.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 100,
            "title": "Agent Ids",
            "type": "array"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The events it hears. Leave it out for the defaults: everything but `conversation.transcript` and `form.abandoned`.",
            "title": "Events"
          },
          "include_values": {
            "default": true,
            "description": "Whether events carry the values a conversation started with, your metadata and both phone numbers.",
            "title": "Include Values",
            "type": "boolean"
          },
          "project_id": {
            "description": "The project whose conversations it hears.",
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "url": {
            "description": "Where events are POSTed: a public `https` address.",
            "examples": [
              "https://hooks.aigently.ai/aigently"
            ],
            "maxLength": 1024,
            "minLength": 8,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "url"
        ],
        "title": "WebhookReceiverCreate",
        "type": "object"
      },
      "WebhookReceiverList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookReceiver"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "WebhookReceiverList",
        "type": "object"
      },
      "WebhookReceiverUpdate": {
        "additionalProperties": false,
        "properties": {
          "agent_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only these agents' conversations; an empty list is every agent.",
            "title": "Agent Ids"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "False stops its deliveries.",
            "title": "Enabled"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The events it hears.",
            "title": "Events"
          },
          "include_values": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether events carry a conversation's values and numbers.",
            "title": "Include Values"
          }
        },
        "title": "WebhookReceiverUpdate",
        "type": "object"
      },
      "WebhookReceiverWithSecret": {
        "properties": {
          "agent_ids": {
            "description": "Empty is every agent in the project.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Agent Ids",
            "type": "array"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "include_values": {
            "title": "Include Values",
            "type": "boolean"
          },
          "livemode": {
            "description": "A live receiver hears real conversations; a test one, only what test keys made.",
            "title": "Livemode",
            "type": "boolean"
          },
          "object": {
            "const": "webhook_receiver",
            "default": "webhook_receiver",
            "title": "Object",
            "type": "string"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "examples": [
                  "2026-10-07T09:14:03.120394+00:00"
                ],
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "While a rotated secret's predecessor still signs beside it, when it stops.",
            "title": "Previous Secret Expires At"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "secret": {
            "description": "The signing secret. Shown when the receiver is made and when its secret is changed, and never again.",
            "title": "Secret",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "url",
          "events",
          "enabled",
          "livemode",
          "include_values",
          "agent_ids",
          "previous_secret_expires_at",
          "created_at",
          "secret"
        ],
        "title": "WebhookReceiverWithSecret",
        "type": "object"
      },
      "WebhookTest": {
        "properties": {
          "detail": {
            "description": "`delivered`, or why it was not.",
            "title": "Detail",
            "type": "string"
          },
          "object": {
            "const": "webhook_test",
            "default": "webhook_test",
            "title": "Object",
            "type": "string"
          },
          "ok": {
            "title": "Ok",
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "detail"
        ],
        "title": "WebhookTest",
        "type": "object"
      },
      "WhatsappConversationCreate": {
        "additionalProperties": false,
        "properties": {
          "external_id": {
            "anyOf": [
              {
                "description": "Your own id for this conversation — a lead, a ticket, an order. Find it again with `GET /v1/conversations?external_id=`. Not unique, and not the `Idempotency-Key`.",
                "maxLength": 200,
                "minLength": 1,
                "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "metadata": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Your own data, returned on every read and event. The agent never sees it.",
            "maxProperties": 20,
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Metadata",
            "type": "object"
          },
          "sender_id": {
            "description": "The WhatsApp number to send from.",
            "format": "uuid",
            "title": "Sender Id",
            "type": "string"
          },
          "template": {
            "$ref": "#/components/schemas/WhatsappTemplateChoice"
          },
          "to_number": {
            "description": "The person's WhatsApp number, in international format, like `+966501234567`.",
            "maxLength": 32,
            "minLength": 2,
            "pattern": "^\\+?[0-9]{2,31}$",
            "title": "To Number",
            "type": "string"
          },
          "variables": {
            "additionalProperties": {
              "anyOf": [
                {
                  "maxLength": 500,
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Values for the agent's `{{placeholders}}`, for when the person answers.",
            "propertyNames": {
              "maxLength": 64,
              "minLength": 1
            },
            "title": "Variables",
            "type": "object"
          }
        },
        "required": [
          "sender_id",
          "to_number",
          "template"
        ],
        "title": "WhatsappConversationCreate",
        "type": "object"
      },
      "WhatsappSenderList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WhatsappSenderObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "WhatsappSenderList",
        "type": "object"
      },
      "WhatsappSenderObject": {
        "description": "A WhatsApp number of the organization's, and the agent that answers it.",
        "properties": {
          "agent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The agent that answers it; null for none.",
            "title": "Agent Id"
          },
          "created_at": {
            "examples": [
              "2026-10-07T09:14:03.120394+00:00"
            ],
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "display_number": {
            "title": "Display Number",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "object": {
            "const": "whatsapp_sender",
            "default": "whatsapp_sender",
            "title": "Object",
            "type": "string"
          },
          "project_id": {
            "format": "uuid",
            "title": "Project Id",
            "type": "string"
          },
          "status": {
            "description": "`active` or `disabled`. New words may be added.",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "project_id",
          "agent_id",
          "display_number",
          "label",
          "status",
          "created_at"
        ],
        "title": "WhatsappSenderObject",
        "type": "object"
      },
      "WhatsappTemplateChoice": {
        "additionalProperties": false,
        "properties": {
          "language": {
            "description": "Like `en_US` or `ar`.",
            "maxLength": 16,
            "minLength": 2,
            "title": "Language",
            "type": "string"
          },
          "name": {
            "description": "As approved in WhatsApp Manager.",
            "maxLength": 512,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "parameters": {
            "description": "The values for its places, in order: `{{1}}` first.",
            "items": {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 20,
            "title": "Parameters",
            "type": "array"
          }
        },
        "required": [
          "name",
          "language"
        ],
        "title": "WhatsappTemplateChoice",
        "type": "object"
      },
      "WhatsappTemplateList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WhatsappTemplateObject"
            },
            "title": "Data",
            "type": "array"
          },
          "has_more": {
            "title": "Has More",
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "object": {
            "const": "list",
            "default": "list",
            "title": "Object",
            "type": "string"
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "title": "WhatsappTemplateList",
        "type": "object"
      },
      "WhatsappTemplateObject": {
        "description": "A message template Meta has approved for the number's business account.",
        "properties": {
          "body": {
            "description": "Its words, with `{{1}}`-style places for the values.",
            "title": "Body",
            "type": "string"
          },
          "category": {
            "description": "`marketing`, `utility` or `authentication`, as Meta says.",
            "title": "Category",
            "type": "string"
          },
          "language": {
            "description": "Its language code, like `en_US` or `ar`.",
            "title": "Language",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "object": {
            "const": "whatsapp_template",
            "default": "whatsapp_template",
            "title": "Object",
            "type": "string"
          },
          "parameters": {
            "description": "How many values it takes, in order.",
            "title": "Parameters",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "language",
          "category",
          "body",
          "parameters"
        ],
        "title": "WhatsappTemplateObject",
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "An organization API key, made on the console's API keys page.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Place calls, start chats and read conversations from your own server. Authenticate with an organization API key in `Authorization: Bearer <key>`: `ag_test_…` for test data, `ag_live_…` for real calls. Errors are RFC 9457 problem details with a stable `code`.",
    "title": "Aigently API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/agents": {
      "get": {
        "description": "The agents this key can reach, oldest first. Needs `agents:read`.",
        "operationId": "listAgents",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          },
          {
            "description": "Only these.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AgentStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only these.",
              "title": "Status"
            }
          },
          {
            "description": "Only these.",
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AgentDirection"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only these.",
              "title": "Direction"
            }
          },
          {
            "description": "Only these.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AgentKind"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only these.",
              "title": "Kind"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List agents",
        "tags": [
          "Agents"
        ]
      },
      "post": {
        "description": "Make an agent in a project from a definition. It is a draft until it is published. Everything the definition names is looked up in the project by name, and what is not there is listed in `unbound` with what the agent does without it. Needs `agents:write` and a live key.",
        "operationId": "createAgent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWritten"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such project."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project already has an agent with that name, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The definition cannot be read, or holds something an agent may not."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create an agent",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{agent_id}": {
      "delete": {
        "description": "Take the agent off the air and put it in the trash. Its conversations, recordings and numbers stay with it for 30 days, while the console can restore it; then it is gone for good. Needs `agents:write` and a live key.",
        "operationId": "deleteAgent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDeleted"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete an agent",
        "tags": [
          "Agents"
        ]
      },
      "get": {
        "description": "One agent, with what a conversation can start with (`variables_schema`), the answers it collects (`collected_schema`), what its analysis writes (`analysis_schema`), its languages and its numbers. Needs `agents:read`.",
        "operationId": "getAgent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an agent",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{agent_id}/definition": {
      "get": {
        "description": "The whole agent as a document — its prompt, configuration, voice, languages and analysis, with every tool, knowledge base and calendar it uses by name. The console's own export format: keep it in a repository, change it, and put it back. Needs `agents:write`.",
        "operationId": "getAgentDefinition",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefinition"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an agent's definition",
        "tags": [
          "Agents"
        ]
      },
      "put": {
        "description": "Put a definition back onto an agent: its prompt, configuration, voice, languages, analysis, and the tools and knowledge bases it names. On a published agent the change is live at once, as an edit in the console is, until the next publish freezes it as a version. Needs `agents:write` and a live key.",
        "operationId": "replaceAgentDefinition",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentDefinitionReplace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWritten"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project already has an agent with that name, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The definition cannot be read, holds something an agent may not, or is for another kind or direction of agent."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Replace an agent's definition",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{agent_id}/evaluation-runs": {
      "post": {
        "description": "Rehearse every saved conversation the agent has, against the agent as it is now, and judge each one. Answers at once with the run, `queued`: read it with `GET /v1/evaluation-runs/{id}` until its `status` is `finished`. Each run is charged as testing. Needs `evaluations:run`.",
        "operationId": "runEvaluations",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationRunObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Saved conversations are already being rehearsed in this organization, or the project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Run an agent's evaluations",
        "tags": [
          "Evaluations"
        ]
      }
    },
    "/v1/agents/{agent_id}/evaluations": {
      "get": {
        "description": "The conversations an agent has to keep handling, in the order they were written, each with its most recent result. Needs `evaluations:run`.",
        "operationId": "listEvaluations",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List an agent's evaluations",
        "tags": [
          "Evaluations"
        ]
      },
      "post": {
        "description": "Write down a conversation the agent has to keep handling: what the caller says, and what must be true of the replies. Publishing then rehearses it, and refuses while it fails. Needs `agents:write` and a live key.",
        "operationId": "createEvaluation",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key without `agents:write`."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent has one by that name, or as many as it can keep, or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add an evaluation",
        "tags": [
          "Evaluations"
        ]
      }
    },
    "/v1/agents/{agent_id}/evaluations/{evaluation_id}": {
      "delete": {
        "description": "Publishing stops rehearsing it, and its results go with it. Needs `agents:write` and a live key.",
        "operationId": "deleteEvaluation",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "evaluation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Evaluation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Removed"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent or evaluation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete an evaluation",
        "tags": [
          "Evaluations"
        ]
      }
    },
    "/v1/agents/{agent_id}/publish": {
      "post": {
        "description": "Put the agent live and freeze what went live as its next version — after the console's own Publish check, rehearsals and provider checks included. Refused with every reason it is not ready. Needs `agents:write` and a live key.",
        "operationId": "publishAgent",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/AgentPublishRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent is not ready — `errors` lists every reason, as the console does — or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Publish an agent",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{agent_id}/versions": {
      "get": {
        "description": "Every version the agent was published as, newest first, each with the values a conversation pinned to it takes. Pin a call, a chat or a browser call to one with `agent_version`. Needs `agents:read`.",
        "operationId": "listAgentVersions",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List an agent's versions",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/agents/{agent_id}/versions/{version}/definition": {
      "get": {
        "description": "One published version as a document, to compare with what is in your repository or to put back. Its tools and knowledge bases are the agent's as they are now: a version freezes how the agent behaves, not what it is attached to. Needs `agents:write`.",
        "operationId": "getAgentVersionDefinition",
        "parameters": [
          {
            "in": "path",
            "name": "agent_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Agent Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "title": "Version",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentDefinition"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent, or the agent has no such version."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a published version's definition",
        "tags": [
          "Agents"
        ]
      }
    },
    "/v1/attachments": {
      "post": {
        "description": "Upload a picture to send with a chat message, as `multipart/form-data` with the `agent_id` and the `file`. Send its `id` in the message's `attachment_ids`. A picture nobody sends is deleted after six hours. Needs `chats:write`.",
        "operationId": "uploadAttachment",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_uploadAttachment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The picture is larger than the agent accepts."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent does not accept pictures, or the file is not one."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Upload a picture",
        "tags": [
          "Chats"
        ]
      }
    },
    "/v1/audit-events": {
      "get": {
        "description": "Everything people and API keys did in the organization, oldest first: the console's audit log. Keep the last page's `next_cursor` and ask again later for what was done since. Events from the last minute wait for the next page. Kept 365 days. Needs `audit:read` and a key that reaches every project; a test key reads none.",
        "operationId": "listAuditEvents",
        "parameters": [
          {
            "description": "An action, like `agent.published`. Repeatable.",
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "An action, like `agent.published`. Repeatable.",
              "title": "Action"
            }
          },
          {
            "description": "Only events from this time on.",
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only events from this time on.",
              "title": "Created After"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditEventList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List audit events",
        "tags": [
          "Audit log"
        ]
      }
    },
    "/v1/billing/balance": {
      "get": {
        "description": "The organization's credit: what is on the account, what can still be spent, and what this month has spent. Needs `billing:read`.",
        "operationId": "getCreditBalance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditBalance"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get the credit balance",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/billing/transactions": {
      "get": {
        "description": "Every movement of credit, newest first: each conversation's charge, top-ups, refunds. A key limited to some projects reads their charges alone; a test key, what test keys spent. Needs `billing:read`.",
        "operationId": "listCreditTransactions",
        "parameters": [
          {
            "description": "Only this conversation's charges.",
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this conversation's charges.",
              "title": "Conversation Id"
            }
          },
          {
            "description": "Only these kinds. Repeatable.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/CreditEntryKind"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only these kinds. Repeatable.",
              "title": "Kind"
            }
          },
          {
            "description": "From this time on.",
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "From this time on.",
              "title": "Created After"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditTransactionList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List credit transactions",
        "tags": [
          "Billing"
        ]
      }
    },
    "/v1/calls": {
      "post": {
        "description": "Call a phone number with one of your outbound agents. Answers `201` with the conversation, `pending` until the phone is answered. Needs `calls:write` and an `Idempotency-Key`: the same request sent again with the same key returns the same conversation instead of calling twice.",
        "operationId": "createCall",
        "parameters": [
          {
            "description": "Your own id for this call, up to 120 characters. Required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No `Idempotency-Key`, or one longer than 120 characters."
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent does not place calls or is not published, or its project is frozen."
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The request is larger than 64 KB."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A field, a variable, the number to call or the number to call from does not fit — or the `Idempotency-Key` was already used for a different request."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not place phone calls."
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The call could not be placed. Try again shortly."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Place a call",
        "tags": [
          "Calls"
        ],
        "x-idempotency-key": "required"
      }
    },
    "/v1/campaigns": {
      "get": {
        "description": "Your campaigns, newest first, each with how many of its contacts are in each state. Filter by `agent_id` and `status`. A test key lists none: every campaign is live. Needs `campaigns:read`.",
        "operationId": "listCampaigns",
        "parameters": [
          {
            "description": "Only this agent's.",
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this agent's.",
              "title": "Agent Id"
            }
          },
          {
            "description": "Only campaigns in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CampaignStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only campaigns in this state.",
              "title": "Status"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List campaigns",
        "tags": [
          "Campaigns"
        ]
      },
      "post": {
        "description": "A list of people for an outbound agent to call, at the pace and in the hours you set. It is a draft until it starts: send `start: true` to start dialling at once, `start_at` to start at a moment of your choosing, or neither and start it later. Up to 1,000 contacts in one request; add more with `POST /v1/campaigns/{id}/contacts`. Needs `campaigns:write`, a live key and an `Idempotency-Key`.",
        "operationId": "createCampaign",
        "parameters": [
          {
            "description": "Your own id for this request, up to 120 characters. Required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No `Idempotency-Key`."
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a campaign rings real people."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent, or no such number to call from."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent answers calls rather than placing them, it cannot place a call yet — not published, no number to call from — or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A contact does not fit — `errors` names each by its place in `contacts` — the start time has passed, or the `Idempotency-Key` was used for another request."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not place phone calls."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create a campaign",
        "tags": [
          "Campaigns"
        ],
        "x-idempotency-key": "required"
      }
    },
    "/v1/campaigns/{campaign_id}": {
      "get": {
        "description": "One campaign: its settings, its state, and how many of its contacts are waiting, being called, done or given up on. Needs `campaigns:read`.",
        "operationId": "getCampaign",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/v1/campaigns/{campaign_id}/cancel": {
      "post": {
        "description": "Stop it for good: nobody else on the list is called. Calls already in progress carry on. A cancelled campaign cannot be started again. Needs `campaigns:write` and a live key.",
        "operationId": "cancelCampaign",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a campaign rings real people."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The campaign is not in a state this applies to, or has finished."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Cancel a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/v1/campaigns/{campaign_id}/contacts": {
      "get": {
        "description": "Each person in the campaign and how it went: waiting, being called, done, given up on after every try, or not called at all and why — with the last conversation, your own `metadata` and `external_id`. In the order they were added. Filter by `status`. Needs `campaigns:read`.",
        "operationId": "listCampaignContacts",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          },
          {
            "description": "Only contacts in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CampaignContactStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only contacts in this state.",
              "title": "Status"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignContactList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a campaign's contacts",
        "tags": [
          "Campaigns"
        ]
      },
      "post": {
        "description": "Up to 1,000 more people, to a campaign that is a draft, running or paused. A running campaign starts calling them in its next calling hours. A number the campaign already holds is skipped and listed in `already_in_campaign`, so sending a batch again is safe. Needs `campaigns:write` and a live key.",
        "operationId": "addCampaignContacts",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignContactsCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignContactsAdded"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a campaign rings real people."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The campaign has finished: create a new one for a new list."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A contact does not fit — `errors` names each by its place in `contacts`."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add contacts to a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/v1/campaigns/{campaign_id}/pause": {
      "post": {
        "description": "Stop placing new calls. Calls already in progress carry on, and every contact keeps its place, so resuming picks up where it stopped. Pausing a paused campaign answers it as it is. Needs `campaigns:write` and a live key.",
        "operationId": "pauseCampaign",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a campaign rings real people."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The campaign is not in a state this applies to, or has finished."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Pause a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/v1/campaigns/{campaign_id}/resume": {
      "post": {
        "description": "Start a paused campaign dialling again. With `reset_attempts`, everybody not reached so far gets every try back. Checked like a start. Needs `campaigns:write` and a live key.",
        "operationId": "resumeCampaign",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CampaignResume"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a campaign rings real people."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The campaign is not in a state this applies to, or has finished."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not place phone calls."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Resume a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/v1/campaigns/{campaign_id}/start": {
      "post": {
        "description": "Start dialling a draft now, in its calling hours. Checked first: a campaign that cannot place a single call is refused here, not left running. Starting one that is running answers it as it is. Needs `campaigns:write` and a live key.",
        "operationId": "startCampaign",
        "parameters": [
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Campaign Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a campaign rings real people."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such campaign."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The campaign has finished, or cannot place a call yet: the agent is not published, it has no number to call from, or contacts lack a value the agent says out loud."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not place phone calls."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/v1/chats": {
      "post": {
        "description": "Start a chat with one of your agents by sending its first message. Answers `201` with the first `chat.turn`: the agent's greeting in `opening`, and its reply. Send `stream: true` for the reply as server-sent events. Needs `chats:write`. An `Idempotency-Key` is optional: the same request again returns the same chat.",
        "operationId": "createChat",
        "parameters": [
          {
            "description": "Your own id for this chat. Optional.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatTurn"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent is not published, its project is frozen, or the first message is still being answered."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A field, a variable or the language does not fit."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a chat",
        "tags": [
          "Chats"
        ],
        "x-idempotency-key": "optional"
      }
    },
    "/v1/contacts": {
      "get": {
        "description": "The people in your phonebook, newest first. `phone` finds one person by their number; `project_id` keeps to one project. A test key lists none. Needs `contacts:read`.",
        "operationId": "listContacts",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          },
          {
            "description": "Only the person with this number.",
            "in": "query",
            "name": "phone",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 40,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the person with this number.",
              "title": "Phone"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List contacts",
        "tags": [
          "Contacts"
        ]
      },
      "post": {
        "description": "One person to a project's phonebook: their number, the name the console shows, the `attributes` an agent can say about them, and their time zone. A number already there is `409 contact_exists` — to add or update many at once, import them. Needs `contacts:write` and a live key.",
        "operationId": "createContact",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such project."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The number is already in the project's phonebook, or the project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a phone number, or not a time zone."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/v1/contacts/import": {
      "post": {
        "description": "Add up to 1,000 people to a project's phonebook in one request, matched by number: a number already there is updated, or left alone with `update_existing: false`. Rows that do not fit are listed in `errors` by their place in `contacts`, and the rest are taken — so sending a corrected list again is the way to fix it. Needs `contacts:write` and a live key.",
        "operationId": "importContacts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactImport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactImported"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such project."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Import contacts",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/v1/contacts/{contact_id}": {
      "delete": {
        "description": "Take somebody out of your phonebook and every group they are in. The calls already made to them stay where they are. Needs `contacts:write` and a live key.",
        "operationId": "deleteContact",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDeleted"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such contact."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a contact",
        "tags": [
          "Contacts"
        ]
      },
      "get": {
        "description": "One person in your phonebook. Needs `contacts:read`.",
        "operationId": "getContact",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such contact."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a contact",
        "tags": [
          "Contacts"
        ]
      },
      "patch": {
        "description": "Change what you send and keep the rest. `attributes` is replaced whole: send every attribute the person should have. Campaigns already made keep the details they copied; the next one, and the next inbound call, read these. Needs `contacts:write` and a live key.",
        "operationId": "updateContact",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such contact."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Another contact in the project has the new number, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a phone number, or not a time zone."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/v1/conversations": {
      "get": {
        "description": "Conversations this key can reach, newest first. Use `order=changed` with `changed_after` to sync: oldest change first, and the last page's `next_cursor` is the place to ask again from later. Changes from the last minute wait for the next page. With `q`, only conversations whose transcript has those words, each with the passage that matched — which also needs `transcripts:read`, 30 a minute per key. Needs `conversations:read`.",
        "operationId": "listConversations",
        "parameters": [
          {
            "description": "`newest`, `oldest` or `changed`.",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Order",
              "default": "newest",
              "description": "`newest`, `oldest` or `changed`."
            }
          },
          {
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Agent Id"
            }
          },
          {
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
          {
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Channel"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel"
            }
          },
          {
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Direction"
            }
          },
          {
            "description": "Repeat to ask for several.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/ConversationStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeat to ask for several.",
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "disposition",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Disposition"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Disposition"
            }
          },
          {
            "description": "The analysis's outcome.",
            "in": "query",
            "name": "outcome",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Outcome"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The analysis's outcome.",
              "title": "Outcome"
            }
          },
          {
            "in": "query",
            "name": "ended_by",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EndedBy"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Ended By"
            }
          },
          {
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ConversationMode"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mode"
            }
          },
          {
            "in": "query",
            "name": "phone_number_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Phone Number Id"
            }
          },
          {
            "in": "query",
            "name": "from_number",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From Number"
            }
          },
          {
            "in": "query",
            "name": "to_number",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To Number"
            }
          },
          {
            "in": "query",
            "name": "campaign_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Campaign Id"
            }
          },
          {
            "description": "Your own id, as `POST /v1/calls` or `/v1/chats` sent it.",
            "in": "query",
            "name": "external_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Your own id, as `POST /v1/calls` or `/v1/chats` sent it.",
              "title": "External Id"
            }
          },
          {
            "description": "Started at or after this time.",
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Started at or after this time.",
              "title": "Created After"
            }
          },
          {
            "description": "Started before this time.",
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Started before this time.",
              "title": "Created Before"
            }
          },
          {
            "description": "Changed at or after this time.",
            "in": "query",
            "name": "changed_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Changed at or after this time.",
              "title": "Changed After"
            }
          },
          {
            "description": "Changed before this time.",
            "in": "query",
            "name": "changed_before",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Changed before this time.",
              "title": "Changed Before"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Words that were said. A word also finds longer ones that start with it (`refund` finds `refunded`), a phrase in quotes is found as written, and `-word` leaves out the conversations that have it. Needs `transcripts:read`.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Words that were said. A word also finds longer ones that start with it (`refund` finds `refunded`), a phrase in quotes is found as written, and `-word` leaves out the conversations that have it. Needs `transcripts:read`.",
              "title": "Q"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List conversations",
        "tags": [
          "Conversations"
        ]
      }
    },
    "/v1/conversations/deleted": {
      "get": {
        "description": "Conversations deleted in the last 30 days, oldest first — by retention, from the console, or with their agent or project. Remove them from your copy. Keep the last page's `next_cursor` and ask again later for what was deleted since. Needs `conversations:read`.",
        "operationId": "listDeletedConversations",
        "parameters": [
          {
            "description": "Deleted at or after this time.",
            "in": "query",
            "name": "deleted_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Deleted at or after this time.",
              "title": "Deleted After"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedConversationList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List deleted conversations",
        "tags": [
          "Conversations"
        ]
      }
    },
    "/v1/conversations/{conversation_id}": {
      "delete": {
        "description": "Delete a conversation, with its transcript, its recording and the pictures sent in it. A call still in progress is refused; an open chat is charged for what it has used, then deleted. It cannot be undone. It is listed under `GET /v1/conversations/deleted` and sent as `conversation.deleted`, so copies elsewhere can follow. Needs `conversations:delete`.",
        "operationId": "deleteConversation",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The call is still in progress, the agent is answering a message in the chat, or the project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a conversation",
        "tags": [
          "Conversations"
        ]
      },
      "get": {
        "description": "One conversation. Add `include=transcript` for what was said as well, which also needs `transcripts:read`. Add `include=cost` for what it cost, which needs `billing:read`. Needs `conversations:read`.",
        "operationId": "getConversation",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "description": "`transcript`, `cost`. Repeatable.",
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/Include"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`transcript`, `cost`. Repeatable.",
              "title": "Include"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationWithTranscript"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a conversation",
        "tags": [
          "Conversations"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/analysis": {
      "post": {
        "description": "Run the agent's analysis on a conversation that has ended — again, or for the first time — with the agent's analysis settings as they are now. It costs credit, like any analysis, and an organization may ask 10 a minute. A test key's call gets its sample analysis again, at no cost; a test key's chat is analysed by the real model, and charged. Answers with the conversation and its new `analysis`. Needs `analysis:run`.",
        "operationId": "analyzeConversation",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationWithTranscript"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The conversation is still in progress, or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The conversation is too short to analyse."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The model did not answer. Try again shortly."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Analyse a conversation again",
        "tags": [
          "Conversations"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/commands/{command_id}": {
      "get": {
        "description": "How something a call was asked to do went: `sent`, `taken` once the call's agent has it, then `done` or `failed`. Needs `calls:control`.",
        "operationId": "getConversationCommand",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "command_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Command Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationCommandObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation or command."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a command",
        "tags": [
          "Live calls"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/end": {
      "post": {
        "description": "End a call or a chat that is still going. A call that is still ringing is cancelled; one in progress ends with the agent's own goodbye. Always answers `200` with the conversation, so it is safe to send again. Needs `calls:write` for calls and `chats:write` for chats.",
        "operationId": "endConversation",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A WhatsApp conversation, or a frozen project."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "End a conversation",
        "tags": [
          "Calls"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/live": {
      "get": {
        "description": "The lines said on a call since `after`, as they are said. Answers as soon as there is a line after `after`, or after `wait` seconds with none; send `next_after` back as `after` and ask again, until `ended` is true. Lines are kept for a day: after that, read the conversation's transcript. Needs `transcripts:read`.",
        "operationId": "getLiveTranscript",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "description": "The last `seq` you have read.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": 0,
              "description": "The last `seq` you have read.",
              "minimum": 0,
              "title": "After",
              "type": "integer"
            }
          },
          {
            "description": "How long to wait for a line, in seconds.",
            "in": "query",
            "name": "wait",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How long to wait for a line, in seconds.",
              "maximum": 25,
              "minimum": 0,
              "title": "Wait",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveTranscript"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A chat or a WhatsApp conversation has no live transcript."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Follow a call's transcript live",
        "tags": [
          "Live calls"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/messages": {
      "post": {
        "description": "Send the next message in a chat started through the API, and get the agent's reply as a `chat.turn` — or, with `stream: true`, as server-sent events. One message at a time: wait for the reply before sending the next. Needs `chats:write`. An `Idempotency-Key` is optional: the same message again returns the reply it already got.",
        "operationId": "sendMessage",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "description": "Your own id for this message. Optional.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatTurn"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such chat, or it was not started through the API."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The chat has ended or reached its length, the agent is still answering the last message, or this is not a chat."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The message, or its Idempotency-Key, does not fit."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send a message",
        "tags": [
          "Chats"
        ],
        "x-idempotency-key": "optional"
      }
    },
    "/v1/conversations/{conversation_id}/notes": {
      "post": {
        "description": "Information from your own systems for the agent to use — a payment that went through, an order that shipped. The caller does not hear it, and it reaches the agent as information, never as instructions: it cannot change what the agent is for. With `respond`, the agent answers at once. Needs `calls:control`.",
        "operationId": "addConversationNote",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationCommandObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The call has not been answered, has ended, or is not a call."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Give the agent a note",
        "tags": [
          "Live calls"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/recording": {
      "get": {
        "description": "A link to the audio that works for 5 minutes: a stereo Ogg file with the caller on the left and the agent on the right. Each key may ask for 60 a minute and 2,000 a day, and every link is recorded in the audit log. Needs `recordings:read`.",
        "operationId": "getRecording",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recording"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation, or it has no recording."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a link to a conversation's recording",
        "tags": [
          "Conversations"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/say": {
      "post": {
        "description": "The agent says `text` on the call, word for word and in its own voice, once it has finished what it is saying. Answers at once with the command. Needs `calls:control`.",
        "operationId": "sayInConversation",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationCommandObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The call has not been answered, has ended, or is not a call."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Have the agent say something",
        "tags": [
          "Live calls"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/transcript": {
      "get": {
        "description": "Everything that was said, in order, in one response. Needs `transcripts:read`.",
        "operationId": "getTranscript",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transcript"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a conversation's transcript",
        "tags": [
          "Conversations"
        ]
      }
    },
    "/v1/conversations/{conversation_id}/transfer": {
      "post": {
        "description": "Put the caller through to a person: the agent says its own transfer line, the number rings, and the agent leaves the call once somebody answers — or tells the caller nobody could. `to_number`, or the agent's own transfer number when you leave it out, is checked like any number an agent calls. Once per call, and phone calls only. Needs `calls:control`.",
        "operationId": "transferConversation",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationCommandObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such conversation."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a phone call, not answered, ended, or already transferred."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The number may not be called, or the agent has none of its own."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Transfer a call",
        "tags": [
          "Live calls"
        ]
      }
    },
    "/v1/do-not-call": {
      "get": {
        "description": "Every number your organization's agents will never ring, newest first. `number` asks whether one number is listed. Needs `do_not_call:read`.",
        "operationId": "listDoNotCall",
        "parameters": [
          {
            "description": "Only this number, if it is listed.",
            "in": "query",
            "name": "number",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 40,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this number, if it is listed.",
              "title": "Number"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoNotCallList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A key limited to some projects or agents."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the do-not-call list",
        "tags": [
          "Do not call"
        ]
      },
      "post": {
        "description": "From the next dial on, no agent rings it: a single call, a campaign's contact or a reminder to it is refused with `do_not_call`. Adding a listed number again answers `200` with the entry, taking the new `reason` if one is sent. Needs `do_not_call:write` and a live key.",
        "operationId": "addDoNotCall",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DoNotCallCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoNotCallEntry"
                }
              }
            },
            "description": "It was already listed; the reason is new."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoNotCallEntry"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some projects or agents: the list decides which real people are called."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a phone number, or the list is full."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a number to the do-not-call list",
        "tags": [
          "Do not call"
        ]
      }
    },
    "/v1/do-not-call/{number}": {
      "delete": {
        "description": "Its agents may ring it again from the next dial. Recorded in the audit log under the key: taking a number off is undoing somebody's request not to be called. Needs `do_not_call:write` and a live key.",
        "operationId": "removeDoNotCall",
        "parameters": [
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "title": "Number",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DoNotCallRemoved"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some projects or agents: the list decides which real people are called."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The number is not listed."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Take a number off the do-not-call list",
        "tags": [
          "Do not call"
        ]
      }
    },
    "/v1/evaluation-runs/{run_id}": {
      "get": {
        "description": "How a run is going, and once `status` is `finished`, how every saved conversation did. Fail your build on `failed`; a conversation that is `not_checked` could not be rehearsed, which says nothing about the agent. Needs `evaluations:run`.",
        "operationId": "getEvaluationRun",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Run Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EvaluationRunObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such run."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an evaluation run",
        "tags": [
          "Evaluations"
        ]
      }
    },
    "/v1/events": {
      "get": {
        "description": "Every event sent to webhook receivers in the last 30 days, oldest first, whether or not any receiver heard it — each with the id its deliveries carry. Keep the last page's `next_cursor` and ask again later for what happened since. Events from the last minute wait for the next page. `conversation.transcript` events also need `transcripts:read`. Needs `conversations:read`.",
        "operationId": "listEvents",
        "parameters": [
          {
            "description": "An event type, like `conversation.ended`. Repeatable.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "description": "An event type, like `conversation.ended`. Repeatable.",
              "title": "Type"
            }
          },
          {
            "description": "Only the events about this conversation.",
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the events about this conversation.",
              "title": "Conversation Id"
            }
          },
          {
            "description": "Only events from this time on.",
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only events from this time on.",
              "title": "Created After"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List events",
        "tags": [
          "Events"
        ]
      }
    },
    "/v1/knowledge-bases": {
      "get": {
        "description": "Your knowledge bases, newest first, each with how many sources it holds. `project_id` keeps to one project. Needs `knowledge:read`.",
        "operationId": "listKnowledgeBases",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List knowledge bases",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/v1/knowledge-bases/{knowledge_base_id}/crawls": {
      "get": {
        "description": "Each website the base was given in the console, with how far its latest reading got. Needs `knowledge:read`.",
        "operationId": "listKnowledgeCrawls",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCrawlList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such knowledge base."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List the websites a knowledge base reads",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/v1/knowledge-bases/{knowledge_base_id}/crawls/{crawl_id}/refresh": {
      "post": {
        "description": "Read the website again now, as **Refresh** does in the console. Pages that have not changed are skipped, so it costs only what changed. Needs `knowledge:write` and a live key.",
        "operationId": "refreshKnowledgeCrawl",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "crawl_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Crawl Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeCrawl"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such website."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "It is being read right now, or the project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many knowledge requests just now. Wait for `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read a website again",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/v1/knowledge-bases/{knowledge_base_id}/documents": {
      "get": {
        "description": "Every source in a knowledge base — your files, the pages of a website it read, and its topics — newest first, each with where it is in indexing. Filter by `status`. Needs `knowledge:read`.",
        "operationId": "listKnowledgeDocuments",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          },
          {
            "description": "Only sources in this state.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/KnowledgeDocumentStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only sources in this state.",
              "title": "Status"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocumentList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such knowledge base."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a knowledge base's sources",
        "tags": [
          "Knowledge"
        ]
      },
      "post": {
        "description": "Send one file as `multipart/form-data`: text, Markdown, CSV, JSON, PDF or Word. The answer is `202` with the source, `pending`: it is indexed in the background, and agents answer from it once it reads `indexed`. The same bytes twice in one base are refused. Needs `knowledge:write` and a live key.",
        "operationId": "uploadKnowledgeDocument",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_uploadKnowledgeDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocument"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such knowledge base."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The same file is already in the base, or the project is frozen."
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The file is over the size this deployment takes."
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a file type the base reads, or a text file that is not UTF-8."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The file is empty, or the base holds as many sources as it may."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many files sent just now. Wait for `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a file to a knowledge base",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/v1/knowledge-bases/{knowledge_base_id}/documents/{document_id}": {
      "delete": {
        "description": "Remove a source and everything indexed from it. Agents stop answering from it on their next turn. Needs `knowledge:write` and a live key.",
        "operationId": "deleteKnowledgeDocument",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocumentDeleted"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such source."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a source",
        "tags": [
          "Knowledge"
        ]
      },
      "get": {
        "description": "One source, and where it is in indexing — read it again until it says `indexed` or `failed`. Needs `knowledge:read`.",
        "operationId": "getKnowledgeDocument",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocument"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such source."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a source",
        "tags": [
          "Knowledge"
        ]
      },
      "put": {
        "description": "Send a new version of a file, as `multipart/form-data`. It keeps its id and goes back to `pending`; agents keep answering from the old version until the new one is indexed — and if that fails, the old one stays, and `error` says why. Needs `knowledge:write` and a live key.",
        "operationId": "replaceKnowledgeDocument",
        "parameters": [
          {
            "in": "path",
            "name": "knowledge_base_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Knowledge Base Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_replaceKnowledgeDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeDocument"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a key limited to some agents."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such knowledge base."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The source is being indexed right now, came from a website rather than a file, the same bytes are another source in the base, or the project is frozen."
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The file is over the size this deployment takes."
          },
          "415": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a file type the base reads, or a text file that is not UTF-8."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The file is empty, or the base holds as many sources as it may."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many files sent just now. Wait for `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Replace a file",
        "tags": [
          "Knowledge"
        ]
      }
    },
    "/v1/mcp-servers": {
      "get": {
        "description": "The MCP servers in the projects this key reaches, oldest first. Needs `tools:write`.",
        "operationId": "listMcpServers",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List MCP servers",
        "tags": [
          "Tools"
        ]
      },
      "post": {
        "description": "A remote MCP server whose tools agents in the project can be given, by name in their definitions. The same address and credential rules as a tool. Needs `tools:write` and a live key.",
        "operationId": "createMcpServer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A credential sent somewhere it does not go yet, or a test key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project already has a server by that name, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Its address or its credential will not do."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not run MCP servers."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add an MCP server",
        "tags": [
          "Tools"
        ]
      }
    },
    "/v1/mcp-servers/{server_id}": {
      "delete": {
        "description": "Agents stop being offered its tools on their next turn. Needs `tools:write` and a live key.",
        "operationId": "deleteMcpServer",
        "parameters": [
          {
            "in": "path",
            "name": "server_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Server Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Removed"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such server."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete an MCP server",
        "tags": [
          "Tools"
        ]
      },
      "get": {
        "description": "One MCP server, its path and query hidden. Needs `tools:write`.",
        "operationId": "getMcpServer",
        "parameters": [
          {
            "in": "path",
            "name": "server_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Server Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such server."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get an MCP server",
        "tags": [
          "Tools"
        ]
      },
      "patch": {
        "description": "Send only what changes; a `url` still reading `••••` as it was read keeps what is stored. Needs `tools:write` and a live key.",
        "operationId": "updateMcpServer",
        "parameters": [
          {
            "in": "path",
            "name": "server_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Server Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpServerUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpServerObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A credential sent somewhere it does not go yet, or a test key."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such server."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project already has a server by that name, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Its address or its credential will not do."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change an MCP server",
        "tags": [
          "Tools"
        ]
      }
    },
    "/v1/me": {
      "get": {
        "description": "The key's name, mode, permissions and reach; its organization; what this deployment supports; and every limit that applies to it, with how many calls are in progress now. Any working key may call it.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Describe this API key",
        "tags": [
          "Keys"
        ]
      }
    },
    "/v1/phone-numbers": {
      "get": {
        "description": "The numbers in the projects this key can reach, oldest first: which way each carries calls, and the agent it belongs to. Needs `phone_numbers:read`.",
        "operationId": "listPhoneNumbers",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          },
          {
            "description": "Only the numbers this agent owns or may call from.",
            "in": "query",
            "name": "agent_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the numbers this agent owns or may call from.",
              "title": "Agent Id"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumberList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List phone numbers",
        "tags": [
          "Phone numbers"
        ]
      }
    },
    "/v1/phone-numbers/{phone_number_id}": {
      "patch": {
        "description": "Choose the agent a number belongs to: the one that answers when it is called, or — for a number that only places calls — the outbound agent that calls from it. `null` leaves it with no agent. The agent must be in the number's project. It takes effect on the next call. A test key cannot do this, because a phone number is real. Needs `phone_numbers:write`.",
        "operationId": "updatePhoneNumber",
        "parameters": [
          {
            "in": "path",
            "name": "phone_number_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Phone Number Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumberUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumber"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key, or a number another agent holds that this key does not reach."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such number, or no such agent in the number's project."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The number and the agent want different things, or the project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment has no telephony."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Point a phone number at an agent",
        "tags": [
          "Phone numbers"
        ]
      }
    },
    "/v1/projects": {
      "get": {
        "description": "The projects this key can reach, oldest first. Needs `agents:read`.",
        "operationId": "listProjects",
        "parameters": [
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List projects",
        "tags": [
          "Projects"
        ]
      }
    },
    "/v1/scheduled-calls": {
      "get": {
        "description": "The calls this key's side of test mode scheduled, newest first. Filter by `status`. Needs `calls:write`.",
        "operationId": "listScheduledCalls",
        "parameters": [
          {
            "description": "Only these: scheduled, placed, cancelled, failed.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ScheduledCallStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only these: scheduled, placed, cancelled, failed.",
              "title": "Status"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCallList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List scheduled calls",
        "tags": [
          "Scheduled calls"
        ]
      },
      "post": {
        "description": "The request `POST /v1/calls` takes, placed later: at `dial_at`, or at the first moment its `call_window` is open at or after it. Checked now, so a mistake is said now, and checked again when it is placed. Answers with the scheduled call; once placed, its `conversation_id` names the conversation, which sends the usual events. Needs `calls:write` and an `Idempotency-Key`.",
        "operationId": "createScheduledCall",
        "parameters": [
          {
            "description": "Your own id for this request, up to 120 characters. Required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduledCallCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCall"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No `Idempotency-Key`."
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent does not place calls or is not published, its project is frozen, or the number is on the do-not-call list."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A field, a variable, the window or the number does not fit, the time is more than 30 days ahead — or the `Idempotency-Key` was used for another request."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not place phone calls."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Schedule a call",
        "tags": [
          "Scheduled calls"
        ],
        "x-idempotency-key": "required"
      }
    },
    "/v1/scheduled-calls/{scheduled_call_id}": {
      "delete": {
        "description": "Call it off before its time. Answers with the scheduled call, `cancelled`. Once its time has come it can no longer be called off: one being placed answers `scheduled_call_placing`, and one placed is a conversation — end that with `POST /v1/conversations/{id}/end`. Needs `calls:write`.",
        "operationId": "cancelScheduledCall",
        "parameters": [
          {
            "in": "path",
            "name": "scheduled_call_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Scheduled Call Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCall"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such scheduled call."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "It is being placed right now, or was placed, refused or cancelled already — or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Cancel a scheduled call",
        "tags": [
          "Scheduled calls"
        ]
      },
      "get": {
        "description": "One scheduled call: when it will be placed, or what became of it. `calls:write`.",
        "operationId": "getScheduledCall",
        "parameters": [
          {
            "in": "path",
            "name": "scheduled_call_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Scheduled Call Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledCall"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such scheduled call."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a scheduled call",
        "tags": [
          "Scheduled calls"
        ]
      }
    },
    "/v1/test/inbound-calls": {
      "post": {
        "description": "With a **test key** only: somebody calls one of your inbound agents from a test number. The agent's test lookup address is asked — or its sample answer used, with no request — and the answer says what the lookup made of it and the greeting it produced. The conversation then plays out like any test call: events to your test receivers, nothing real rung, nothing charged.",
        "operationId": "createTestInboundCall",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestInboundCallCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestInboundCall"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Only a test key makes test calls."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent or number."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent answers no calls, or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "`from_number` is not a test number, or the request does not fit."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Make a test call to an agent",
        "tags": [
          "Test mode"
        ]
      }
    },
    "/v1/tools": {
      "get": {
        "description": "The tools in the projects this key reaches, oldest first. Needs `tools:write`.",
        "operationId": "listTools",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List tools",
        "tags": [
          "Tools"
        ]
      },
      "post": {
        "description": "A request an agent can make mid-conversation, in a project. Attach it to agents by name in their definitions. Its address may not be on this deployment's network, and a credential it names must be a tool credential assigned to the project — sent only where it already goes, or pinned there if this is its first use. Needs `tools:write` and a live key.",
        "operationId": "createTool",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A credential sent somewhere it does not go yet, or a test key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project already has a tool by that name, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The tool's shape, its address or its credential will not do."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create a tool",
        "tags": [
          "Tools"
        ]
      }
    },
    "/v1/tools/{tool_id}": {
      "delete": {
        "description": "Every agent that carries it stops being offered it on its next turn. Needs `tools:write` and a live key.",
        "operationId": "deleteTool",
        "parameters": [
          {
            "in": "path",
            "name": "tool_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tool Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Removed"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such tool."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a tool",
        "tags": [
          "Tools"
        ]
      },
      "get": {
        "description": "One tool, its header values hidden. Needs `tools:write`.",
        "operationId": "getTool",
        "parameters": [
          {
            "in": "path",
            "name": "tool_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tool Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such tool."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a tool",
        "tags": [
          "Tools"
        ]
      },
      "patch": {
        "description": "Change what the model is told about a tool or the request it makes. Every agent that carries it uses the change on its next turn. Send `http` whole; a value still reading `••••` as it was read keeps what is stored. Needs `tools:write` and a live key.",
        "operationId": "updateTool",
        "parameters": [
          {
            "in": "path",
            "name": "tool_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tool Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A credential sent somewhere it does not go yet, or a test key."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such tool."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project already has a tool by that name, or it is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The tool's shape, its address or its credential will not do."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a tool",
        "tags": [
          "Tools"
        ]
      }
    },
    "/v1/vault/secrets": {
      "get": {
        "description": "The organization's tool credentials, oldest first: their names, last four characters and where each may be used — never their values. Needs `vault:write` and a key that reaches every project.",
        "operationId": "listVaultSecrets",
        "parameters": [
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultSecretList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List tool credentials",
        "tags": [
          "Vault"
        ]
      },
      "post": {
        "description": "Seal a credential into the vault for the projects named, whose tools and MCP servers may then send it. Its value is never sent back. Needs `vault:write` and a live key.",
        "operationId": "createVaultSecret",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultSecretCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultSecretObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A project named is not this organization's."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization already has a credential by that name."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Add a tool credential",
        "tags": [
          "Vault"
        ]
      }
    },
    "/v1/vault/secrets/{secret_id}": {
      "delete": {
        "description": "Tools and MCP servers that send it have none from their next request, and say so. Needs `vault:write` and a live key.",
        "operationId": "deleteVaultSecret",
        "parameters": [
          {
            "in": "path",
            "name": "secret_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Secret Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Removed"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such credential."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a tool credential",
        "tags": [
          "Vault"
        ]
      },
      "get": {
        "description": "One tool credential: its name, last four characters and where it may be used — never its value. Needs `vault:write` and a key that reaches every project.",
        "operationId": "getVaultSecret",
        "parameters": [
          {
            "in": "path",
            "name": "secret_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Secret Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultSecretObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such credential."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a tool credential",
        "tags": [
          "Vault"
        ]
      },
      "patch": {
        "description": "Send a new value, a new name or label, or the whole list of projects that may use it. A new value is used from the next request any tool makes. Needs `vault:write` and a live key.",
        "operationId": "updateVaultSecret",
        "parameters": [
          {
            "in": "path",
            "name": "secret_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Secret Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultSecretUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultSecretObject"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such credential, or a project named is not here."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The credential is revoked, or another one has that name."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a tool credential",
        "tags": [
          "Vault"
        ]
      }
    },
    "/v1/web-calls": {
      "post": {
        "description": "Start a voice conversation with an agent in your own web page. Call this from your server, with the agent's values and your own data, and give the page the answer's `url` and `token`: it joins with `@aigently/web`. The token joins this one call and lasts 15 minutes. Needs `calls:write` and a live key. An `Idempotency-Key` makes a retry return the same call.",
        "operationId": "createWebCall",
        "parameters": [
          {
            "description": "Your own id for this call, up to 120 characters.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebCallCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebCall"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: a browser call is a real conversation."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such agent."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The agent does not take browser calls or is not published, or its project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A field or a variable does not fit — or the `Idempotency-Key` was used for a different request."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many calls going, or today's limit reached."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not run voice."
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The voice service could not be reached. Try again shortly."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a browser call",
        "tags": [
          "Web calls"
        ],
        "x-idempotency-key": "optional"
      }
    },
    "/v1/webhooks": {
      "get": {
        "description": "The receivers in the projects this key reaches, on its own side of test mode: a test key lists test receivers. Needs `webhooks:read`.",
        "operationId": "listWebhookReceivers",
        "parameters": [
          {
            "description": "Only this project's.",
            "in": "query",
            "name": "project_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this project's.",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookReceiverList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List webhook receivers",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "description": "A new receiver in one of this key's projects — live for a live key, test for a test key. The address must be public `https`. At most 10 per project. The signing secret is in this answer and never again. Needs `webhooks:write`.",
        "operationId": "createWebhookReceiver",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookReceiverCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookReceiverWithSecret"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such project."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The address, an event or an agent does not fit, or the project is full."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create a webhook receiver",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{receiver_id}": {
      "delete": {
        "description": "Stop and remove a receiver, with its deliveries. Events it would have heard stay in the event feed. Needs `webhooks:write`.",
        "operationId": "deleteWebhookReceiver",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Delete a webhook receiver",
        "tags": [
          "Webhooks"
        ]
      },
      "get": {
        "description": "One receiver, without its secret. Needs `webhooks:read`.",
        "operationId": "getWebhookReceiver",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookReceiver"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get a webhook receiver",
        "tags": [
          "Webhooks"
        ]
      },
      "patch": {
        "description": "Change the events it hears, switch it off or on, or limit it to some agents. Its address cannot change: make a new receiver for a new address. Needs `webhooks:write`.",
        "operationId": "updateWebhookReceiver",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookReceiverUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookReceiver"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An event or an agent does not fit."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a webhook receiver",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{receiver_id}/deliveries": {
      "get": {
        "description": "What was sent to this receiver in the last 30 days, newest first, and how each attempt went. Needs `webhooks:read`.",
        "operationId": "listWebhookDeliveries",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          },
          {
            "description": "`pending`, `delivered` or `failed`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/WebhookDeliveryStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`pending`, `delivered` or `failed`.",
              "title": "Status"
            }
          },
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a receiver's deliveries",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{receiver_id}/deliveries/{delivery_id}/resend": {
      "post": {
        "description": "Put a failed delivery back in the queue with a fresh set of retries — after your receiver was down, say. One already waiting is left as it is; one delivered is refused. Needs `webhooks:write`.",
        "operationId": "resendWebhookDelivery",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Delivery Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver or delivery."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The receiver is switched off, the delivery was delivered, or the project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send a delivery again",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{receiver_id}/rotate-secret": {
      "post": {
        "description": "A new signing secret, in this answer and never again. With `keep_previous_for`, the old one keeps signing beside it until then — every delivery carries a signature from each — so your receiver can be updated first. `now`, the default, is the answer to a leak. Needs `webhooks:write`.",
        "operationId": "rotateWebhookSecret",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretRotation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookReceiverWithSecret"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change a webhook receiver's secret",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{receiver_id}/test": {
      "post": {
        "description": "One signed `webhook.test` event to this receiver, at once, through the same path every delivery takes — and whether it arrived. Needs `webhooks:write`.",
        "operationId": "testWebhookReceiver",
        "parameters": [
          {
            "in": "path",
            "name": "receiver_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Receiver Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTest"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such receiver."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The project is frozen."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send a test event",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/whatsapp/conversations": {
      "post": {
        "description": "Send a person an approved template from one of your WhatsApp numbers — an appointment reminder, a delivery notice — and the number's agent answers when they write back, with the template's words as its own first line and your `variables`. The conversation waits a day for an answer. A template Meta refuses ends the conversation `failed`, with Meta's reason in `error`. Needs `whatsapp:write`, a live key and an `Idempotency-Key`.",
        "operationId": "startWhatsappConversation",
        "parameters": [
          {
            "description": "Your own id for this message. Required.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 120,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WhatsappConversationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The organization's credit is used up."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A test key: there are no WhatsApp test numbers."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such WhatsApp number."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The person is on a block list, the number's agent is not published, or the connection is not ready."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such approved template, or the wrong number of values."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not run WhatsApp."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Start a WhatsApp conversation",
        "tags": [
          "WhatsApp"
        ],
        "x-idempotency-key": "required"
      }
    },
    "/v1/whatsapp/senders": {
      "get": {
        "description": "The organization's WhatsApp numbers this key reaches, oldest first, each with the agent that answers it. Needs `whatsapp:write`.",
        "operationId": "listWhatsappSenders",
        "parameters": [
          {
            "description": "How many to return, 1 to 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "How many to return, 1 to 100.",
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "`next_cursor` from the previous page, with the same filters.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 512,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the previous page, with the same filters.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappSenderList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List WhatsApp numbers",
        "tags": [
          "WhatsApp"
        ]
      }
    },
    "/v1/whatsapp/senders/{sender_id}/templates": {
      "get": {
        "description": "The message templates Meta has approved for this number's business account: the ones a conversation can be started with. Write and approve them in WhatsApp Manager. Needs `whatsapp:write`.",
        "operationId": "listWhatsappTemplates",
        "parameters": [
          {
            "in": "path",
            "name": "sender_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Sender Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatsappTemplateList"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key is missing, mistyped, unknown, revoked or expired."
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This key reaches no such WhatsApp number."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The connection has no business account id or access token."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Too many requests for this key or its organization; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Something went wrong on our side. Quote the `request_id` to support."
          },
          "501": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "This deployment does not run WhatsApp."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List a WhatsApp number's templates",
        "tags": [
          "WhatsApp"
        ]
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "servers": [
    {
      "description": "Aigently",
      "url": "https://api.aigently.ai"
    }
  ],
  "x-conversation-endings": {
    "notes": [
      "`conversation.analyzed` arrives only for an agent that analyses its conversations, and a little after the end.",
      "`conversation.recording_ready` arrives only for a call that was recorded.",
      "Events can arrive out of order. Keep the one with the highest `revision`."
    ],
    "rows": [
      {
        "call_again": "No.",
        "disposition": "answered",
        "ended_by": [
          "caller",
          "agent"
        ],
        "events": [
          "conversation.started",
          "conversation.ended",
          "conversation.analyzed",
          "conversation.recording_ready"
        ],
        "key": "answered",
        "status": "completed",
        "what_happened": "Answered, talked, and somebody hung up"
      },
      {
        "call_again": "No.",
        "disposition": "answered",
        "ended_by": [
          "api"
        ],
        "events": [
          "conversation.started",
          "conversation.ended",
          "conversation.analyzed"
        ],
        "key": "ended_through_the_api",
        "status": "completed",
        "what_happened": "Ended with /end after it was answered"
      },
      {
        "call_again": "Your choice.",
        "disposition": "voicemail_left",
        "ended_by": [
          "agent"
        ],
        "events": [
          "conversation.started",
          "conversation.ended"
        ],
        "key": "voicemail_left",
        "status": "completed",
        "what_happened": "An answering machine answered, and the agent left its message"
      },
      {
        "call_again": "Yes, later.",
        "disposition": "voicemail",
        "ended_by": [],
        "events": [
          "conversation.started",
          "conversation.ended"
        ],
        "key": "voicemail",
        "status": "failed",
        "what_happened": "An answering machine answered, and no message was left"
      },
      {
        "call_again": "Yes, later.",
        "disposition": "busy",
        "ended_by": [],
        "events": [
          "conversation.ended"
        ],
        "key": "busy",
        "status": "failed",
        "what_happened": "The line was busy"
      },
      {
        "call_again": "Yes, later.",
        "disposition": "no_answer",
        "ended_by": [],
        "events": [
          "conversation.ended"
        ],
        "key": "no_answer",
        "status": "failed",
        "what_happened": "It rang and nobody answered"
      },
      {
        "call_again": "Usually not.",
        "disposition": "declined",
        "ended_by": [],
        "events": [
          "conversation.ended"
        ],
        "key": "declined",
        "status": "failed",
        "what_happened": "The person rejected the call"
      },
      {
        "call_again": "Check the number first.",
        "disposition": "unreachable",
        "ended_by": [
          "failure"
        ],
        "events": [
          "conversation.ended"
        ],
        "key": "unreachable",
        "status": "failed",
        "what_happened": "The carrier would not put the call through"
      },
      {
        "call_again": "Yes, in a moment.",
        "disposition": null,
        "ended_by": [
          "failure"
        ],
        "events": [
          "conversation.ended"
        ],
        "key": "not_placed",
        "status": "failed",
        "what_happened": "The call could not be placed at all"
      },
      {
        "call_again": "No — you cancelled it.",
        "disposition": "no_answer",
        "ended_by": [
          "api"
        ],
        "events": [
          "conversation.ended"
        ],
        "key": "cancelled_through_the_api",
        "status": "failed",
        "what_happened": "Cancelled with /end while it was ringing"
      },
      {
        "call_again": "No — always keep the highest revision.",
        "disposition": "answered",
        "ended_by": [
          "caller",
          "agent"
        ],
        "events": [
          "conversation.started",
          "conversation.ended",
          "conversation.updated",
          "conversation.analyzed"
        ],
        "key": "corrected",
        "status": "completed",
        "what_happened": "Marked failed when its report was late, then reported as a full conversation"
      }
    ]
  },
  "x-error-codes": [
    {
      "advice": "Send an id built from your own data, like `lead-8812-attempt-2`, up to 120 characters.",
      "code": "idempotency_key_required",
      "meaning": "Placing a call needs your own id for it in the `Idempotency-Key` header, so a retry never calls anybody twice.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 400,
      "title": "An Idempotency-Key header is required"
    },
    {
      "advice": "Read `detail`, which names what is wrong, and correct the request.",
      "code": "invalid_request",
      "meaning": "Something about the request itself is wrong: a cursor from another list, an `Idempotency-Key` that is too long, or a combination the endpoint does not take.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 400,
      "title": "The request is not valid"
    },
    {
      "advice": "Send `Authorization: Bearer <key>` with a key from the console's API keys page. A rotated key's old secret stops working when its overlap ends.",
      "code": "authentication_failed",
      "meaning": "The key is missing, mistyped, unknown, revoked or expired. Every one of those gets this same answer, so an error never tells a stranger which keys are real.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 401,
      "title": "The API key was not accepted"
    },
    {
      "advice": "Add credit in the console. Reading conversations keeps working meanwhile.",
      "code": "insufficient_credit",
      "meaning": "The organization's credit is used up, so nothing new that costs money is started.",
      "retry": "Not until credit is added.",
      "status": 402,
      "title": "There is not enough credit"
    },
    {
      "advice": "Call from one of the key's addresses — the API keys page in the console lists them — or make a key that allows this one.",
      "code": "address_not_allowed",
      "meaning": "The key was made to work only from certain addresses, and this request came from another. `detail` names the address it came from.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 403,
      "title": "The key does not work from this address"
    },
    {
      "advice": "Call the API from your server. A test key works from the developer website's Try it.",
      "code": "live_key_in_browser",
      "meaning": "A request a browser made — one carrying `Origin` or `Sec-Fetch-Site` — came with a live key. A page anybody can open must never hold a live key, so it is refused even from the developer website.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 403,
      "title": "A live key was sent from a browser"
    },
    {
      "advice": "Use a live key, which starts `ag_live_`, from your server.",
      "code": "live_key_required",
      "meaning": "A test key never changes anything real, and this request would: a phone number rings real phones.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 403,
      "title": "Only a live key does this"
    },
    {
      "advice": "Contact the deployment's operator.",
      "code": "organization_frozen",
      "meaning": "The organization has been frozen, so its keys can read but change nothing.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 403,
      "title": "The organization is frozen"
    },
    {
      "advice": "Make a key with that permission, or add it to this key's preset in the console.",
      "code": "permission_denied",
      "meaning": "The key works, but was not given the permission this endpoint needs — `detail` names it.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 403,
      "title": "This key does not have that permission"
    },
    {
      "advice": "Use a test key, which starts `ag_test_`.",
      "code": "test_key_required",
      "meaning": "Test calls to your agents are made with a test key: a live key's calls are real and come from real phones.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 403,
      "title": "Only a test key does this"
    },
    {
      "advice": "Check the id, and that the key reaches it: its mode, its projects and its agents.",
      "code": "not_found",
      "meaning": "There is no such object for this key. The same answer covers another organization's id, a project or agent outside a limited key's reach, and a real conversation asked for with a test key — a 404 never confirms that an id exists.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 404,
      "title": "Not found"
    },
    {
      "advice": "Check the method against the API reference.",
      "code": "method_not_allowed",
      "meaning": "The path exists, but not with this HTTP method.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 405,
      "title": "That method is not allowed here"
    },
    {
      "advice": "Choose another name, or leave `name` out to have the definition's made free.",
      "code": "agent_name_taken",
      "meaning": "Agent names are unique within a project.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The project already has an agent with that name"
    },
    {
      "advice": "Use an inbound agent's id. `GET /v1/agents?direction=inbound` lists them.",
      "code": "agent_not_inbound",
      "meaning": "A test call has to reach an agent that answers calls; this one places them.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The agent does not answer calls"
    },
    {
      "advice": "Use an outbound agent's id. `GET /v1/agents?direction=outbound` lists them.",
      "code": "agent_not_outbound",
      "meaning": "This agent answers calls; placing them needs one made to call out.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The agent does not place calls"
    },
    {
      "advice": "Fix what `errors` names — in the definition or in the console — and publish again.",
      "code": "agent_not_publishable",
      "meaning": "The console's Publish check found something to fix first: a missing prompt, a tool without its credential, a rehearsal that now fails. `errors` lists every reason.",
      "retry": "Not until what `errors` names is fixed.",
      "status": 409,
      "title": "The agent is not ready to publish"
    },
    {
      "advice": "Publish the agent in the console, then send the request again.",
      "code": "agent_not_published",
      "meaning": "Only a published agent places calls or chats with people.",
      "retry": "Not until the agent is published.",
      "status": 409,
      "title": "The agent is not published"
    },
    {
      "advice": "Turn Browser voice on under the agent's channels, on its Configure tab, and publish.",
      "code": "browser_voice_off",
      "meaning": "Browser voice is off among the agent's channels, so nothing can join a call with it from a web page.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The agent does not take browser calls"
    },
    {
      "advice": "Add its contacts with `POST /v1/campaigns/{id}/contacts`, then start it — or send them in the same request that creates it.",
      "code": "campaign_empty",
      "meaning": "It was told to start with no contacts on its list. A campaign with nobody to call finishes at once, and a finished campaign cannot be given contacts or started again.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The campaign has nobody to call"
    },
    {
      "advice": "Create a new campaign for a new list. Its contacts still say how each call went.",
      "code": "campaign_finished",
      "meaning": "It completed or was cancelled, so it cannot change any more and nobody else on its list is called.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The campaign has finished"
    },
    {
      "advice": "Read the campaign, then send what applies to it: `start` for a draft, `resume` for a paused campaign.",
      "code": "campaign_status_conflict",
      "meaning": "Only a running campaign can be paused, and only a paused one resumed. `detail` names the state it is in.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The campaign is not in a state this applies to"
    },
    {
      "advice": "Find the contact with `GET /v1/contacts?phone=` and change it, or import the list: an import updates the people already there.",
      "code": "contact_exists",
      "meaning": "A project's phonebook holds each number once, and this one is there already.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The number is already in the phonebook"
    },
    {
      "advice": "`detail` names the value. Give the agent's field a default, take the placeholder out of its words, or cancel the campaign and create it again with the value for each contact.",
      "code": "contacts_missing_values",
      "meaning": "The agent's words use a value that some contacts waiting to be called do not have — usually a placeholder added to the agent after the list was loaded.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "Contacts lack a value the agent says out loud"
    },
    {
      "advice": "Wait for the reply before sending the next message.",
      "code": "conversation_busy",
      "meaning": "A chat takes one message at a time, and the agent has not finished replying to the previous one.",
      "retry": "Yes, once the previous reply has arrived.",
      "status": 409,
      "title": "The agent is still answering the last message"
    },
    {
      "advice": "Start a new conversation. A call's transcript is the record of what was said.",
      "code": "conversation_ended",
      "meaning": "A message was sent to a chat that has already ended, or a call that has ended was asked to say something, take a note or transfer.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The conversation has ended"
    },
    {
      "advice": "Wait for it to end — `conversation.ended` says when — then send the request again.",
      "code": "conversation_in_progress",
      "meaning": "A call is deleted, and any conversation analysed, once it has ended — not while somebody is still in it.",
      "retry": "Yes, once the conversation has ended.",
      "status": 409,
      "title": "The conversation is still in progress"
    },
    {
      "advice": "Start a new chat.",
      "code": "conversation_limit_reached",
      "meaning": "Every chat has a ceiling on its messages, because the whole conversation is sent to the model on every turn.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The conversation has reached its length"
    },
    {
      "advice": "Wait for `conversation.started`, then send the request again.",
      "code": "conversation_not_answered",
      "meaning": "A call can be asked to say something, take a note or transfer only once somebody has answered it.",
      "retry": "Yes, once the call is answered.",
      "status": 409,
      "title": "The call has not been answered yet"
    },
    {
      "advice": "Read the crawl until it has finished, then ask again if you still need to.",
      "code": "crawl_running",
      "meaning": "This website is being read right now, so there is nothing to start again.",
      "retry": "Yes, once the reading has finished.",
      "status": 409,
      "title": "The website is being read"
    },
    {
      "advice": "Add a new credential with `POST /v1/vault/secrets`, and point your tools at it.",
      "code": "credential_revoked",
      "meaning": "A revoked credential is kept as a record of what was used, and can never be changed or given to a project again.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The credential is revoked"
    },
    {
      "advice": "Do not call it. If that has changed, remove it from the list — `DELETE /v1/do-not-call/{number}` or the console's Telephony page — and place the call again.",
      "code": "do_not_call",
      "meaning": "Your organization listed this number as one its agents must never ring — somebody asked not to be called, or your own system said so.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The number is on the do-not-call list"
    },
    {
      "advice": "`detail` names the source holding them. Replace that one, or send a different file.",
      "code": "duplicate_source",
      "meaning": "The same bytes are already a source in this base, and indexing them twice would only repeat what agents find.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The file is already in the knowledge base"
    },
    {
      "advice": "Delete one you no longer need, then add this one.",
      "code": "evaluation_limit_reached",
      "meaning": "An agent keeps at most 50 saved conversations, because every run rehearses all of them.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The agent has as many evaluations as it can keep"
    },
    {
      "advice": "Wait for that run to finish — read it until its `status` is `finished` — then ask again.",
      "code": "evaluation_run_in_progress",
      "meaning": "Your organization rehearses one agent's saved conversations at a time, from the console or the API. The detail names the run that is going.",
      "retry": "Yes, once the run that is going has finished.",
      "status": 409,
      "title": "An evaluation run is already going"
    },
    {
      "advice": "Choose another name, or change the one already there.",
      "code": "name_taken",
      "meaning": "A tool, an MCP server, a credential or a saved conversation by that name is already there: names are unique in a project, a credential's in the organization, and a saved conversation's in its agent.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "That name is taken"
    },
    {
      "advice": "Read the website again with `POST /v1/knowledge-bases/{id}/crawls/{crawl_id}/refresh`.",
      "code": "not_a_file",
      "meaning": "Only a file sent to the knowledge base can be replaced. A website page changes when the website is read again; a topic is written in the console.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The source is not a file"
    },
    {
      "advice": "Read `detail`, which says which side to change: the agent, or the number's direction in the console.",
      "code": "number_agent_mismatch",
      "meaning": "A number that receives calls rings its agent, so the agent must answer phone calls; a number that only places calls is an outbound agent's caller ID.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The number and the agent do not fit"
    },
    {
      "advice": "`detail` says when the window opens next. Schedule the call for then — `POST /v1/scheduled-calls` with the same window places it at the first moment it is open — or send it again once it is.",
      "code": "outside_call_window",
      "meaning": "The call named the hours it may start in, and this is not one of them.",
      "retry": "Yes, once the window is open.",
      "status": 409,
      "title": "The call's window is closed"
    },
    {
      "advice": "Ask an owner of the organization to unfreeze it in the console.",
      "code": "project_frozen",
      "meaning": "The agent's project is frozen, so nothing new starts in it.",
      "retry": "Not until the project is unfrozen.",
      "status": 409,
      "title": "The project is frozen"
    },
    {
      "advice": "Read it to see what became of it. One placed is a conversation now: end that with `POST /v1/conversations/{id}/end`.",
      "code": "scheduled_call_finished",
      "meaning": "It was placed, refused at its time, or cancelled already, so there is nothing left to call off.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The scheduled call has already happened"
    },
    {
      "advice": "Read it again in a few seconds: once placed, its `conversation_id` names the conversation, and `POST /v1/conversations/{id}/end` ends that.",
      "code": "scheduled_call_placing",
      "meaning": "Its time has come and the call is being placed right now, so it can no longer be called off.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The scheduled call is being placed"
    },
    {
      "advice": "Read the source until it says `indexed` or `failed`, then send the new version.",
      "code": "source_indexing",
      "meaning": "The indexer is reading this source right now, and a second version would race it.",
      "retry": "Yes, once the source has finished indexing.",
      "status": 409,
      "title": "The source is being indexed"
    },
    {
      "advice": "Read the earlier transfer's command to see how it went.",
      "code": "transfer_already_requested",
      "meaning": "A call is transferred once: a transfer has already been asked for, or carried out.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "The call is already being transferred"
    },
    {
      "advice": "Check the conversation's `channel`.",
      "code": "unsupported_channel",
      "meaning": "The request does not apply to this conversation's channel — a WhatsApp conversation cannot be ended from here, a call takes no chat messages, only a call has a live transcript, and only a phone call can be transferred.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 409,
      "title": "Not possible on this channel"
    },
    {
      "advice": "Add them on the WhatsApp connection's page in the console, then send the request again.",
      "code": "whatsapp_not_ready",
      "meaning": "Sending a template needs the connection's WhatsApp Business account id and an access token, and one of them is missing.",
      "retry": "Not until the connection is complete.",
      "status": 409,
      "title": "The WhatsApp connection cannot send templates yet"
    },
    {
      "advice": "Split the file, or send the parts that matter.",
      "code": "file_too_large",
      "meaning": "This deployment takes knowledge files up to a set size. `detail` says how large.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 413,
      "title": "The file is too large"
    },
    {
      "advice": "Send less: a picture is at most the size the agent accepts, and a JSON body is small.",
      "code": "request_too_large",
      "meaning": "The body is larger than this endpoint accepts.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 413,
      "title": "The request is too large"
    },
    {
      "advice": "Send one of those types, named with its extension, like `opening-hours.md`.",
      "code": "unsupported_file_type",
      "meaning": "A knowledge base reads text, Markdown, CSV, JSON, PDF and Word files, and text must be UTF-8.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 415,
      "title": "Not a file the knowledge base reads"
    },
    {
      "advice": "Give the agent a caller ID on its Connect page, or send a `from_number` it holds.",
      "code": "caller_id_unavailable",
      "meaning": "The agent has no verified number it may call from, or the one named cannot place calls.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "There is no number to call from"
    },
    {
      "advice": "Nothing to do: a conversation this short has no analysis.",
      "code": "conversation_too_short",
      "meaning": "Nothing was said in it that an analysis could judge.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The conversation is too short to analyse"
    },
    {
      "advice": "Check the number is in international format and in an allowed country.",
      "code": "destination_not_allowed",
      "meaning": "The number is outside the countries this deployment calls, or is one it never calls.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "That number cannot be called"
    },
    {
      "advice": "Use a new key for a new request. The same key is only for sending the same request again.",
      "code": "idempotency_key_reused",
      "meaning": "This key already belongs to a conversation started with a different agent, number, values or metadata.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The Idempotency-Key was used for a different request"
    },
    {
      "advice": "`errors` names each one. The agent's `variables_schema` (`GET /v1/agents/{id}`) says what each accepts.",
      "code": "invalid_variables",
      "meaning": "One or more values are missing, of the wrong type, or outside what the agent accepts.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The variables do not fit this agent"
    },
    {
      "advice": "Check the agent's model and its credential in the console.",
      "code": "model_misconfigured",
      "meaning": "The agent's model refused the request for a reason only its settings can fix.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The agent's model is set up wrongly"
    },
    {
      "advice": "Delete sources it no longer needs, or put this one in another knowledge base.",
      "code": "source_limit_reached",
      "meaning": "A knowledge base holds a set number of sources, and this one holds that many.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The knowledge base is full"
    },
    {
      "advice": "Use a test number from the test mode guide, or a live key for a real call.",
      "code": "test_number_required",
      "meaning": "A test key never rings a real phone, so it may only call — or be called from — one of the test numbers.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "Test keys can only call test numbers"
    },
    {
      "advice": "`GET /v1/agents/{id}/versions` lists them. Leave `agent_version` out for what is live.",
      "code": "unknown_agent_version",
      "meaning": "A conversation can be pinned only to a version the agent was published as.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The agent has no such version"
    },
    {
      "advice": "Remove or correct the field `errors` names.",
      "code": "unknown_field",
      "meaning": "Unknown fields are refused, so a typo like `variabels` fails loudly instead of placing a call without its values.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The request has a field this endpoint does not take"
    },
    {
      "advice": "Each entry in `errors` names a field, a code and a sentence. Correct those fields.",
      "code": "validation_failed",
      "meaning": "A field is missing, has the wrong type, or is out of range.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 422,
      "title": "The request did not pass validation"
    },
    {
      "advice": "Add the provider's key to the organization's vault in the console.",
      "code": "provider_key_missing",
      "meaning": "The agent uses a provider for which neither the organization nor the deployment has a credential.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 424,
      "title": "A provider credential is missing"
    },
    {
      "advice": "Wait for calls to finish before placing more. `GET /v1/me` shows how many are in progress.",
      "code": "concurrency_limit_reached",
      "meaning": "The organization already has as many calls in progress as it may.",
      "retry": "Not at once: retrying immediately only adds load. Place it once a call has finished.",
      "status": 429,
      "title": "Too many calls at once"
    },
    {
      "advice": "Wait until the limit resets at midnight UTC, or ask for a higher limit.",
      "code": "daily_limit_reached",
      "meaning": "The organization has placed as many calls today as it may, or used today's share of the platform's model account.",
      "retry": "Not today.",
      "status": 429,
      "title": "The daily call limit is reached"
    },
    {
      "advice": "Send the request again shortly.",
      "code": "limits_unavailable",
      "meaning": "Something that costs money could not be counted safely, so it was refused rather than guessed at.",
      "retry": "Yes, after the number of seconds in the `Retry-After` header.",
      "status": 429,
      "title": "Limits cannot be checked just now"
    },
    {
      "advice": "Slow down; spread requests out over the window.",
      "code": "rate_limited",
      "meaning": "The key has used up one of its limits for now. The `RateLimit` headers say which and for how long.",
      "retry": "Yes, after the number of seconds in the `Retry-After` header.",
      "status": 429,
      "title": "Too many requests"
    },
    {
      "advice": "Send it again shortly. If it keeps happening, report it with the `request_id`.",
      "code": "internal_error",
      "meaning": "The platform failed to handle the request.",
      "retry": "Yes, after a short wait, with the same `Idempotency-Key` where the request has one.",
      "status": 500,
      "title": "Something went wrong on our side"
    },
    {
      "advice": "Contact the deployment's operator.",
      "code": "feature_disabled",
      "meaning": "This deployment does not run the feature the request needs, such as telephony.",
      "retry": "No: the same request gets the same answer until something is changed.",
      "status": 501,
      "title": "Not available on this deployment"
    },
    {
      "advice": "Send the request again shortly.",
      "code": "upstream_unavailable",
      "meaning": "A model provider or another service behind the platform did not answer.",
      "retry": "Yes, after a short wait, with the same `Idempotency-Key` where the request has one.",
      "status": 502,
      "title": "A service the platform depends on is not answering"
    }
  ],
  "x-test-numbers": [
    {
      "checks_pass": true,
      "ending": "answered",
      "number": "+12025550100"
    },
    {
      "checks_pass": false,
      "ending": "answered",
      "number": "+12025550101"
    },
    {
      "checks_pass": true,
      "ending": "busy",
      "number": "+12025550102"
    },
    {
      "checks_pass": true,
      "ending": "no_answer",
      "number": "+12025550103"
    },
    {
      "checks_pass": true,
      "ending": "declined",
      "number": "+12025550104"
    },
    {
      "checks_pass": true,
      "ending": "voicemail_left",
      "number": "+12025550105"
    },
    {
      "checks_pass": true,
      "ending": "voicemail",
      "number": "+12025550106"
    },
    {
      "checks_pass": true,
      "ending": "unreachable",
      "number": "+12025550107"
    }
  ]
}
