Sail

Errors

This section explains the HTTP response codes and error format you may encounter when using the Sail API.

Sail uses standard HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate a successful request, 4xx codes indicate an error with the request or the information provided, and 5xx codes indicate an error on Sail’s side.

All errors use the same response envelope, so you only need to handle a single error format.

{ "error":
 { "code": "invalid_request", 
   "message": "...", 
   "param": "..." 
  } 
}

HTTP status codes

See what codes are returned by Sail’s Rest API.

StatusCodeDescription
400invalid_requestThe request body or parameters are malformed or missing.
invalid_key_configurationThe key’s scope combination is not valid (for example, token_admin combined with another scope).
401unauthorizedThe API key is missing or invalid.
user_token_requiredThis endpoint needs an ephemeral user token in the x-sail-user-token header.
user_token_expiredThe ephemeral user token has expired. Mint a new one.
invalid_user_tokenThe ephemeral user token is malformed or revoked.
403insufficient_key_scopeYour API key doesn’t have the scope this endpoint needs.
insufficient_token_scopeYour ephemeral user token doesn’t have the scope this endpoint needs, even though your key does.
product_not_enabledYour key and token are fine, but the connection doesn’t have this capability turned on.
token_scope_mismatchThe token’s scope doesn’t match what this endpoint needs.
404not_foundThe requested resource doesn’t exist.
409conflictThe request conflicts with the current state of the resource.
connection_not_externalYou tried to push transactions to a connection that isn’t external.
connection_not_reconnectableYou tried to reconnect an external connection, which has no credentials to refresh.
429rate_limitedToo many requests. Back off and retry.
5xxserver_errorSomething went wrong on Sail’s side.