Accept-Patch
The HTTP Accept-Patch response header lists the media types the server accepts in a PATCH request body.
Usage
The Accept-Patch header signals two things: the resource supports the PATCH method, and the server accepts specific patch document formats. A server includes this header in responses to inform clients which media types are valid for partial updates.
A server sends Accept-Patch in response to any request method, not only PATCH. The OPTIONS response is the most common place to advertise the header, but regular GET and POST responses include the information when relevant.
When a client sends a PATCH request with an unsupported media type, the server responds with 415 Unsupported Media Type. The error response often includes Accept-Patch listing the formats the server does support.
Values
media-type
A comma-separated list of media types, optionally
including parameters. Each entry identifies a patch
document format the server understands. Common formats
include application/json-patch+json (JSON Patch),
application/merge-patch+json (JSON Merge Patch),
and application/xml-patch+xml.
Example
A server advertising support for JSON Merge Patch and JSON Patch formats. Clients sending PATCH requests against this resource provide the body in one of these formats.
Accept-Patch: application/merge-patch+json, application/json-patch+json
Multiple Accept-Patch lines in a single response, each listing a supported format with additional parameters.
Accept-Patch: application/merge-patch+json
Accept-Patch: text/example;charset=utf-8
An OPTIONS response showing PATCH as an allowed method alongside the accepted patch formats.
HTTP/1.1 200 OK
Allow: GET, PATCH, OPTIONS
Accept-Patch: application/merge-patch+json
Takeaway
The Accept-Patch response header advertises the media types a server accepts for PATCH requests, helping clients select the correct patch document format.