unsupported_media_type
A POST, PUT or PATCH sent a body without Content-Type: application/json.
HTTP 415 · invalid_request_error · not retryable
What happened
Section titled “What happened”A POST, PUT or PATCH sent a body without Content-Type: application/json.
The only parameter accepted is charset=utf-8.
What to do
Section titled “What to do”Send Content-Type: application/json, or application/json; charset=utf-8.
Example
Section titled “Example”{ "error": { "type": "invalid_request_error", "code": "unsupported_media_type", "message": "Send the body as JSON, with Content-Type: application/json.", "param": null, "request_id": "req_01j9zr3m5k8q2w7x4t6v0b1c9d", "doc_url": "https://docs.deedglass.com/errors/unsupported_media_type" }}The message is for a person and can get more exact over time: branch on type and code, never on the message.
In the SDKs
Section titled “In the SDKs”| SDK | Raised as |
|---|---|
TypeScript (@deedglass/sdk) |
InvalidRequestError with code === "unsupported_media_type" |
Python (deedglass) |
deedglass.InvalidRequestError with .code == "unsupported_media_type" |