Skip to content

API Responses

Responses

The Surfe API utilizes standard HTTP status codes on its responses to reflect the result of API requests, whether they are successful or encounter errors.

All responses are sent as JSON objects.

Successful responses

A successful request is accompanied by a 20X status code that confirms the operation was completed as expected.

CodeStatusDescription
200OKThe request succeeded and a result is returned
202AcceptedThe request was received successfully and an asynchronous process has started to handle the request. The response includes the information to fetch the results from this process

Error responses

In case of errors, the API responds with 4XX or 5XX status codes:

CodeStatusDescription
400Bad RequestThe request is invalid or malformed
401UnauthorizedThe API Key is missing or invalid
403ForbiddenThe API Key is valid, but the user does not have a license
404Not FoundThe requested record cannot be found
429Too Many RequestsThe rate limit has been exceeded
500Internal Server ErrorThere was an unrecoverable error on the server

All error responses include the a JSON body with the following format:

{
"code": 400, // The same as the HTTP Status code
"message": "Invalid request", // A message with an explanation of what went wrong
}