Skip to main content
The Sevalla API uses standard HTTP status codes and returns a consistent JSON error object when something goes wrong.

Error object

Every error response has this shape:
{
  "message": "Unauthorized",
  "status": 401,
  "data": {
    "code": "err-abc-123",
    "message": "If you need assistance, please contact support."
  }
}
FieldTypeDescription
messagestringShort description of the error.
statusintegerHTTP status code.
data.codestringError tracking identifier. Include this when contacting support.
data.messagestringAdditional context or instructions for resolving the error.
The data field may not be present on all error responses. Always check for it before accessing nested fields.

HTTP status codes

CodeMeaning
200Success. The request completed and returned data.
201Created. A new resource was created.
204No content. The request succeeded but there’s nothing to return (common for deletes).
400Bad request. The request body or parameters are invalid.
401Unauthorized. Missing or invalid API key.
403Forbidden. The API key doesn’t have permission for this action.
404Not found. The resource doesn’t exist or you don’t have access to it.
422Unprocessable entity. The request was well-formed but failed validation.
429Too many requests. You’re being rate limited.
500Internal server error. Something went wrong on our end.

Handling errors

1

Check the status code

Use the HTTP status code to determine the category of error. 4xx means something is wrong with your request. 5xx means something went wrong on our side.
2

Read the message

The message field tells you what went wrong. The data.message field, when present, gives you specific guidance on how to fix it.
3

Save the error code

If the response includes data.code, save it. Support can use this to look up exactly what happened.
Don’t retry 4xx errors without changing the request. They will keep failing. Retry 5xx errors with exponential backoff.