Where the agent stands, and what to do next
GET/v1/agents/:agentId/setup
x-scope: "agents:read"
The path to a working agent in one read: five steps in order (instructions, knowledge,
test, channel, live), whether each is done, the stage that follows from them
(empty → instructed → knowledge → tested → connected → live), and next: the one
step to take now, with a sentence (say) an AI assistant can repeat to the person as is, in
their language, and the operation that does it (tool, named as the MCP tool, or where: dashboard for what only the dashboard can do, like connecting a channel).
optional reports lead capture, AI attachments and custom API tools the same way, beside the
path rather than on it. Lead capture counts as shaped once the business changed its prompt
(what counts as a lead here) or added fields (a booking date-time, a branch from a list), or
once a lead was captured; every new agent starts with the generic tool, so "on" alone is not it. attention lists what to fix first when something is off: a
knowledge base over the recommended 60,000 characters, or replies that count as more than one
message. facts holds the numbers everything above was derived from, and guidance the
house rules for a good agent, the same every time: keep the knowledge base under 60,000
characters, keep anything that changes (prices, stock, orders, bookings) in a custom API tool
rather than the knowledge base, one entry per topic, and test after every change.
Read it at the start of a session and again after each change; the numbers are live. Sizes are characters, counted the way the plan counts them for the message weight.
Request
Responses
- 200
- 401
- 403
- 404
- 429
- 500
- 503
The agent's setup report.
Response Headers
Correlation id for this request — paste into support tickets.
Authentication failed. Single code (invalid_api_key) covers every
sub-case: missing header, wrong scheme, malformed, unknown, revoked or
expired key. The message field disambiguates for humans debugging.
One exception: when the key could not be checked because of a server-side
fault, the status is still 401 but type is internal_error and code
is internal_server_error; retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.
Authenticated, but not allowed: insufficient_scope (the key lacks the scope in this
operation's x-scope) or agent_not_authorized (the key is limited to other agents).
Response Headers
Correlation id for this request — paste into support tickets.
agent_not_found when the agent is not one of your company's agents (the API never confirms
whether another company's agent exists); endpoint_not_found for a path or method no
endpoint serves, including an id that is not a UUID.
Response Headers
Correlation id for this request — paste into support tickets.
Per-key rate limit hit. Default is 60/min/key; an endpoint with an
x-rate-limit-per-minute of its own counts in a budget of its own
(today the WhatsApp template endpoints, sendBroadcast, retryBroadcast, inviteMember,
resendInvitation, uploadAttachmentMedia, importAttachmentMedia, createUpload and
importSavedReplyMedia, which share one that allows 10/min/key,
sendConversationMessage, which allows 20/min/key; putUploadContent takes no key and
allows the default 60/min per IP address), and its 429
reports that limit in X-RateLimit-Limit. Retry-After tells you when to retry;
X-RateLimit-Reset is the Unix timestamp of the next window.
Per-success-response
X-RateLimit-*headers are a known gap; on 2xx responses these headers are NOT currently emitted. Customers should rely on 429 +Retry-Afterfor backoff signals.
Response Headers
Correlation id for this request — paste into support tickets.
Seconds to wait before retrying.
The per-minute request limit of the endpoint called. Every key has the same limits today.
Remaining requests in the current window. 0 on rejection.
Unix timestamp at which the current window resets.
Unexpected server-side failure. Retry with exponential backoff. If
the failure persists, send us the correlation_id.
Response Headers
Correlation id for this request — paste into support tickets.
Mojeeb couldn't check access because of a temporary fault: the key's,
or on assignLead and assignConversation the teammate's. Nothing was
changed. Retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.