Overview
The Mansa API is organized around REST. It uses predictable, resource-oriented URLs under a versioned base path, accepts JSON request bodies (file uploads usemultipart/form-data
), returns JSON responses, and relies on standard HTTP verbs and status codes.
- Base path:
/api/v1
- Content types:
application/json
(default),multipart/form-data
for proofs - Authentication:
X-API-Key
+Authorization: Bearer <JWT>
- Errors: JSON error envelope with stable fields (
type
,code
,message
, …)
Environments
Use separate hosts for live and non-live traffic:- Production:
https://api.mansa.io
(live) - Staging:
https://staging-api.mansa.io
(non-live) - Development:
https://dev-api.mansa.io
(non-live)
Conventions
- Versioning: Path-based majors (for breaking changes) and SemVer in the spec for minor/patch updates. See Versioning.
- Idempotency: Send a client-generated
client_request_id
on writes to safely retry the same operation. See Request IDs. - Pagination: Page-based via
limit
andpage
, withdata.meta
reportinglimit
,page
, andtotal
. See Pagination. - No bulk updates: Each request operates on a single object or action.