Skip to content
RelayDocumentation

API ReferenceOverview

Errors

HTTP status codes and the error object returned by the API.

Relay uses HTTP status codes to tell you whether a request worked. 2xx means success, 4xx means something was wrong with the request and 5xx means something went wrong on our side.

Error object

{
  "error": {
    "type": "invalid_request",
    "code": "parameter_invalid",
    "message": "url must use https in live mode",
    "param": "url",
    "doc_url": "https://kairo-docs-demo.jeffev123.workers.dev/docs/api/errors/#parameter_invalid"
  }
}
typestring
One of invalid_request, authentication, permission, not_found, rate_limit or api_error.
codestring
A specific, stable code you can match in your code.
messagestring
A human-readable description. It may change; don't match on it.
paramstring
The parameter that caused the error, when there is one.

Status codes

StatusMeaning
200OK
201Created
400Bad request: a parameter is missing or invalid
401Unauthorized: no valid API key
403Forbidden: the key doesn't have the required permission
404Not found
409Conflict: the idempotency key was used with different parameters
429Too many requests: see Rate limits
5xxSomething went wrong on our side. Retry with backoff

Error codes

CodeWhat to do
parameter_missingAdd the parameter named in param
parameter_invalidFix the value of param
payload_too_largeKeep data under 256 KB
endpoint_disabledEnable the endpoint before sending test events to it
idempotency_conflictUse a new key or send the same body as the first request