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
successbooleanrequiredTop-level flag indicating whether the request succeededstatusintegerrequiredHTTP status code mirrored in the response bodymessagestringrequiredHuman-readable status message for debuggingdataarray<object> | objectrequiredThe primary response payload — array for collections, object for single resourcesmeta.totalintegeroptionalTotal count of records matching the querylinksobjectoptionalHATEOAS-style navigation links for paginationrequestIdstringoptionalUnique identifier for distributed tracing and supporttimestampstring (ISO 8601)requiredServer 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
Paste the example above into JSONKit's tools to validate, minify, or explore the structure interactively.
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.API DesignUser ProfileStandard user profile JSON with personal info, address, and account metadata.