Understanding the API response envelope

Every response has {successful, message, data} — and failures don't always mean a non-200 status.

Updated August 31, 2026 · 1 min read

Every PTERI API response, success or failure, is wrapped the same way:

{
  "successful": true,
  "message": "...",
  "data": { ... }
}

The important part for error handling: a failed request can still return HTTP 200 with successful: false and an explanatory message. If your code only checks the HTTP status code, you can miss real failures. Always check successful first, and surface message in your own error handling.

Still stuck?

Ask Kai about this article, or open a ticket with our team.

Submit a ticket