https://<your-workspace>.api.useago.com, where <your-workspace> is your AGO workspace name.
SDK API
The SDK API is what the AGO widget uses. Your code sends the user’s message toPOST /api/sdk/v1/messages and reads the answer as a Server-Sent Events stream, so you can show it as it is written.
- Every request identifies the user with
X-User-Anon-Id, a stable identifier you generate per user or device. To identify signed-in users, also sendAuthorization: Bearer <jwt>with a token your application issues. See Widget & SDK Authentication. - Requests from a browser must come from a domain in your allowed domains list.
- Keep
thread.idfrom the stream and send it asconversation_idwith the next message to continue the conversation. The answer can come back with a different conversation ID; see Forked conversations. - If a proxy or firewall cuts the stream, poll
GET /api/sdk/v1/messages/{message_id}/statusuntil the message is complete.
Public API v1 and Resolutions API
Server integrations authenticate with an API key created in Studio > API Keys. Each key has scopes that limit the endpoints it can call. You can also restrict it to IP addresses and rotate it. See API Key Authentication. The Resolutions API returns the agent’s complete answer in one response, without streaming, which is simpler for automations.Good Practices
- Never put an API key in browser or mobile code. Use the SDK API there, and keep API keys on your servers.
- Show streamed answers as they arrive, and allow at least 60 seconds before a streaming request times out. Answers that use tools can take a while.
- Retry with exponential backoff on
429and5xxresponses and on network errors.
Troubleshooting
See Errors for error formats.
