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
| Status | Meaning |
|---|---|
200 | OK |
201 | Created |
400 | Bad request: a parameter is missing or invalid |
401 | Unauthorized: no valid API key |
403 | Forbidden: the key doesn't have the required permission |
404 | Not found |
409 | Conflict: the idempotency key was used with different parameters |
429 | Too many requests: see Rate limits |
5xx | Something went wrong on our side. Retry with backoff |
Error codes
| Code | What to do |
|---|---|
parameter_missing | Add the parameter named in param |
parameter_invalid | Fix the value of param |
payload_too_large | Keep data under 256 KB |
endpoint_disabled | Enable the endpoint before sending test events to it |
idempotency_conflict | Use a new key or send the same body as the first request |