Our API responses use standard HTTP status codes: 2xx status codes indicate success, 4xx status codes indicate invalid input or invalid action on current state, and 5xx status codes indicate a rare error on Persona's servers. The response body contains a list of errors with title and details.
HTTP Status Code | Description |
---|---|
400 - Bad Request | The request was unacceptable, often due to invalid parameters. |
401 - Unauthorized | An invalid API key was provided. |
403 - Forbidden | The given API key doesn't have permissions to perform the request or a quota has been exceeded. |
404 - Not Found | The requested resource doesn't exist. |
409 - Conflict | The request conflicts with another request, often due to attempting to create a duplicate resource. |
422 - Unprocessable Entity | The request modifies the resource in an unacceptable way, often due to an invalid action or parameter. |
429 - Too Many Requests | Your organization's rate limit has been exceeded. We recommend an exponential backoff on requests. |
500, 502, 503, 504 - Server Errors | Something went wrong on Persona's end. These are rare. |
{
"errors": [
{
"title": "Parameter missing",
"details": "param is missing or the value is empty: country_code"
},
{
"title" => "Record invalid",
"details" => "Status can't be blank",
"source" => { 'pointer' => "/data/attributes/status" },
}
]
}