Standard envelope
All API responses from the Zeam gateway — both success and error — are wrapped in a standard envelope:| Field | Type | Description |
|---|---|---|
data | object, array, scalar, or null | The response payload. null for errors. |
status | integer | The HTTP status code — always matches the status on the wire. |
message | string | A human-readable summary of the result. |
Success responses
For successful requests,data contains the response payload and status reflects the HTTP status code:
Error responses
For errors,data is null and message includes a machine-readable error code prefix:
missing_field) is stable and safe to match programmatically. The description after the colon may change between releases.
See Errors for the full error classification table and retry guidance.
Data unwrapping
Some API responses already include adata wrapper. The gateway automatically unwraps these to prevent double nesting.
- Original response
- Gateway response
data.data — the gateway ensures this never happens.
When the original response does not contain a data field, the entire response body is placed inside data:
- Original response
- Gateway response
Exceptions
/auth-connect* routes (Ed25519 authentication) return bare JSON without the standard envelope. This matches the Stellar Ed25519 protocol specification. See Ed25519 app auth for details.
HTTP status codes
Thestatus field in the envelope always mirrors the HTTP status code on the wire. Your HTTP client can rely on either — they are guaranteed to match.
| Code | Meaning |
|---|---|
200 | Synchronous read or mutation returning final state |
201 | Resource created |
202 | Asynchronous mutation accepted — poll for result |
204 | Successful delete — no response body |
4xx | Client error — see Errors |
5xx | Server error — retry with backoff |

