API Design
REST API Response JSON Example
A standardized JSON example for a REST API response envelope — includes data, status, meta, and pagination fields. Copy-ready template for consistent API response design.
Field Reference
successrequiredbooleanTop-level flag indicating whether the request succeededstatusrequiredintegerHTTP status code mirrored in the response bodymessagerequiredstringHuman-readable status message for debuggingdatarequiredarray<object> | objectThe primary response payload — array for collections, object for single resourcesmeta.totaloptionalintegerTotal count of records matching the querylinksoptionalobjectHATEOAS-style navigation links for paginationrequestIdoptionalstringUnique identifier for distributed tracing and supporttimestamprequiredstring (ISO 8601)Server time when the response was generatedVariants
MinimalSimple single-resource success response without pagination or links.
ExtendedFull envelope with nested error details, deprecation warnings, and rate-limit headers.
Common Use Cases
- →Establishing a consistent response envelope across all endpoints in an API
- →Onboarding frontend teams with a clear, predictable JSON contract
- →Generating API documentation and mock server responses
RESTAPIresponseenvelopepagination
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
Related JSON Examples
API DesignError ResponseREST API error JSON with status code, machine-readable error code, and validation details.API DesignPagination ResponsePaginated list response JSON with offset, cursor, total, and navigation links.AI & LLMOpenAI Chat Completion ResponseOpenAI Chat Completions API response with choices, message, finish_reason, and usage.