Authentication

All requests to the Stables API must be authenticated using an API key.
Provide your API key using either of the following methods (both are accepted; you only need one):

X-Api-Key: YOUR_API_KEY

or

Authorization: Bearer YOUR_API_KEY

Authentication Requirements

RequirementDescription
HTTPS onlyAll requests must be sent over TLS/SSL
API KeyRequired for all endpoints. Send via X-Api-Key or Authorization: Bearer. If both are sent, X-Api-Key is used

Example Request

curl -X GET "https://api.sandbox.stables.money/api/v1/customers/{customerId}" \
  -H "Authorization: Bearer sti_test_abc123_yoursecretkey" \
  -H "Content-Type: application/json"

If authentication fails, the API returns:

{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Invalid API key"
}

A key that is not in the sti_... format returns Invalid API key format, and a request with no credentials returns Invalid or missing authorization credentials.

On this page