code, a human-readable message and usually a link to this page. Branch on code, not on message. MCP errors can be JSON-RPC errors or session errors with only type and message, so don’t assume every error has all the fields below. See MCP errors.
Error Format
Error Types
Error Codes
invalid_api_key
Status: 401 The request did not include a valid API key: the key is missing, invalid, expired, locked or revoked, or the request comes from an IP address outside the key’s allowlist. Include your key in theX-API-Key header and call the API host of your workspace:
insufficient_scope
Status: 403 Your API key is valid but does not have the scope required for this endpoint. Each endpoint documents which scope it needs (e.g.accounts:read, conversations:read, knowledge:write).
Edit the API key in Studio > API Keys and add the required scope. A write scope includes read access for the same resource. For an OAuth connection, reconnect and grant the missing permission.
not_found
Status: 404 The requested resource does not exist. Check that the ID is a valid UUID and that the resource has not been deleted.bad_request
Status: 400 The request is malformed. Check themessage and param fields for details.
validation_error
Status: 422 One or more request parameters failed validation. Theparam field indicates which parameter is invalid, and message describes the issue.
invalid_value
Status: 422 A field has a value AGO cannot use, for example an organization, permission or ticket form ID that does not exist.param names the field.
missing_required_parameter
Status: 422 A required field is missing from the request body. Theparam field tells you which field to add.
invalid_parameters
Status: 422 One or more parameters have invalid values. Check themessage for specifics (e.g., a UUID that references a non-existent resource).
conflict
Status: 409 The operation conflicts with existing data. Common causes:- Creating a resource with a name that already exists
- Updating a resource to a state that conflicts with another resource
source_file_unavailable
Status: 404 The document has no original file you can download: it was written in AGO, imported from a page-based source, or its file no longer exists in the external system. See Download a document’s original file.source_unreachable
Status: 502 AGO could not fetch the original file from the external system, such as SharePoint. The message gives the reason and the error returned by that system. If access was denied, check that the source’s connection still has access to the site. If the request was rejected, sync the source, then retry. Otherwise, retry later.too_many_items
Status: 422 A bulk operation exceeds the maximum number of items (100 per request).empty_items
Status: 422 A bulk operation was sent with an empty items array. At least one item is required.ambiguous_addressing
Status: 422 A bulk operation identified the same resources two different ways at once.POST /documents/bulk-delete accepts either document_ids or source_id + page_ids, not both in the same request.
creation_failed
Status: 500 The resource could not be created because of an error on AGO’s side. Retry the request. If it persists, contact AGO support.update_failed
Status: 500 The resource could not be updated because of an error on AGO’s side. Retry the request.deletion_failed
Status: 500 The resource could not be deleted because of an error on AGO’s side. Retry the request.export_failed
Status: 500 The export failed. Try a smaller date range or retry later.request_too_large
Status: 413 The request body exceeds the maximum allowed size.rate_limit_exceeded
Status: 429 Your IP address sent too many requests in a short period. Wait for the number of seconds in theRetry-After header before retrying. Browsers can read Retry-After from JavaScript, and CORS preflight (OPTIONS) requests do not count towards the limit.
rate_limited
Status: 429 You reached the request limit of a specific endpoint. Wait and retry later.concurrency_limit_exceeded
Status: 429 The MCP endpoint (/api/v1/mcp) is handling too many of your requests at the same time. Wait for the number of seconds in the Retry-After header, then retry. If you hit this often, run fewer MCP calls in parallel.
internal_error
Status: 500 An unexpected error occurred on AGO’s side. If it persists, contact AGO support with the time of the request and theevent_id when present.
Docs
docs_disabled
Status: 403 Docs is not enabled for your workspace, so no space can be used through the Spaces API or the MCP space tools. Retrying will not help: contact AGO to enable it.Apps
approval_required
Status: 409 The site requires approval, so only a person in AGO’s admin can change what it serves. Commits tomain, promotions, rollbacks and git credentials are refused. Commit to another branch, such as preview, and share the site’s private preview link: an administrator publishes it from the site’s page in the admin. See Require approval.
Tasks
The Tasks API and the MCP task tools return these codes in the same error envelope.staff_principal_required
Status: 403 Tasks can only be used by active staff users. The API key’s creator or the OAuth user is not, or is no longer, an active staff user. Create the key from an active staff account, or reconnect OAuth as one.tasks_disabled
Status: 403 Tasks is not enabled for your workspace. Contact AGO to enable it.task_not_found
Status: 404 No task you can access exists with this ID. It may have been deleted.board_not_found
Status: 404 No board you can access exists with this ID.board_permission_denied
Status: 403 Your role on the board does not allow this action. Viewers can read; Editors and Admins can write.link_target_not_found
Status: 404 The conversation, ticket, feedback, message, knowledge update request, company, contact or deal you tried to link does not exist. Checktarget_type and target_id.
task_revision_conflict
Status: 409 The task changed since theexpected_revision you sent. Read the task again, reapply your change and retry. param is expected_revision.
stale_neighbors
Status: 409 The cards you passed asbefore_task_id or after_task_id moved, or are no longer next to each other. Read the board again and retry the move.
task_not_held_by_external_agent
Status: 409 You tried to hand back a task that is not with an external AI agent: someone took it back, it was given to an AGO agent, or it was already handed back. Read the task: itsholder is human, or its agent.kind is ago.
status_option_required
Status: 400 You created a task without astatus and the board has no active to-do status. Pass a status, or ask a board admin to add a to-do status.
invalid_cursor
Status: 400 Thecursor comes from a list with another sort. Start again from the first page.
idempotency_key_reused
Status: 409 TheIdempotency-Key (or MCP idempotency_key) was already used with a different request body in the last 24 hours. Use a new key for a different request.
Invalid filter or field values
Status: 400 A filter or field has an unknown value, for exampleinvalid_status, invalid_priority, invalid_queue or invalid_sort. The message lists the valid values and param names the field.
The CRM API has its own codes, listed on its page. So does the Spaces API: its errors carry extra fields, such as current_hash or nearest_address, that tell you how to recover.
HTTP Status Summary
Related Documentation
- Public API Overview - Authentication and general API usage
- API Key Authentication - Create and manage API keys
