Before you start
Create a scoped API key withresolutions:write. This scope also lets you retrieve results. Requests run as the user who created the key, using that user’s agent and knowledge permissions. The creator must remain active. Keys without a creator cannot run resolutions. OAuth calls run as the user who granted access.
An email’s from field supplies context only; it never changes the execution user. Configured tools can perform actions, so choose an agent whose tools match your integration’s needs.
Request an answer
input accepts the following shapes directly. No input type flag is needed.
Text
Conversation
Supply messages oldest first, ending with the user message AGO should answer:user and assistant roles are accepted; configure system instructions on the agent.
text for the body, or html when plain text is unavailable. If both are supplied, AGO uses text. Subject, sender, and recipients are optional. AGO converts HTML into readable text without loading images or external resources. This endpoint does not send the generated reply as an email.
Parameters and limits
Text and email bodies accept up to 100,000 characters each. Conversation arrays accept up to 100 messages and 100,000 content characters in total. Blank messages, unknown fields, and unsupported roles are rejected. Attachments and client-executed functions are not accepted.
To continue a conversation, send its
conversation_id with only the new text or email. A full history array cannot be combined with conversation_id. Only one resolution can be active on a conversation at a time; overlapping requests return 409.
Responses
By default, a completed request returns200 with JSON:
Accept: text/markdown or Accept: text/plain to receive only the completed answer body. Both preserve the answer’s Markdown formatting. Identifiers are returned in X-Resolution-Id, X-Conversation-Id, and X-Message-Id headers. Location contains the status URL.
Longer requests
If the answer is not ready withinwait_seconds, AGO returns 202 Accepted with JSON, even when you requested Markdown. The work continues. Poll the Location URL using the same credentials:
Retry-After (currently 2 seconds). A completed result returns 200; pending results continue returning 202. Set wait_seconds: 0 to submit immediately and always use polling. Resolution requests expire after 15 minutes if still unfinished when checked. AGO does not automatically replay interrupted work, because tools may already have performed actions.
Statuses
requires_action returns JSON with 200 for JSON callers, or 409 for callers requesting a text body. It is not a completed answer. Empty answers are reported as requires_action with no_text_answer. Failure and cancellation responses never expose partial output as a successful answer.
Safe retries
Send anIdempotency-Key header (1–255 characters) identifying the logical request. Repeating the same payload with the same key retrieves the existing resolution. Changing only wait_seconds or Accept is allowed. Reusing the key with different input, agent, language, or conversation returns 409.
Idempotency keys and result access are scoped to the calling API key, or the OAuth application and user. Use the original credentials when retrieving a result. Do not issue a new idempotency key merely because an HTTP connection timed out: the original request may still be running.