Base URL
Authentication
Send your API key in theX-API-Key header:
Authorization: Bearer <access_token> instead. See MCP OAuth Reference.
Scopes
Each API key or OAuth token carries scopes that decide which endpoints it can call. Scopes follow theresource:read / resource:write pattern, and a write scope includes the matching read scope: knowledge:write also grants knowledge:read. The * scope (Full Access) grants every endpoint.
See the full scope list. Each endpoint in the Endpoints sidebar names the scope it requires. A call without it returns 403 with code insufficient_scope.
Response Format
Paginated list endpoints return this structure:object field naming the type. Check each endpoint’s schema: smart table details omit this field, CSV exports return CSV, and MCP uses JSON-RPC.
Pagination
Paginated list endpoints accept these query parameters. Some lists, such as a document’s translations and versions, return all entries without pagination; check the individual endpoint’s parameters.Error Format
REST errors use the structure below. MCP errors can differ; see MCP Server. API Errors lists every code.Available Resources
Knowledge
Manage the documents and sources of your knowledge base: create, update and delete them, bulk operations (up to 100 items), translations, version history, file uploads and the table of contents. Scope:knowledge:read / knowledge:write
Documents can carry a page_id — your own identifier for the record, unique within a
source. It makes syncing from an external system repeatable: POST /documents/bulk
updates the matching document instead of creating a duplicate, and
POST /documents/bulk-delete accepts source_id + page_ids so you never have to
store AGO’s internal IDs on your side.
Spaces
A space is a source written in AGO whose pages are addressed by path (handbook/onboarding/first-week). The /api/v1/spaces endpoints list its tree, find exact text line by line, read line ranges or sections, and replace a string in a page, with a hash check so a change never overwrites a concurrent edit. Each space decides who can use it and at which level, so its pages never appear in the document, source, search or export endpoints: use the spaces endpoints. See the Spaces API.
Download a document’s original file
When a document was extracted from a file,GET /api/v1/documents/{document_id} returns a source_file object with the file’s name, content_type and size (in bytes, may be null). Download that file with GET /api/v1/documents/{document_id}/file. Requires the knowledge:files:read scope, which knowledge:read and knowledge:write do not include: grant it explicitly to the keys that need the files.
Content-Disposition header. Original files are available for:
- Files uploaded to a source, through the API, MCP or the admin. Files uploaded before this endpoint existed are not available.
- Files imported from SharePoint. AGO fetches them from SharePoint at download time, so you get the current version of the file, even before the next sync.
source_file: null. Downloading them returns 404 with the code source_file_unavailable; so does a SharePoint file that has been deleted since the last sync. If SharePoint refuses the request or does not answer, the API returns 502 with the code source_unreachable.
Search documents
UsePOST /api/v1/documents/search to retrieve knowledge for an answer or find documents by exact attributes. Requires knowledge:read (knowledge:write also grants access). Authenticate with your X-API-Key header, as for other v1 endpoints. The MCP equivalent is search_documents.
Supply a non-empty
query or at least one filter. Supported filters are document_id, source_id, page_id, title, status, default_language, doc_type_id, and metadata. IDs are AGO UUIDs; page_id is your own document identifier.
String filters are case-sensitive and match the entire value. Each key inside metadata matches a top-level document attribute exactly: numbers differ from strings, null matches an explicit JSON null rather than a missing key, and arrays and objects must match in full. Metadata keys are literal names, not query operators. You can supply up to 50 metadata keys. Unknown filter names and invalid arguments are rejected.
To find a document in a particular source without a semantic search:
query, search includes documents that have not been indexed and returns matches in stable document-ID order. With query, search ranks indexed documents within the exact filters. No matches returns an empty data array; filters are never widened automatically. Retrieval failures return an error.
The response contains object: "search_result", mode: "semantic" or "exact", data, and has_more. Each match contains the document summary, current metadata, doc_type_id, url, is_internal, an excerpt of up to 1,200 characters, and score. Full content is included only when requested. In semantic mode, the excerpt comes from the best matching indexed passage, and score is a similarity score (higher is better, not a confidence percentage). In exact mode, the excerpt is the beginning of the current content and score is null.
has_more: true means additional matches were retrieved beyond your limit; increase limit or narrow your filters. Semantic search returns nearest matches and is not an exhaustive document listing. Use GET /api/v1/documents for paginated browsing.
Search uses the same workspace-wide read access as listing and reading documents, including drafts and internal documents. It does not reproduce a chat agent’s source selection or keyword restrictions. Documents marked is_internal: true may inform answers but must never be cited, quoted or named; their url is null.
Create a source
POST /api/v1/sources creates a knowledge source. Requires knowledge:write. Give the type by name in source_type (for example ago, mintlify, zendesk or notion), or by UUID in source_type_id — exactly one of the two. An unknown name returns 404 with the list of available types. Source responses include both source_type and source_type_id.
POST /api/v1/sources/{source_id}/sync.
Export a knowledge source
POST /api/v1/sources/{source_id}/exports starts preparing a ZIP. It contains full Markdown documents, folders for subpages, stored attachments, index.html and manifest.json. Requires knowledge:read; knowledge:write also grants access.
202 response includes id, status and poll_after_seconds. Both options default to true; pass {} to use the defaults. Read GET /api/v1/source-exports/{id} with the same API key every five seconds until status is ready or failed. Pending and processing jobs have no download link. A failed job includes an error; request a new export after addressing it.
Ready jobs return download_url, download_url_expires_at, size_bytes and expires_at. The private download URL lasts up to four hours and redirects to the stored archive. Download it without sending your API key:
409 before the job is ready and 410 after expiry; cleaned-up jobs return 404. An expired signed link returns 401. Request a new export once the archive expires.
Set include_files to false for Markdown only, or create_folders to false for flat page paths. Exports include current AGO corrections, all document statuses, and documents from directly included sources. Limits are 10,000 documents and 100 MiB uncompressed; hierarchies deeper than 32 levels require flat paths. Unavailable attachments appear in the manifest’s warnings; external images stay remote links. Recognized inline Markdown links to exported pages and attachments become relative links.
Treat download URLs as private. Exported content may include internal documents: respect the manifest’s is_internal flags when producing answers. See MCP source exports for archive details.
Conversations
Read conversation threads, messages, and user feedback. Includes CSV export. Set thread evaluation, admin comment, admin tags, and admin status. Scope:conversations:read / conversations:write
GET /api/v1/conversations returns each conversation’s title and, when it has one, its ticket: the external_id in your ticketing system (for example the Zendesk ticket number) and the ticketing_system name. Use it to list conversations with their ticket without fetching each conversation.
It takes the filters of the Conversations page in the admin: admin_tag (labels, comma-separated, the conversation must carry all of them), tag (topics), evaluation, agent (agent UUIDs or names, comma-separated), start_date and end_date, reviewed_at_start and reviewed_at_end, email (exact address, case-insensitive), reviewer_email, user_type, need_review, support_asked, ticket_created, ticket_status, knowledge_source, knowledge_page_id, search_text, cx_score_range, cx_dimension, satisfaction, conversation_starter, tool_name, source_origin and conversation_source. Filters combine, for example the conversations labelled kb_not_covered that did not lead to a ticket:
cx_dimension filters on the CX score dimensions as dimension:lt|gte:score, comma-separated, for example customer_effort:lt:50. The list_conversations MCP tool takes the same filters.
When filtering by
organization or exclude_organization, the API key must also have the accounts:read scope.Link an External Ticket
POST /api/v1/conversations/{thread_id}/external-ticket attaches a ticket from your ticketing system to an AGO conversation. It requires conversations:write and works for conversations from anonymous users and from users authenticated through your application. No end-user JWT or Zendesk JWT is required.
Call it from your backend after checking that the ticket belongs to the conversation’s customer, for example when your ticketing system confirms a ticket was created. AGO trusts that check and does not ask the ticketing system whether the ticket exists. Keep the API key on your server, never in browser code.
A successful response has HTTP status
200:
409 when the conversation is already linked to another ticket or the ticket to another conversation or customer, 404 for an unknown conversation, 422 for an invalid reference, and 503 when the ticketing system is not configured.
Reply as an External Agent
POST /api/v1/conversations/{thread_id}/messages posts a reply in an AGO conversation on behalf of an agent from another system: an AI agent, or a person working in your helpdesk. It requires conversations:reply, a scope that conversations:write does not include: grant it only to the integrations allowed to write to your customers.
The customer sees the reply in the conversation with the agent’s name and whether it is an AI agent or a human agent. Back-office readers also see it, and the conversation’s ticket timeline attributes it to that agent. Posting a reply does not make AGO answer, and it does not stop AGO from answering the customer’s next message: to answer in AGO’s place, hand the conversation to your agent.
With
"internal": true, the message is an internal note for your team: back-office readers and the ticket timeline show it as a note, but the customer never sees it and is not notified, and AGO’s AI does not read it. The API only returns notes to callers who ask for them (see below).
The response is the created message with HTTP status 201, or the reply already posted with status 200 when external_id was sent before:
GET /api/v1/conversations/{id} returns the same external_agent on each reply posted this way, and null on other messages. Internal notes, including those your team leaves from AGO, are only listed when you add ?include_internal=true, with internal set to true. Leave it off in integrations that forward messages to your customers. The endpoint returns 404 for an unknown conversation, 410 when an administrator disabled the conversation, and 422 for an invalid body.
Hand a Conversation to Your Agent
PUT /api/v1/conversations/{thread_id}/handoff with "handoff_state": "external" hands the conversation to your agent: it answers through the reply endpoint and AGO’s AI stays silent. The customer’s messages are still recorded, and each one starts the conversation.message_added event with author set to customer, so your system knows when to answer. Send "handoff_state": "ai" to let AGO’s AI answer the next messages again. It requires conversations:reply.
handoff_state, also returned by GET /api/v1/conversations and GET /api/v1/conversations/{id}, says who answers the customer:
Handing over a conversation that your support team handles in AGO ends their takeover, and the ticket’s history records it. Sending
ai only ends your agent’s turn: a conversation in waiting or human keeps its state. Sending the state the conversation already has changes nothing. Each change starts the conversation.handoff_changed event, which can start a workflow. The endpoint returns 404 for an unknown conversation, 410 when an administrator disabled the conversation, and 422 for any other value.
In the AGO chat and widget, your agent’s replies appear as soon as they are posted. AGO’s AI also stays silent on the other channels, such as Slack or WhatsApp, but replies posted through the API are shown only in the AGO chat and widget.
Form submissions
GET /api/v1/form-submissions lists the conversational forms submitted through AGO, most recent first, failed submissions and forms still being filled included. Filter by form_name, by status, and by creation date with start_date and end_date.
Scope: conversations:read
conversation_id is the conversation the form was submitted in, or null when the submission is not linked to one. status is in_progress while the agent is still collecting the form, then completed or error once it is sent. An in_progress entry holds the values collected so far, has a null submitted_at, and its updated_at is the time of the last change. submitted_at is when the form was sent.
response is what the form’s destination answered (HTTP status and body, parsed as JSON when possible), and error why an error submission failed; both are null otherwise.
Tickets
Read tickets, statuses, forms, statistics, and messages. Includes CSV export.GET /api/v1/tickets/forms lists the ticket forms, which is how you find the ticket_form_id to attach to a user.
Scope: tickets:read
Merge duplicate tickets
POST /api/v1/tickets/{ticket_id}/merge with {"target_ticket_id": "..."} merges a duplicate into the ticket that continues the conversation, exactly like Merge into another ticket in the ticket view: the target takes over the duplicate’s messages, emails and conversations, and the duplicate is solved. The response is the target ticket.
Requires the tickets:write scope, and the key’s creator (or the OAuth user) must be an active staff member: the merge appears in both tickets’ history under their name. Only open AGO tickets can receive a merge. A refused merge answers with one of these codes:
Tasks
Create, update, move, link and comment on the tasks of your team’s Tasks board. Requires Tasks to be enabled for your workspace, and the key’s creator (or the OAuth user) must be an active staff user. The task list uses cursor pagination (next_cursor) instead of page. See Tasks API.
Scope: tasks:read / tasks:write
Work log
Log the work your team and its AI assistants start, finish or drop, and read it back to coordinate. Entries belong to the key’s creator (or the OAuth user), who must be an active staff user. See Work Log API. Scope:work_log:read / work_log:write
Analytics
Query dashboard analytics with date range filters and tab selection (evaluation, overview, knowledge, feedback, user-analytics, tickets).
Scope: analytics:read
The monthly endpoints take
months (1 to 36; leave it out to start at your first conversation) and timezone, an IANA time zone such as Europe/Paris that sets where each month starts (UTC by default). The current month appears once it ends. Simulations and imported conversations are not counted, as on the Monthly Conversations page.
/export to the path to download the CSV, for example with curl -o monthly-conversations.csv.
Agents
Manage agent configurations including prompt templates, tools, sources, LLM settings, and feedback options. Scope:agents_config:read / agents_config:write
When setting
source_ids or pinned_document_ids on an agent, the API key must also have the knowledge:read scope.Agent drafts
Each agent has one draft shared by the builder, the API and MCP. Edit it, test it, then publish it; the live agent does not change until you publish.has_changes tells whether the draft still differs from the live agent, and changes lists each setting that differs with its live and draft values, the selected items it added and removed by name, and the names of a referenced model, template or icon in live_label and draft_label; a change that brings every setting back to the live values deletes the draft. Pass the version you last read to avoid overwriting someone else’s changes: a stale version returns 409 with code version_conflict. Publishing applies only the settings the draft changed, so edits made to other settings of the live agent in the meantime are kept. It returns 409 with code published_changed when a setting changed in the draft was also changed on the live agent; send "force": true to replace it. Previews run the agent as the API key’s creator and read its knowledge, so they also require the knowledge:read scope. Configured tools can perform real actions.
Scope: agents_config:read (GET) / agents_config:write
Tools
Manage the tools attached to agents. Responses never includesecret_key values: once saved, a secret key cannot be read back through the API.
Scope: agents_config:read / agents_config:write
Prompt Templates
Manage prompt templates used by agents. Content changes are versioned automatically. Deleting a template in use by an agent returns409.
Scope: agents_config:read / agents_config:write
Organizations
Read organizations and their email domains. See Organization API. Scope:accounts:read
Users
List and read users, filtered by organization, email or name. Create or update a user before their first login and grant or revoke their permissions. See Users API. Scope:accounts:read / accounts:write
LLM models
Choose the workspace’s model for each kind of work and its backup model, and register or remove models. Not available as MCP tools or through OAuth connections. See LLM Models API. Scope:llm_models:read / llm_models:write
Simulations
Manage test datasets, test cases and personas, run them against an agent and read the results. See Simulation API. Scope:agents_config:read / agents_config:write
Smart tables
Push, search and delete rows in smart tables (/api/v1/custom-data-sources), and manage the sources that fill them automatically (/api/v1/smart-sources).
Scope: custom_data_sources:read / custom_data_sources:write
Knowledge gap reports
Read the Knowledge Gap Reports: the questions your agents could not answer well, grouped into one request per missing piece of knowledge. Scope:knowledge:read
See Read requests through the API for the filters and an example.
Knowledge coverage
Import reference question sets, run coverage evaluations, and read coverage per domain and the gaps found. See Knowledge Coverage. Scope:coverage:read / coverage:write
Workflows
Create, validate, publish and run workflows, and read their execution logs. Requires Workflows to be enabled for your workspace. Scope:workflows:read / workflows:write
CRM
Companies, contacts, deals, notes, signals and customer health from Business, when CRM is enabled for your workspace. See CRM API. Scope:crm:read / crm:write
AGO Apps
Create AGO Apps, commit their code, manage their secrets and databases, and promote or roll back deployments. Requires AGO Apps to be enabled for your workspace. Scope:apps:read / apps:write
MCP
The MCP server at/api/v1/mcp exposes most of these endpoints as tools, plus a few MCP-only ones. Connect Claude, Cursor or any MCP client with the same API key and scopes.
