Skip to main content
Every response from the Braintest API returns the same top-level envelope, regardless of endpoint or HTTP status code. This consistency makes it easier to parse responses in your integration code.

Envelope schema

All JSON responses share this structure:

Field reference

Success example

Failure example

Error handling notes

  • The API does not use a separate message or devMessage field. All error text lives in the messages array.
  • Multiple validation errors can appear in a single response. Check every entry in messages before showing feedback to the user.
  • HTTP status codes still matter: 401 and 403 indicate authentication issues, 404 indicates a missing resource, and 422 indicates validation errors. Always inspect successful alongside the status code.
Because data is null on error, your parser should check successful before attempting to read fields from data.