Errors
Every error from the API has the same shape, whatever went wrong:
{
"error": {
"code": "validation",
"message": "name: A table needs a name.",
"field": "name"
}
}codeis a short, stable word. Branch on this.messageis a sentence written for a person. It is safe to show, and it may be reworded, so never match on its text.fieldnames the input that failed, when one did.
The HTTP status follows from the code, so the two never disagree.
Every code
| Status | Code | What it means |
|---|---|---|
| 400 | validation | A field failed validation. field names it and message says why. Fix the request; retrying it unchanged fails the same way. |
| 401 | unauthorized | No key was sent, or the key is unknown, revoked or expired. Check the header, then the key. |
| 403 | forbidden | The key holds the scope, and a rule still refuses this particular act: making an owner, removing the primary owner. |
| 403 | insufficient_scope | The key is valid but lacks the scope this endpoint needs. required names it. Make a key that holds it. |
| 403 | plan_limit | The plan does not include this, or a plan limit is reached. message says which. Nothing was deleted. |
| 403 | csrf | A browser session wrote from an origin that is not the dashboard. A key never gets this. |
| 404 | not_found | Nothing with that id is in this workspace. Another workspace’s id answers this too, never a 403. |
| 409 | conflict | The request collides with what is there: a duplicate key or name, or a version that moved on since you read it. |
| 409 | read_only | The thing cannot be changed right now: an archived table, a workspace over its plan caps, a managed library skill. |
| 429 | rate_limited | The key’s budget for this minute is spent. Wait the number of seconds in the Retry-After header. |
| 500 | internal | Something went wrong on our side. Retry, and tell us if it keeps happening. |
| 503 | unavailable | Something FloConnector depends on did not answer. Retry shortly. |
What each looks like
A request that fails validation names the field:
POST /v1/tablesAn id that is not in the workspace is not_found. That includes an id from another workspace: the
API never answers "that exists, but you cannot have it".
GET /v1/profiles/00000000-0000-4000-8000-000000000000A key without the scope an endpoint needs gets the scope's name in required:
POST /v1/tablesA refused batch of records
Writing records is all or nothing. One bad record and none are written, and the error lists every
record that failed validation so you can fix them in one pass. Each entry in details.errors carries the record's
position in your request (index, counted from 0), its own code, the field when one is at
fault, and a message:
POST /v1/tables/leads/recordsThe envelope's own code follows from the records: conflict when every refused record collides
with what the table already holds (duplicate_key, stale_version), not_found when every one
names a record that is gone, and validation for anything else or a mix. The per-record codes are
invalid_record, unknown_field, invalid_value, required, too_large, duplicate_in_batch,
invalid_id, duplicate_key, unknown_record and stale_version.
What to retry
rate_limited: wait the number of seconds in theRetry-Afterheader, then send it again. Rate limits has the detail.unavailableandinternal: retry after a short pause, a few times at most.- Everything else: do not retry it unchanged. The request, the key or the plan has to change first.