Skip to content

Subscribe this browser to push notifications

The OpenAPI spec (JSON)Licence, versions and sign-in

POST
/api/v1/push/devices
curl --request POST \
--url https://deck.example.com/api/v1/push/devices \
--header 'Content-Type: application/json' \
--cookie qd_auth=<qd_auth> \
--data '{ "auth": "example", "device": null, "endpoint": "example", "p256dh": "example" }'

A browser’s push subscription (PushSubscription.toJSON(), flattened), with a name for the device.

Media typeapplication/json

A browser’s push subscription (PushSubscription.toJSON(), flattened), with a name for the device.

object
auth
required
string
>= 1 characters <= 100 characters
device
string | null
endpoint
required
string
>= 1 characters <= 2000 characters /^https:///
p256dh
required
string
>= 1 characters <= 200 characters
Media typeapplication/json
Array<object>

One device that takes pushes.

object
created_at
required
string
device
string | null
endpoint
required
string
last_ok_at

When a push last reached it.

string | null

Example generated

[
{
"created_at": "example",
"device": "example",
"endpoint": "example",
"last_ok_at": "example"
}
]

An error, with its message.

Media typeapplication/json

Every error the REST API returns, with an HTTP status.

object
error
required
string

Example generated

{
"error": "example"
}