API reference

Errors

The Spark error shape, HTTP classes, error codes, and how to handle them.

Error shape

Every error returns the same JSON shape. Spark also sends x-request-id on every response.

JSON

{
  "error": {
    "code": "invalid_request",
    "message": "Choose a valid role."
  }
}

Fields

  • code — a short, stable machine token.
  • message — human-readable text, when Spark has one.

HTTP classes

StatusMeaning
2xxThe request succeeded.
400The request body or query is invalid.
401The API key is missing, invalid, expired, or revoked.
403The key is valid but lacks the required role.
404The workspace or resource was not found.
409The change conflicts with a workspace rule, such as last admin.
413The JSON body is larger than 16,384 bytes.
5xxA Spark error. Safe to retry idempotent calls.
Was this page helpful?