API overview
Base URL, authentication, identity headers, errors, caching and rate limits for every /v1 endpoint.
AAgent44Updated 4 min read
On this page
Base URL#
https://api.agent44.ai/v1Every endpoint takes and returns JSON over HTTPS (uploads are multipart/form-data). The API is what the web messenger and the native SDKs use; your own code can call it the same way.
Authentication#
Send an app's public SDK key as a bearer token on every request:
Authorization: Bearer a44_pub_…Create keys per app in Settings › Apps. A key is public: it ships inside your app or page. A missing, unknown or revoked key is a 401 with {"error": "Missing or invalid public SDK key"}.
The key decides the workspace, the app and its platform (ios, android or web). New conversations are recorded as coming from the key's app, push devices belong to it, and in-app messages aimed only at other apps are never returned for it. Read Identity and security for what a key allows.
Identity headers#
Header | Value |
|---|---|
| Your own id for a signed-in user (trimmed, up to 256 characters). Trusted as sent unless the key's workspace enforces identity verification: use ids nobody can guess either way. |
| The user id's signature: lowercase hex HMAC-SHA256 of the id, keyed with the workspace's identity secret, computed on your server. Send it with every |
| A random id per device or browser before sign-in: 8 to 64 characters of |
| Sent by agent44's own web messenger with its workspace's address. A key from another workspace is then a |
Endpoints that act for a user need X-A44-User-Id or X-A44-Anonymous-Id; without either they answer 400. Sending both moves the anonymous user's conversations, devices, segments and timeline events to the signed-in user. When the key's workspace enforces identity verification, any request with a user id (header, identify body or the help endpoints' user_id) and no valid X-A44-User-Hash is a 401 {"error": "This user couldn't be verified"}; anonymous requests are unaffected.
Requests#
JSON bodies are objects, at most 256 KB. A larger body is a
413({"error": "The request body is too large."}); a body that isn't a JSON object is a400on endpoints that need one.The API can be called from any website (CORS, without cookies). Browsers may send
Content-Type,Authorization,If-None-Matchand theX-A44-*headers, and can read theETagresponse header.Ids in paths are the ids the API returned: conversations, messages, attachments, in-app messages and posts use UUIDs; help articles, collections, tabs and changelog entries use short public ids.
Responses and errors#
Successful responses are JSON objects, or empty for 204. Errors always look like this:
{ "error": "Conversation not found" }Status | Meaning |
|---|---|
| OK; |
| OK, nothing to return. |
| Not modified: your |
| The request is missing something or a value is invalid. The message says what. |
| Missing, unknown or revoked public key, or, when the workspace enforces identity verification, a user id without a valid signature ( |
| The key can't be used here (another workspace's key in a web messenger), or the feature is off (AI answers). |
| Not found, or not visible to this key and user. |
| Not possible in the current state (rating a conversation that's still open). |
| Too large: a body, a file, a message or the user's attributes. |
| An upload type that isn't allowed. |
| A value doesn't follow the rules (segments and timeline events). The message says which. |
| Over a rate limit. Wait for |
| Something failed on our side. Retry later. |
| A user's signature couldn't be checked just now. Retry after |
Error messages are written for people and may change: branch on the status code, not the text.
Caching#
Read endpoints send a weak ETag. Send it back as If-None-Match and you get an empty 304 when nothing changed, which is what to do when polling.
Endpoint |
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Rate limits#
Writes are limited per IP address (IPv6 by its /64) over one-minute windows, and the costly ones per public key too, against floods from many addresses. Over a limit, the answer is 429 with Retry-After in seconds and {"error": "Too many requests. Try again in a minute."}. Counts are kept per Cloudflare location and are approximate.
Endpoints | Per IP, a minute | Per key, a minute |
|---|---|---|
| 10 each | 600 each |
Creating a new user (a new user id or anonymous id), wherever it happens | 60 | 600 |
| 60 each | |
| 120 each | |
| 120 each | 600 each |
Each user also has exact limits, whatever their address:
Limit | Answer |
|---|---|
10 new conversations a day (including chat replies, which open one) |
|
20 messages a minute |
|
60 timeline events a minute |
|
50 segments |
|
30 AI questions an hour per device, within the help center's daily allowance | an |
Endpoints#
Area | Endpoints |
|---|---|
Messenger home, identify, conversations, messages, read receipts, ratings, attachments. | |
Help center, collections, articles, search, AI answers, feedback, events. | |
In-app messages and their events, chat replies, changelog, posts. | |
Registering and removing push devices. | |
Segments (tags) and timeline events. | |
The roadmaps a user may see, and one roadmap's columns and requests. |