Responses (Webhooks API)

All requests to Webhooks API endpoints return standard HTTP headers, including the response status code, and a response body in JSON format.

Success response code and parameters

Successful requests return a 200 Success code with a JSON object in the response body.

Response codes and errors

HTTP headers include:

HTTP/1.1 CODE MESSAGE
Cache-Control: max-age=5, must-revalidate, private

The response body contains either the requested information or an error message:

{
    "message":"MESSAGE"
}

Errors are returned using standard HTTP error code syntax, such as 400 Bad Request. Additional information is included in the body of the return call in JSON format, usually in the following format:

{
  "message": "Appropriate 400 error message"
}

Error code 400 Bad Request

The Webhooks API returns 400 Bad Request in response to an invalid request.

Error code 401 Unauthorized

The Webhooks API returns 401 Unauthorized in response to an invalid, expired or missing bearer access token.

Missing token

If you do not provide your bearer access token, you will receive the following message in addition to the 401 error code:

{
  "error_description": "The access token is missing",
  "error": "invalid_request"
}

Invalid token

If you provide an invalid or expired bearer access token, you will receive the following message in addition to the 401 error code:

{
  "error_description": "The access token is invalid or has expired",
  "error": "invalid_token"
}

Missing scope

If your client credentials contain the required scope, but your bearer access token does not, you will receive the following message in addition to the 401 error code:

{
    "message": "Unauthorized"
}

Error code 403 Forbidden

The Webhooks API returns 403 Forbidden in response to a request that is not authorized.

Insufficient scope

If you can authenticate with the API but do not have access to the specific resource you request, you will receive the following message in addition to the 403 error code:

{
  "message": "Insufficient scope"
}

Error code 404 Not Found

The Webhooks API returns 404 Not Found in response to a request for an item that was not found. You may have requested an interaction that doesn’t exist.

If you request an item that is not found, you will receive the following message in addition to the 404 error code:

{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
    "title": "Not Found",
    "status": 404,
    "traceId": "00-7b7d3f8788542ee133bffc9427273113-efdfdeb39e0c3e6b-00"
}

Error code 405 Method Not Allowed

The Webhooks API returns 405 Method Not Allowed in response to a call to a method that is not allowed. For example a POST method.

If you send a request using a method that is not allowed, you will receive the following message in addition to the 405 error code:

{
  "message": "Method Not Allowed"
}

Error code 500 Internal Server Error

An internal server error occurred.