Error format
Error codes
| Code | HTTP status | Description |
|---|---|---|
validation_error | 400 | Invalid request data |
invalid_api_key | 401 | Missing or invalid API key |
insufficient_credits | 402 | The workspace does not have enough credits to cover this request. Returned by POST /sourcing/advanced/profiles/search when the sourcing credit balance is empty. |
insufficient_scope | 403 | API key lacks the required scope |
billing_required | 403 | No active subscription on the workspace |
plan_upgrade_required | 403 | The current plan does not include this feature |
not_found | 404 | Resource not found |
rate_limit_exceeded | 429 | Too many requests |
internal_error | 500 | Server error |
insufficient_credits payload
When credits are missing, the response includes an error.details object describing the credit type and the gap:
Handling errors
- TypeScript
- Python