ReDesk AI › Errors
Errors Failures use conventional HTTP status codes and always return the same error object, so one handler covers every endpoint.
The error object
422 Unprocessable Entity Copy {
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "customer is required.",
"param": "customer",
"request_id": "req_6Hq0Lm"
}
} Status codes Status Meaning What to do
400Malformed request — bad JSON or a wrong type. Fix the request; retrying won't help.
401Missing, revoked or wrong-environment key. Check the key and its prefix.
403The key or token lacks the scope for this action. Request a token with the needed scope.
404No such object, or it belongs to another organisation. Check the id.
409Conflicts with the object's current state. Re-fetch the object and decide again.
422Well-formed but invalid, e.g. a required field is missing. Read param and message.
5xxSomething failed on our side. Retry with the same idempotency key.
Idempotent retries Send an Idempotency-Key header on every POST. Retrying with the same key within 24 hours returns the original response instead of creating a duplicate.
curl -X POST https://api.redesk.ai/v1/projects \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: 5c0f1e1a-8a7b-4f6e-9a51-2a3f7a1d9c44" \
-d '{ ... }'