{
  "info": {
    "name": "Aigently API",
    "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`.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.aigently.ai"
    },
    {
      "key": "apiKey",
      "value": "",
      "description": "A test key (ag_test_…) to start with."
    }
  ],
  "item": [
    {
      "name": "Agents",
      "item": [
        {
          "name": "List agents",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Only these."
                },
                {
                  "key": "direction",
                  "value": "",
                  "disabled": true,
                  "description": "Only these."
                },
                {
                  "key": "kind",
                  "value": "",
                  "disabled": true,
                  "description": "Only these."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "The agents this key can reach, oldest first. Needs `agents:read`."
          }
        },
        {
          "name": "Create an agent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/agents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\",\n  \"definition\": {\n    \"format\": \"agently.agent/1\",\n    \"agent\": {\n      \"name\": \"Aigently front desk\",\n      \"kind\": \"custom\",\n      \"direction\": \"outbound\",\n      \"system_prompt\": \"You are the Aigently front desk. Greet {{first_name}} by name and confirm their booking.\"\n    },\n    \"references\": {}\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get an agent",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Delete an agent",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        },
        {
          "name": "Get an agent's definition",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/definition",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "definition"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Replace an agent's definition",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/definition",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "definition"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"definition\": {\n    \"format\": \"agently.agent/1\",\n    \"agent\": {\n      \"name\": \"Aigently front desk\",\n      \"kind\": \"custom\",\n      \"direction\": \"outbound\",\n      \"system_prompt\": \"You are the Aigently front desk. Greet {{first_name}} by name and confirm their booking.\"\n    },\n    \"references\": {}\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Publish an agent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/publish",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "publish"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"note\": \"Booking wording\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List an agent's versions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/versions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "versions"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Get a published version's definition",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/versions/:version/definition",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "versions",
                ":version",
                "definition"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "version",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        }
      ]
    },
    {
      "name": "Evaluations",
      "item": [
        {
          "name": "Run an agent's evaluations",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/evaluation-runs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "evaluation-runs"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "List an agent's evaluations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/evaluations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "evaluations"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "The conversations an agent has to keep handling, in the order they were written, each with its most recent result. Needs `evaluations:run`."
          }
        },
        {
          "name": "Add an evaluation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/evaluations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "evaluations"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Asks for the opening hours\",\n  \"turns\": [\n    \"What time do you open tomorrow?\",\n    \"And on Sundays?\"\n  ],\n  \"expectations\": [\n    {\n      \"id\": \"gave_hours\",\n      \"text\": \"The agent says when the restaurant opens.\"\n    },\n    {\n      \"id\": \"no_invented_offers\",\n      \"text\": \"The agent offers no discount it was not told about.\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete an evaluation",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/agents/:agent_id/evaluations/:evaluation_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "agents",
                ":agent_id",
                "evaluations",
                ":evaluation_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "agent_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "evaluation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Publishing stops rehearsing it, and its results go with it. Needs `agents:write` and a live key."
          }
        },
        {
          "name": "Get an evaluation run",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/evaluation-runs/:run_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "evaluation-runs",
                ":run_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "run_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        }
      ]
    },
    {
      "name": "Chats",
      "item": [
        {
          "name": "Upload a picture",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/attachments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "attachments"
              ],
              "query": [],
              "variable": []
            },
            "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`.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "agent_id",
                  "value": "",
                  "type": "text"
                },
                {
                  "key": "file",
                  "type": "file",
                  "src": ""
                }
              ]
            }
          }
        },
        {
          "name": "Start a chat",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this chat. Optional."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/chats",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "chats"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"3c7d9e1f-5a2b-4c6d-8e0f-1a3b5c7d9e2f\",\n  \"message\": \"Hello, I would like to book a table.\",\n  \"variables\": {\n    \"first_name\": \"Sara\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send a message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this message. Optional."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/messages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "messages"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"message\": \"For four people, at seven.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Audit log",
      "item": [
        {
          "name": "List audit events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/audit-events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "audit-events"
              ],
              "query": [
                {
                  "key": "action",
                  "value": "",
                  "disabled": true,
                  "description": "An action, like `agent.published`. Repeatable."
                },
                {
                  "key": "created_after",
                  "value": "",
                  "disabled": true,
                  "description": "Only events from this time on."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Billing",
      "item": [
        {
          "name": "Get the credit balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/billing/balance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing",
                "balance"
              ],
              "query": [],
              "variable": []
            },
            "description": "The organization's credit: what is on the account, what can still be spent, and what this month has spent. Needs `billing:read`."
          }
        },
        {
          "name": "List credit transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/billing/transactions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "billing",
                "transactions"
              ],
              "query": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this conversation's charges."
                },
                {
                  "key": "kind",
                  "value": "",
                  "disabled": true,
                  "description": "Only these kinds. Repeatable."
                },
                {
                  "key": "created_after",
                  "value": "",
                  "disabled": true,
                  "description": "From this time on."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        }
      ]
    },
    {
      "name": "Calls",
      "item": [
        {
          "name": "Place a call",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this call, up to 120 characters. Required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/calls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "calls"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"8a1f3c2e-0b6d-4f5e-9a7c-2d4e6f8a0b1c\",\n  \"to_number\": \"+12025550100\",\n  \"variables\": {\n    \"first_name\": \"Sara\"\n  },\n  \"metadata\": {\n    \"crm_lead_id\": \"L-20931\"\n  },\n  \"external_id\": \"lead-20931\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "End a conversation",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/end",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "end"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Campaigns",
      "item": [
        {
          "name": "List campaigns",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns"
              ],
              "query": [
                {
                  "key": "agent_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this agent's."
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Only campaigns in this state."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        },
        {
          "name": "Create a campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this request, up to 120 characters. Required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns"
              ],
              "query": [],
              "variable": []
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"8a1f3c2e-0b6d-4f5e-9a7c-2d4e6f8a0b1c\",\n  \"name\": \"Visit reminders, October\",\n  \"calling_hours\": {\n    \"start_hour\": 9,\n    \"end_hour\": 18,\n    \"days\": [\n      \"mon\",\n      \"tue\",\n      \"wed\",\n      \"thu\",\n      \"fri\"\n    ]\n  },\n  \"contacts\": [\n    {\n      \"to_number\": \"+12025550123\",\n      \"variables\": {\n        \"first_name\": \"Sara\"\n      },\n      \"metadata\": {\n        \"crm_lead_id\": \"L-20931\"\n      },\n      \"external_id\": \"lead-20931\"\n    },\n    {\n      \"to_number\": \"+12025550124\",\n      \"variables\": {\n        \"first_name\": \"Omar\"\n      },\n      \"timezone\": \"America/Chicago\",\n      \"external_id\": \"lead-20932\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a campaign",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Cancel a campaign",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id",
                "cancel"
              ],
              "query": [],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        },
        {
          "name": "List a campaign's contacts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id/contacts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id",
                "contacts"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Only contacts in this state."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Add contacts to a campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id/contacts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id",
                "contacts"
              ],
              "query": [],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"contacts\": [\n    {\n      \"to_number\": \"+12025550125\",\n      \"variables\": {\n        \"first_name\": \"Lina\"\n      },\n      \"external_id\": \"lead-20933\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Pause a campaign",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id/pause",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id",
                "pause"
              ],
              "query": [],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        },
        {
          "name": "Resume a campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id/resume",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id",
                "resume"
              ],
              "query": [],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reset_attempts\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Start a campaign",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/campaigns/:campaign_id/start",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "campaigns",
                ":campaign_id",
                "start"
              ],
              "query": [],
              "variable": [
                {
                  "key": "campaign_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Contacts",
      "item": [
        {
          "name": "List contacts",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/contacts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "contacts"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                },
                {
                  "key": "phone",
                  "value": "",
                  "disabled": true,
                  "description": "Only the person with this number."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        },
        {
          "name": "Add a contact",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/contacts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "contacts"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\",\n  \"phone\": \"+12025550131\",\n  \"name\": \"Sara Haddad\",\n  \"attributes\": {\n    \"first_name\": \"Sara\",\n    \"member_since\": \"2023\"\n  },\n  \"timezone\": \"America/New_York\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Import contacts",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/contacts/import",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "contacts",
                "import"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\",\n  \"contacts\": [\n    {\n      \"phone\": \"+12025550132\",\n      \"name\": \"Omar Nasser\",\n      \"attributes\": {\n        \"first_name\": \"Omar\"\n      }\n    },\n    {\n      \"phone\": \"+12025550133\",\n      \"name\": \"Lina Saleh\",\n      \"attributes\": {\n        \"first_name\": \"Lina\"\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a contact",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/contacts/:contact_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "contacts",
                ":contact_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "contact_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One person in your phonebook. Needs `contacts:read`."
          }
        },
        {
          "name": "Change a contact",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/contacts/:contact_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "contacts",
                ":contact_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "contact_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"attributes\": {\n    \"first_name\": \"Sara\",\n    \"member_since\": \"2021\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a contact",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/contacts/:contact_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "contacts",
                ":contact_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "contact_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Conversations",
      "item": [
        {
          "name": "List conversations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "",
                  "disabled": true,
                  "description": "`newest`, `oldest` or `changed`."
                },
                {
                  "key": "agent_id",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "channel",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "direction",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Repeat to ask for several."
                },
                {
                  "key": "disposition",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "outcome",
                  "value": "",
                  "disabled": true,
                  "description": "The analysis's outcome."
                },
                {
                  "key": "ended_by",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "mode",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "phone_number_id",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "from_number",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "to_number",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "campaign_id",
                  "value": "",
                  "disabled": true,
                  "description": ""
                },
                {
                  "key": "external_id",
                  "value": "",
                  "disabled": true,
                  "description": "Your own id, as `POST /v1/calls` or `/v1/chats` sent it."
                },
                {
                  "key": "created_after",
                  "value": "",
                  "disabled": true,
                  "description": "Started at or after this time."
                },
                {
                  "key": "created_before",
                  "value": "",
                  "disabled": true,
                  "description": "Started before this time."
                },
                {
                  "key": "changed_after",
                  "value": "",
                  "disabled": true,
                  "description": "Changed at or after this time."
                },
                {
                  "key": "changed_before",
                  "value": "",
                  "disabled": true,
                  "description": "Changed before this time."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "q",
                  "value": "",
                  "disabled": true,
                  "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`."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        },
        {
          "name": "List deleted conversations",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/deleted",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                "deleted"
              ],
              "query": [
                {
                  "key": "deleted_after",
                  "value": "",
                  "disabled": true,
                  "description": "Deleted at or after this time."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        },
        {
          "name": "Get a conversation",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id"
              ],
              "query": [
                {
                  "key": "include",
                  "value": "",
                  "disabled": true,
                  "description": "`transcript`, `cost`. Repeatable."
                }
              ],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Delete a conversation",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Analyse a conversation again",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/analysis",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "analysis"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Get a link to a conversation's recording",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/recording",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "recording"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Get a conversation's transcript",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/transcript",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "transcript"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Everything that was said, in order, in one response. Needs `transcripts:read`."
          }
        }
      ]
    },
    {
      "name": "Live calls",
      "item": [
        {
          "name": "Get a command",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/commands/:command_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "commands",
                ":command_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "command_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Follow a call's transcript live",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/live",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "live"
              ],
              "query": [
                {
                  "key": "after",
                  "value": "",
                  "disabled": true,
                  "description": "The last `seq` you have read."
                },
                {
                  "key": "wait",
                  "value": "",
                  "disabled": true,
                  "description": "How long to wait for a line, in seconds."
                }
              ],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Give the agent a note",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/notes",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "notes"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"text\": \"The deposit for booking 4471 has been paid.\",\n  \"respond\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Have the agent say something",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/say",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "say"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"text\": \"Your table for four is booked for seven this evening.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Transfer a call",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/conversations/:conversation_id/transfer",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "conversations",
                ":conversation_id",
                "transfer"
              ],
              "query": [],
              "variable": [
                {
                  "key": "conversation_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to_number\": \"+966501234567\",\n  \"summary\": \"Wants a private room for twenty.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Do not call",
      "item": [
        {
          "name": "List the do-not-call list",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/do-not-call",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "do-not-call"
              ],
              "query": [
                {
                  "key": "number",
                  "value": "",
                  "disabled": true,
                  "description": "Only this number, if it is listed."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "Every number your organization's agents will never ring, newest first. `number` asks whether one number is listed. Needs `do_not_call:read`."
          }
        },
        {
          "name": "Add a number to the do-not-call list",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/do-not-call",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "do-not-call"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"number\": \"+12025550188\",\n  \"reason\": \"Asked not to be called again\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Take a number off the do-not-call list",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/do-not-call/:number",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "do-not-call",
                ":number"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "List events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "events"
              ],
              "query": [
                {
                  "key": "type",
                  "value": "",
                  "disabled": true,
                  "description": "An event type, like `conversation.ended`. Repeatable."
                },
                {
                  "key": "conversation_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only the events about this conversation."
                },
                {
                  "key": "created_after",
                  "value": "",
                  "disabled": true,
                  "description": "Only events from this time on."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        }
      ]
    },
    {
      "name": "Knowledge",
      "item": [
        {
          "name": "List knowledge bases",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "Your knowledge bases, newest first, each with how many sources it holds. `project_id` keeps to one project. Needs `knowledge:read`."
          }
        },
        {
          "name": "List the websites a knowledge base reads",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/crawls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "crawls"
              ],
              "query": [],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Each website the base was given in the console, with how far its latest reading got. Needs `knowledge:read`."
          }
        },
        {
          "name": "Read a website again",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/crawls/:crawl_id/refresh",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "crawls",
                ":crawl_id",
                "refresh"
              ],
              "query": [],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "crawl_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        },
        {
          "name": "List a knowledge base's sources",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/documents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "documents"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Only sources in this state."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Add a file to a knowledge base",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/documents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "documents"
              ],
              "query": [],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": ""
                },
                {
                  "key": "generate_faqs",
                  "value": "",
                  "type": "text"
                }
              ]
            }
          }
        },
        {
          "name": "Get a source",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/documents/:document_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "documents",
                ":document_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "document_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One source, and where it is in indexing — read it again until it says `indexed` or `failed`. Needs `knowledge:read`."
          }
        },
        {
          "name": "Replace a file",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/documents/:document_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "documents",
                ":document_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "document_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": ""
                }
              ]
            }
          }
        },
        {
          "name": "Delete a source",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/knowledge-bases/:knowledge_base_id/documents/:document_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "knowledge-bases",
                ":knowledge_base_id",
                "documents",
                ":document_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "knowledge_base_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "document_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Tools",
      "item": [
        {
          "name": "List MCP servers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/mcp-servers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "mcp-servers"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "The MCP servers in the projects this key reaches, oldest first. Needs `tools:write`."
          }
        },
        {
          "name": "Add an MCP server",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/mcp-servers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "mcp-servers"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\",\n  \"name\": \"orders\",\n  \"url\": \"https://orders.aigently.ai/mcp\",\n  \"auth_key_id\": \"2e4a6c8e-0a2c-4e4a-d6c8-e0a2c4e6a8ca\",\n  \"allowed_tools\": [\n    \"lookup_order\",\n    \"cancel_order\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get an MCP server",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/mcp-servers/:server_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "mcp-servers",
                ":server_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "server_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One MCP server, its path and query hidden. Needs `tools:write`."
          }
        },
        {
          "name": "Change an MCP server",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/mcp-servers/:server_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "mcp-servers",
                ":server_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "server_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Send only what changes; a `url` still reading `••••` as it was read keeps what is stored. Needs `tools:write` and a live key.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"timeout_ms\": 12000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete an MCP server",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/mcp-servers/:server_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "mcp-servers",
                ":server_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "server_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Agents stop being offered its tools on their next turn. Needs `tools:write` and a live key."
          }
        },
        {
          "name": "List tools",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tools",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tools"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "The tools in the projects this key reaches, oldest first. Needs `tools:write`."
          }
        },
        {
          "name": "Create a tool",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tools",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tools"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\",\n  \"name\": \"lookup_order\",\n  \"description\": \"Look up the status of an order by its number.\",\n  \"parameters\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"order_id\": {\n        \"type\": \"string\",\n        \"description\": \"The order number.\"\n      }\n    },\n    \"required\": [\n      \"order_id\"\n    ]\n  },\n  \"http\": {\n    \"method\": \"GET\",\n    \"url\": \"https://orders.aigently.ai/v1/orders/{order_id}\",\n    \"auth\": {\n      \"type\": \"bearer\",\n      \"vault_key_id\": \"2e4a6c8e-0a2c-4e4a-d6c8-e0a2c4e6a8ca\"\n    }\n  },\n  \"speaking_hint\": \"One moment while I look that up.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a tool",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tools/:tool_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tools",
                ":tool_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "tool_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One tool, its header values hidden. Needs `tools:write`."
          }
        },
        {
          "name": "Change a tool",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/tools/:tool_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tools",
                ":tool_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "tool_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"description\": \"Look up where an order is, by its number.\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a tool",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/tools/:tool_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "tools",
                ":tool_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "tool_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Every agent that carries it stops being offered it on its next turn. Needs `tools:write` and a live key."
          }
        }
      ]
    },
    {
      "name": "Keys",
      "item": [
        {
          "name": "Describe this API key",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "me"
              ],
              "query": [],
              "variable": []
            },
            "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."
          }
        }
      ]
    },
    {
      "name": "Phone numbers",
      "item": [
        {
          "name": "List phone numbers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/phone-numbers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "phone-numbers"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                },
                {
                  "key": "agent_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only the numbers this agent owns or may call from."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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`."
          }
        },
        {
          "name": "Point a phone number at an agent",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/phone-numbers/:phone_number_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "phone-numbers",
                ":phone_number_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "phone_number_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"3c7d9e1f-5a2b-4c6d-8e0f-1a3b5c7d9e2f\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Projects",
      "item": [
        {
          "name": "List projects",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/projects",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "projects"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "The projects this key can reach, oldest first. Needs `agents:read`."
          }
        }
      ]
    },
    {
      "name": "Scheduled calls",
      "item": [
        {
          "name": "List scheduled calls",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/scheduled-calls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "scheduled-calls"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Only these: scheduled, placed, cancelled, failed."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "The calls this key's side of test mode scheduled, newest first. Filter by `status`. Needs `calls:write`."
          }
        },
        {
          "name": "Schedule a call",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this request, up to 120 characters. Required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/scheduled-calls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "scheduled-calls"
              ],
              "query": [],
              "variable": []
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"8a1f3c2e-0b6d-4f5e-9a7c-2d4e6f8a0b1c\",\n  \"to_number\": \"+12025550100\",\n  \"dial_at\": \"2026-10-12T13:00:00Z\",\n  \"call_window\": {\n    \"timezone\": \"America/New_York\",\n    \"start\": \"09:00\",\n    \"end\": \"17:00\",\n    \"days\": [\n      \"mon\",\n      \"tue\",\n      \"wed\",\n      \"thu\",\n      \"fri\"\n    ]\n  },\n  \"variables\": {\n    \"first_name\": \"Sara\"\n  },\n  \"external_id\": \"reminder-20931\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a scheduled call",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/scheduled-calls/:scheduled_call_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "scheduled-calls",
                ":scheduled_call_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "scheduled_call_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One scheduled call: when it will be placed, or what became of it. `calls:write`."
          }
        },
        {
          "name": "Cancel a scheduled call",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/scheduled-calls/:scheduled_call_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "scheduled-calls",
                ":scheduled_call_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "scheduled_call_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        }
      ]
    },
    {
      "name": "Test mode",
      "item": [
        {
          "name": "Make a test call to an agent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/test/inbound-calls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test",
                "inbound-calls"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"3c7d9e1f-5a2b-4c6d-8e0f-1a3b5c7d9e2f\",\n  \"from_number\": \"+12025550100\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Vault",
      "item": [
        {
          "name": "List tool credentials",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/vault/secrets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vault",
                "secrets"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "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."
          }
        },
        {
          "name": "Add a tool credential",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/vault/secrets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vault",
                "secrets"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Orders API\",\n  \"provider\": \"Aigently Orders\",\n  \"secret\": \"your-orders-api-token\",\n  \"project_ids\": [\n    \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a tool credential",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/vault/secrets/:secret_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vault",
                "secrets",
                ":secret_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "secret_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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."
          }
        },
        {
          "name": "Change a tool credential",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/vault/secrets/:secret_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vault",
                "secrets",
                ":secret_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "secret_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"secret\": \"your-new-orders-api-token\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a tool credential",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/vault/secrets/:secret_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "vault",
                "secrets",
                ":secret_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "secret_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Tools and MCP servers that send it have none from their next request, and say so. Needs `vault:write` and a live key."
          }
        }
      ]
    },
    {
      "name": "Web calls",
      "item": [
        {
          "name": "Start a browser call",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this call, up to 120 characters."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/web-calls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "web-calls"
              ],
              "query": [],
              "variable": []
            },
            "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.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"agent_id\": \"3c7d9e1f-5a2b-4c6d-8e0f-1a3b5c7d9e2f\",\n  \"variables\": {\n    \"first_name\": \"Sara\"\n  },\n  \"metadata\": {\n    \"session\": \"S-20931\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List webhook receivers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ],
              "query": [
                {
                  "key": "project_id",
                  "value": "",
                  "disabled": true,
                  "description": "Only this project's."
                }
              ],
              "variable": []
            },
            "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`."
          }
        },
        {
          "name": "Create a webhook receiver",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks"
              ],
              "query": [],
              "variable": []
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"project_id\": \"0b1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e\",\n  \"url\": \"https://hooks.aigently.ai/aigently\",\n  \"events\": [\n    \"conversation.ended\",\n    \"conversation.analyzed\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a webhook receiver",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "One receiver, without its secret. Needs `webhooks:read`."
          }
        },
        {
          "name": "Change a webhook receiver",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"events\": [\n    \"conversation.ended\"\n  ],\n  \"include_values\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a webhook receiver",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Stop and remove a receiver, with its deliveries. Events it would have heard stay in the event feed. Needs `webhooks:write`."
          }
        },
        {
          "name": "List a receiver's deliveries",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id/deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id",
                "deliveries"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "`pending`, `delivered` or `failed`."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "What was sent to this receiver in the last 30 days, newest first, and how each attempt went. Needs `webhooks:read`."
          }
        },
        {
          "name": "Send a delivery again",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id/deliveries/:delivery_id/resend",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id",
                "deliveries",
                ":delivery_id",
                "resend"
              ],
              "query": [],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                },
                {
                  "key": "delivery_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        },
        {
          "name": "Change a webhook receiver's secret",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id/rotate-secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id",
                "rotate-secret"
              ],
              "query": [],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"keep_previous_for\": \"24h\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send a test event",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/:receiver_id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                ":receiver_id",
                "test"
              ],
              "query": [],
              "variable": [
                {
                  "key": "receiver_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        }
      ]
    },
    {
      "name": "WhatsApp",
      "item": [
        {
          "name": "Start a WhatsApp conversation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "",
                "disabled": false,
                "description": "Your own id for this message. Required."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/whatsapp/conversations",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "whatsapp",
                "conversations"
              ],
              "query": [],
              "variable": []
            },
            "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`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sender_id\": \"7d9f1b3d-5f7b-4d9f-c1b3-d5f7b9dbfd1f\",\n  \"to_number\": \"+966501234567\",\n  \"template\": {\n    \"name\": \"appointment_reminder\",\n    \"language\": \"en_US\",\n    \"parameters\": [\n      \"Sara\",\n      \"Monday at 10\"\n    ]\n  },\n  \"variables\": {\n    \"first_name\": \"Sara\"\n  },\n  \"metadata\": {\n    \"booking\": \"4471\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List WhatsApp numbers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/whatsapp/senders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "whatsapp",
                "senders"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "How many to return, 1 to 100."
                },
                {
                  "key": "cursor",
                  "value": "",
                  "disabled": true,
                  "description": "`next_cursor` from the previous page, with the same filters."
                }
              ],
              "variable": []
            },
            "description": "The organization's WhatsApp numbers this key reaches, oldest first, each with the agent that answers it. Needs `whatsapp:write`."
          }
        },
        {
          "name": "List a WhatsApp number's templates",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/whatsapp/senders/:sender_id/templates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "whatsapp",
                "senders",
                ":sender_id",
                "templates"
              ],
              "query": [],
              "variable": [
                {
                  "key": "sender_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "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`."
          }
        }
      ]
    }
  ]
}
