The Safefy API uses conventional HTTP response codes to indicate the success or failure of requests.Documentation Index
Fetch the complete documentation index at: https://docs.safefypay.com.br/llms.txt
Use this file to discover all available pages before exploring further.
Response format
Success:HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Resource created |
400 | Validation error or business rule violation |
401 | Not authenticated missing or invalid token |
403 | Unauthorized valid token but insufficient permissions |
404 | Resource not found |
409 | Conflict duplicate externalId |
429 | Rate limit exceeded |
500 | Internal server error |
Error codes
| Code | HTTP | Description |
|---|---|---|
VALIDATION_ERROR | 400 | One or more request fields are invalid |
AUTHENTICATION_REQUIRED | 401 | No authentication token provided |
INVALID_TOKEN | 401 | Token is invalid or expired |
FORBIDDEN | 403 | Insufficient permissions for this action |
NOT_FOUND | 404 | Requested resource does not exist |
DUPLICATE_EXTERNAL_ID | 409 | The externalId is already in use |
INSUFFICIENT_BALANCE | 400 | Not enough balance available for the cashout |
RATE_LIMIT_EXCEEDED | 429 | Too many requests slow down and retry |
INTERNAL_ERROR | 500 | Unexpected server error |
Handling errors
Rate limiting
When you exceed the allowed request rate, the API returns429 Too Many Requests with a Retry-After header indicating how many seconds to wait before retrying.