Back to top

Media Types

Generally speaking, the Packet API supports JSON (application/json) only.

curl -H 'Accept: application/json'

Some routes may support other media types where appropriate.

Requests that require data to be submitted to the API (POST, PUT and PATCH) may include the data in the request body (if the Content-Type header is set to application/json) or as form-encoded data.

curl -H "Content-Type: application/json" -d '{"param":"value"}' /devices
# or
curl -d 'param=value' /devices