Error Handling
The Betflow B2B API uses standard HTTP status codes to indicate the success or failure of requests.
HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
200 | OK | Request succeeded |
400 | Bad Request | Invalid request parameters or body |
401 | Unauthorized | Missing, invalid, or expired authentication |
403 | Forbidden | Valid authentication but insufficient permissions or blocked by network policy |
404 | Not Found | Resource does not exist |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Error Response Format
Error responses return a JSON object with an error field:
{
"error": "description of what went wrong"
}
Some endpoints return the standard response envelope with a success flag:
{
"success": false,
"error": "description of what went wrong"
}
Common Error Scenarios
401 — Authentication Errors
{"error": "missing bearer token"}
{"error": "invalid authorization header"}
{"error": "invalid token"}
{"error": "invalid or missing API key"}
Resolution: Check your API key or access token. If using a JWT, it may have expired — refresh your token.
400 — Validation Errors
{"error": "invalid request body"}
Resolution: Check the API Reference for required parameters and valid values.
429 — Rate Limit Errors
{"error": "rate limit exceeded"}
Resolution: See Rate Limiting for backoff strategies.
403 — Forbidden
{"error": "forbidden"}
Resolution: Your client may not have permission to access this endpoint, or your IP/domain is not in the allowlist. Contact the Betflow team.