code, a human-readable message, and a request_id you can use to get help. Build your error-handling logic around these fields and your integration will be far more resilient.
Error Response Format
All error responses follow the same structure, regardless of the HTTP status code:| Field | Type | Description |
|---|---|---|
code | string | A stable, machine-readable identifier for the error type |
message | string | A human-readable description of what went wrong |
request_id | string | A unique ID for this request — include it when contacting support |
422), the response also includes a details array that pinpoints which fields failed and why:
Common Error Codes
invalid_api_key — 401 Unauthorized
invalid_api_key — 401 Unauthorized
insufficient_permissions — 403 Forbidden
insufficient_permissions — 403 Forbidden
Your API key is valid, but it does not have the required permissions to access this resource or perform this action. API keys can be scoped to specific resources or operations.How to fix it: Check the key’s permission scopes in the Vook dashboard. If you need broader access, create a new key with the required scopes or contact your account administrator.
not_found — 404 Not Found
not_found — 404 Not Found
The resource you requested does not exist. This can happen when:
- The ID in the URL path is incorrect or belongs to a different account
- The resource was deleted before you made the request
404 gracefully and treat it as a terminal state rather than retrying.validation_error — 422 Unprocessable Entity
validation_error — 422 Unprocessable Entity
The request body was valid JSON, but one or more fields failed validation. Check the
details array in the error response — it lists each offending field along with a description of the problem.How to fix it: Read through the details entries and correct the fields in your request body. Common causes include missing required fields, incorrect data types, or values that fall outside allowed ranges.rate_limit_exceeded — 429 Too Many Requests
rate_limit_exceeded — 429 Too Many Requests
You have sent too many requests in a short period. Every
429 response includes a Retry-After header (in seconds) indicating how long to wait before your next request is accepted.How to fix it: Pause your requests for the duration specified in Retry-After, then resume. Implement exponential backoff in your retry logic to avoid hitting the limit again immediately. If you consistently hit rate limits, consider requesting a higher limit for your account.internal_error — 500 Internal Server Error
internal_error — 500 Internal Server Error
An unexpected error occurred on Vook’s side. This is not caused by anything in your request. It is typically transient and resolves on its own within seconds.How to fix it: Wait briefly and retry the request with exponential backoff. If the error persists for more than a few minutes, check the Vook status page. When contacting support, include the
request_id from the error response.Handling Errors
Structure your API calls to branch on the HTTP status code first, then inspecterror.code for specific handling. The examples below show a robust pattern for creating a resource: