GuidesAPI ReferenceChangelog
Log In
Guides

HTTP Statuses

Along with the HTTP methods that the API responds to, it will also return standard HTTP statuses, including error codes.

Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided. Codes in the 5xx range indicate an error with SafetyWing's servers.

HTTP Status codeSummary
200 - OKEverything worked as expected.
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 - UnauthorizedNo valid API key provided.
403 - ForbiddenThe API key does not have permissions to perform the request.
404 - Not FoundThe requested resource does not exist.
405 - Not AllowedMethod not allowed.
429 - Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server ErrorsSomething went wrong on SafetyWing’s end.

Some 4xx errors contain additional attributes like code or a message that provides additional information about the problem.

Attribute nameDescription
codeShort string indicating problem. Such an error can be handled programmatically.
messageHuman readable explanation with more details about the problem.
paramIf the problem is related to the parameters provided, this attribute contains information about the parameter related to the error.

Error codes

Error codeDescription
no_valid_api_keyNo valid API key provided
api_not_configuredAPI integration is not enabled for the endpoint used. Please contact our support team to find out more.
api_integration_disabledAPI key is correct but integration is temporarily disabled. Please contact our support team to find out more.
internal_server_errorInternal server error. Such an error is rare and if the problem persists, please contact support.
param_validationThe request provided incorrect parameters
not_foundThe requested resource was not found
bad_requestThe request was unacceptable, often due to missing a required parameter. More information should be provided in the response message.