Skip to content
Browse articles
API reference

API overview

Base URL, authentication, identity headers, errors, caching and rate limits for every /v1 endpoint.

Agent44Updated 4 min read

On this page

Base URL#

https://api.agent44.ai/v1

Every 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

X-A44-User-Id

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.

X-A44-User-Hash

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 X-A44-User-Id; it's required while your workspace enforces identity verification, which new workspaces do.

X-A44-Anonymous-Id

A random id per device or browser before sign-in: 8 to 64 characters of A–Z a–z 0–9 _ -.

X-A44-Messenger

Sent by agent44's own web messenger with its workspace's address. A key from another workspace is then a 403. You don't send it.

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 a 400 on endpoints that need one.

  • The API can be called from any website (CORS, without cookies). Browsers may send Content-Type, Authorization, If-None-Match and the X-A44-* headers, and can read the ETag response 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

200, 201

OK; 201 when something was created.

204

OK, nothing to return.

304

Not modified: your If-None-Match matched.

400

The request is missing something or a value is invalid. The message says what.

401

Missing, unknown or revoked public key, or, when the workspace enforces identity verification, a user id without a valid signature ({"error": "This user couldn't be verified", "code": …}, the code identity_hash_missing, identity_hash_invalid or, while Enforce is on and the workspace has no secret yet, identity_secret_missing).

403

The key can't be used here (another workspace's key in a web messenger), or the feature is off (AI answers).

404

Not found, or not visible to this key and user.

409

Not possible in the current state (rating a conversation that's still open).

413

Too large: a body, a file, a message or the user's attributes.

415

An upload type that isn't allowed.

422

A value doesn't follow the rules (segments and timeline events). The message says which.

429

Over a rate limit. Wait for Retry-After seconds when it's sent.

500

Something failed on our side. Retry later.

503

A user's signature couldn't be checked just now. Retry after Retry-After seconds.

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

Cache-Control

GET /v1/messenger

private, max-age=30

GET /v1/help, its collections, articles and article

private, max-age=60

GET /v1/changelog, GET /v1/posts and one entry or post

private, max-age=60

GET /v1/conversations/{id}, GET /v1/prompts

private, no-cache (always revalidate)

GET /v1/conversations

private, no-cache, without an ETag

GET /v1/help/search, GET /v1/roadmaps and one roadmap

private, no-store

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

POST /v1/conversations, POST /v1/prompts/{id}/reply, POST /v1/attachments, POST /v1/help/ask

10 each

600 each

Creating a new user (a new user id or anonymous id), wherever it happens

60

600

POST /v1/conversations/{id}/messages, POST /v1/identify, POST /v1/segments, POST /v1/push/devices, DELETE /v1/push/devices (both forms)

60 each

POST /v1/conversations/{id}/read, POST /v1/conversations/{id}/rating, POST /v1/prompts/{id}/events, POST /v1/help/events, POST /v1/help/articles/{id}/feedback, POST /v1/events

120 each

GET /v1/roadmaps, GET /v1/roadmaps/{slug}

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)

429 "Too many new conversations today. Reply in an existing one."

20 messages a minute

429 "You're sending messages too fast. Wait a moment."

60 timeline events a minute

429 with Retry-After: 60

50 segments

422 "A user can have at most 50 segments"

30 AI questions an hour per device, within the help center's daily allowance

an error line of limit in the answer stream

Endpoints#

Area

Endpoints

Conversations API

Messenger home, identify, conversations, messages, read receipts, ratings, attachments.

Help center API

Help center, collections, articles, search, AI answers, feedback, events.

Engagement API

In-app messages and their events, chat replies, changelog, posts.

Push API

Registering and removing push devices.

Users API

Segments (tags) and timeline events.

Roadmaps API

The roadmaps a user may see, and one roadmap's columns and requests.

Did this answer your question?