Errors
The error format of the Indrava REST API and MCP server, the status codes, and which requests are safe to retry.
REST
A failed request has a 4xx or 5xx status and a JSON body:
{
"defined": false,
"code": "UNAUTHORIZED",
"status": 401,
"message": "Unauthorized"
}code is stable and meant for programs. message is meant for people and may change. Some errors add a data field with detail, such as which input field was wrong.
Status |
| Meaning | Retry? |
|---|---|---|---|
|
| The input did not match the operation's schema, or the request cannot be carried out as sent | No, fix the request |
|
| No token, or the token is unknown, revoked or expired | No, fix the token |
|
| The workspace's plan is full for what the request adds (a scheduled post in that month, a channel, an automation); | No, until the plan changes or the month ends |
|
| The token lacks a scope ( | No |
|
| The post, channel or tag does not exist in this workspace, or is not visible to this caller | No |
|
| The request is valid but does not fit the current state: a published post cannot be edited, there is nothing to retry, a tag with that name exists | No |
|
| Over the rate limit | Yes, after |
| Something failed on the server | Yes, with backoff |
A path that is not part of the API answers 404 with a plain-text body.
The 429 body has only code and message.
An id from another workspace gives 404, the same as an id that does not exist.
MCP
A tool call that fails returns a result with isError: true and the error message as text, so the model can read it and correct the call. A request to /mcp without a valid token gets HTTP 401 with a WWW-Authenticate header; see Authentication.
Command line
indrava prints the message to standard error and exits with a code: 1 the API refused or failed, 2 bad usage, 3 not signed in. With --json the error is JSON: {"error": "...", "status": 403}.
What is safe to retry
GETrequests, always.POST /postswith anid(an update),PUT /slots/{channelId}, and theDELETEoperations: sending them twice has the same result as once.POST /postswithout anidcreates a new post each time, unless you send anIdempotency-Keyheader (oridempotencyKeyin the body): a retry with the same key returns the first post. Without a key, list recent posts before sending it again.POST /posts/{id}/retryonly re-sends channels that failed. A part of a post that a platform already accepted, and Indrava recorded, is not sent again.
A post that failed to publish
A publish failure is not an API error: the request that scheduled the post succeeded. The post's status becomes failed, and the reason is in the app, on the post, per channel. Subscribe to the post.failed and target.failed webhook events to be told when it happens.