The envelope
Those four fields are the entire envelope. On list endpoints,
data itself carries a
pagination object alongside the rows — see Pagination.
statusCode is duplicated inside the body on purpose — some HTTP clients
drop the body on an error status, and this makes the code readable even then.Success
Created
No content
A204 still returns the envelope, with data as null:
Error
On failure,data carries the detail rather than the resource — often which field
failed validation:
Parsing it
You do not need to check
res.ok first — reading the body works on error
statuses too. Use body.statusCode for control flow.Pagination
List endpoints return apagination object inside data, next to the rows:
total counts the filtered set, not the page. Changing page or limit changes
totalPages but not total.
How the SDKs change this
The SDKs unwrap the envelope for you and return one consistent result object, so you never touch the envelope directly:SDKs
The full response model per language.
Status codes
Every code and its meaning.

