Skip to main content

API Foundations

Centralised reference for cross‑cutting details that apply to every Voilo REST endpoint.

Base URLs

EnvironmentRoot URLKey scope
Productionhttps://api.voilo.ioaccepts live keys only
Sandboxhttps://api.sandbox.voilo.comaccepts sandbox keys only

Authentication & Common Headers

Voilo uses API keys passed via the Authorization header. API keys are generated and managed in the Platform Console (Settings → API Keys).

Secret keys are environment‑scoped: test keys start with sk_test_ and live keys start with sk_live_.

Authorization: Bearer <api_key>
Content-Type: application/json

Sandbox keys are rejected on the production host (and vice‑versa) with 401 invalid_auth.

Pagination

Endpoints that return collections use cursor‑based pagination.

Query parameters:

NameTypeDescription
cursorstring, optionalID from the previous response's next_cursor.
limitinteger, optionalMax items per page (default = 20, max = 100).

Example response snippet:

{
"data": [ /* items */ ],
"next_cursor": "MjAyNS0wNi0xMFQxNDo1MDozMFo",
"has_more": true
}

Error Envelope & Common Codes

Every non‑2xx response uses the same wrapper:

{
"error": {
"code": "invalid_auth",
"message": "API key expired"
}
}

Common Codes:

HTTPerror.codeTypical trigger
400bad_requestMalformed JSON, missing field
401invalid_authMissing/invalid key
403forbiddenKey lacks permission
404not_foundResource or path absent
422validation_errorField violates business rule
500internal_errorUnexpected server error

What's Next

These topics will be documented here soon - shout if you need them sooner!

  • Versioning
  • Rate Limiting & Retry‑After headers
  • Idempotency keys
  • Webhooks & event types
  • Changelog format & release cadence
  • SDK language support matrix