application/vnd.api+json
Application

Overview

application/vnd.api+json is the media type for responses that follow the JSON:API specification. It standardizes resource representation, relationships, pagination, and error format, giving structure to otherwise idiosyncratic JSON API designs.

Details

JSON:API defines reserved top-level members such as data, errors, meta, and included, and represents each resource with type, id, attributes, relationships, and links. `vnd.` denotes a vendor-tree registration and the `+json` suffix indicates it is built on JSON. Relationship links and included let related resources ride along in one response, reducing N+1 requests.

The spec is strict about media type negotiation: clients must send `Accept: application/vnd.api+json` and the same Content-Type on request bodies, and servers are required to respond 415 (Unsupported Media Type) or 406 (Not Acceptable) if the media type carries parameters. Sparse fieldsets (`fields[type]=...`) and include queries give fine-grained control over the response.

Syntax

e.g. Content-Type: application/vnd.api+json

Notes

Related types

Related headers