Errors & status codes
The API uses standard HTTP status codes and returns a consistent JSON error envelope on failure.
Error envelope
{
"errors": [
{
"code": "invalid_field",
"message": "`adaptorType` is required when `type` is `http`",
"field": "adaptorType"
}
]
}errorsis always an array, even when there's only one error.codeis a stable machine-readable identifier. Switch on it.messageis for humans. It may change between releases; don't pattern-match it.field(optional) points at the path that caused the failure, useful for form UIs.
A single request can return multiple errors in the array — for example, a validation failure across three fields comes back as three entries, not three round-trips.
Status codes
200 OK
Successful GET, PUT, PATCH, or DELETE.
—
201 Created
Successful POST that created a resource.
Use _id from response body.
204 No Content
Successful DELETE with no body.
—
400 Bad Request
Malformed JSON, missing required header.
Fix the request. Check Content-Type: application/json.
403 Forbidden
Token is valid but does not carry the capability for this endpoint or resource.
Issue a new token with broader scopes, or switch to an account owner's token.
404 Not Found
Resource doesn't exist, or you don't have access and the API is hiding it.
Double-check the _id. 404 Not Found vs 403 Forbidden is intentional — the API returns 404 Not Found to avoid leaking existence.
409 Conflict
Write conflict (concurrent update, unique constraint).
GET the current state, re-apply your changes, retry.
415 Unsupported Media Type
Wrong content type on a write.
Set Content-Type: application/json.
422 Unprocessable Entity
Body is well-formed JSON but fails schema/business validation.
Read errors[].field and errors[].message; fix and retry.
500 Internal Server Error
Unexpected server error.
Retry with exponential back-off. Report if persistent.
502 Bad Gateway / 504 Gateway Timeout
Upstream gateway error.
Transient. Retry 2-3 times with back-off.
503 Service Unavailable
Service unavailable (maintenance or overload).
Retry with back-off. Check Celigo status page.
Retrying safely
429
Yes
Honor Retry-After then retry.
500/502/503/504
Yes, with care
Exponential back-off, max 5 attempts.
409
Yes, after GET-modify-PUT round-trip
Refresh, reapply, retry.
4xx other
No. The request itself is wrong.
Fix and resend once.
For POST, remember that the request is not idempotent. If you retry after a timeout you may create a duplicate. Gate retries on a GET if duplication would be a problem.
Common error codes
errors[].code
Typical cause
invalid_token
Expired or revoked; rotate.
insufficient_permissions
Custom-scoped token missing the capability for this endpoint.
invalid_field
A field is missing, has the wrong type, or an invalid value.
duplicate_name
A resource with the same name within the same parent already exists.
resource_in_use
Trying to delete something another resource depends on (e.g., a connection referenced by a live flow).
rate_limited
Hit the per-account bucket. See Rate limits.
Codes marked invalid_field always come with field, which is the JSON pointer into your request body (e.g., http.auth.basic.password). Use it to attach the error to the right form field in a UI.
Debugging a failing call
Check the status code, not the body.
200 OKwith an error-looking body is never a real failure;4xxwith a happy-looking body is still a failure.Dump
errors[].field— that almost always points at the fix.Re-send with
-v(curl) or your client's verbose mode; confirm the headers you think you're sending are what actually hit the wire.Hit
/v1/tokenInfowith the same token — if that returns401 Unauthorized, your token is the problem and the rest of the error is noise.Reproduce with the CLI.
celigo <cmd> --verboseprints the exact HTTP request being sent. If the CLI succeeds on the same input, compare its request to yours.
Example: handling a 422
Output:
Last updated
Was this helpful?