API keys are rolling out. The reference is live and every endpoint works today in Sawa's own apps; keys for your integrations are issued on request. Request access →
Get started

Errors

New to the Sawa API? Make your first call in five minutes.

HTTP status codes

Code Meaning
200 Success — check the body, see below
400 Validation failure, or a request the handler could not process
401 Missing, wrong or expired token; or a suspended account
403 Authenticated but not permitted for this resource
404 Unknown route, or an object you cannot see
422 Laravel validation failure
429 Rate limited. With an API key, see §15
402 API keys only. The account is locked for non payment, or its balance has passed the agreed credit limit. Distinct codes, see §15
500 / 504 Server error / timeout — usually too wide a date range

A note on 402 for client authors: it is deliberately not 401. A 401 makes most HTTP clients discard the session and re-authenticate, which is the wrong response to an unpaid bill. Treat 402 as "stop, tell a human, retry later with the same credential".

status in the body

A 200 does not mean success. Most v1 endpoints return status: 0 with an error body and an HTTP 200. Always check both.

{ "status": 1, "items": [ … ] }
{ "statusCode": 400, "status": 0,
  "message": "The device ids field is required.",
  "errors": { "device_ids": ["The device ids field is required."] } }
{ "statusCode": 404, "status": 0,
  "message": "The endpoint you are looking for could not be found.",
  "errors": { "id": "The endpoint you are looking for could not be found." } }

"Whoops, looks like something went wrong."

A generic handler that masks the real cause. In practice it means a malformed parameter that failed past validation. Check first:

  • a datetime where a YYYY-MM-DD date was required (§3.2)
  • device_ids sent as a scalar rather than an array
  • a date range wider than the endpoint can serve
Last verified 7 Oct 2026 against production Source 497b4da Built 23 Nov 2026, 14:06 Spotted a mistake? Tell us