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"
  }
}
  • code is a short, stable word. Branch on this.
  • message is a sentence written for a person. It is safe to show, and it may be reworded, so never match on its text.
  • field names the input that failed, when one did.

The HTTP status follows from the code, so the two never disagree.

Every code

StatusCodeWhat it means
400validationA field failed validation. field names it and message says why. Fix the request; retrying it unchanged fails the same way.
401unauthorizedNo key was sent, or the key is unknown, revoked or expired. Check the header, then the key.
403forbiddenThe key holds the scope, and a rule still refuses this particular act: making an owner, removing the primary owner.
403insufficient_scopeThe key is valid but lacks the scope this endpoint needs. required names it. Make a key that holds it.
403plan_limitThe plan does not include this, or a plan limit is reached. message says which. Nothing was deleted.
403csrfA browser session wrote from an origin that is not the dashboard. A key never gets this.
404not_foundNothing with that id is in this workspace. Another workspace’s id answers this too, never a 403.
409conflictThe request collides with what is there: a duplicate key or name, or a version that moved on since you read it.
409read_onlyThe thing cannot be changed right now: an archived table, a workspace over its plan caps, a managed library skill.
429rate_limitedThe key’s budget for this minute is spent. Wait the number of seconds in the Retry-After header.
500internalSomething went wrong on our side. Retry, and tell us if it keeps happening.
503unavailableSomething FloConnector depends on did not answer. Retry shortly.

What each looks like

A request that fails validation names the field:

400POST /v1/tables
{
"error": {
"code": "validation",
"message": "name: Required",
"field": "name"
}
}

An 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".

404GET /v1/profiles/00000000-0000-4000-8000-000000000000
{
"error": {
"code": "not_found",
"message": "No such profile in this workspace."
}
}

A key without the scope an endpoint needs gets the scope's name in required:

403POST /v1/tables
{
"error": {
"code": "insufficient_scope",
"message": "This key lacks the tables.manage scope.",
"required": "tables.manage"
}
}

A 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:

400POST /v1/tables/leads/records
{
"error": {
"code": "validation",
"message": "Nothing was added: 2 records failed validation. Fix them and send the whole batch again.\nrecord 1: email is required\nrecord 2: email is not a valid email: \"not an address\"\nrecord 2: stage \"sold\" is not an option (new, contacted, won, lost)",
"details": {
"errors": [
{
"index": 1,
"code": "required",
"field": "email",
"message": "email is required"
},
{
"index": 2,
"code": "invalid_value",
"field": "email",
"message": "email is not a valid email: \"not an address\""
},
{
"index": 2,
"code": "invalid_value",
"field": "stage",
"message": "stage \"sold\" is not an option (new, contacted, won, lost)"
}
]
}
}
}

The 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 the Retry-After header, then send it again. Rate limits has the detail.
  • unavailable and internal: 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.