Full contract: API Style Guide · OpenAPI baseline
Error response shape
{
"success": false,
"timestamp": "2026-08-24T12:00:00.000Z",
"correlationId": "corr_test_01JEXAMPLE000000000000",
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"category": "validation",
"severity": "medium",
"suggestedResolution": "Correct the request fields and retry.",
"documentationUrl": "https://docs.example.amnenpay.test/errors/VALIDATION_ERROR"
}
}HTTP status codes
| Code | Meaning |
|---|---|
200 | OK — the request succeeded. |
201 | Created — a resource was created. |
400 | Bad Request — validation failed or parameters are invalid. |
401 | Unauthorized — missing or invalid API key / token. |
403 | Forbidden — the key lacks permission for this action. |
404 | Not Found — the resource does not exist. |
409 | Conflict — idempotency conflict or duplicate request. |
422 | Unprocessable — the request was well-formed but rejected by rules. |
429 | Too Many Requests — rate limit exceeded. |
500 | Server Error — something went wrong on our side. |
Stable error codes
| Code | Meaning |
|---|---|
VALIDATION_ERROR | One or more parameters are missing or malformed. |
AUTHENTICATION_ERROR | The API key or token is missing, invalid, or expired. |
AUTHORIZATION_ERROR | The key does not have the required permission. |
NOT_FOUND | The resource does not exist for this tenant. |
IDEMPOTENCY_CONFLICT | An identical idempotency key was already used with a different body. |
RATE_LIMIT_EXCEEDED | Too many requests in the current window. |
INTERNAL_ERROR | An unexpected error occurred. |