API Reference
Errors
Status codes and error response shapes.
Status codes
| Status | Meaning |
|---|---|
400 | Validation error — invalid input, or a path that requires KYC. |
401 | Missing or invalid Authorization header. |
402 | Insufficient account balance. |
403 | Destination domain not enabled for your organization. |
429 | Rate limit exceeded. |
502 | Destination or upstream fetch provider returned an error. |
500 | Internal server error. |
Error response shape
Most errors return an ErrorResponse object:
{
"error": "Validation error",
"message": "URL protocol must be http or https",
"statusCode": 404,
"traceId": "…",
"issues": [{ "field": "url", "message": "URL protocol must be http or https" }]
}| Field | Description |
|---|---|
error | Error type identifier. |
message | Human-readable error message. |
statusCode | Original status code for upstream errors. |
traceId | Optional trace identifier. |
issues | Per-field validation issues (field, message). |
Common cases
400 — validation
{
"error": "Validation error",
"message": "GET requests cannot have a body",
"issues": [{ "field": "body", "message": "GET requests cannot have a body" }]
}401 — authentication
{ "error": "Missing or invalid Authorization header" }402 — insufficient balance
{ "error": "Insufficient balance" }403 — destination not enabled
{ "reason": "Requests to example.com are not allowed. Contact support@usestring.ai for access." }See Access control & KYC for the 400 vs 403 distinction.