Skip to content
Select language:English

/api/v1/me/push-subscriptions

POST
/api/v1/me/push-subscriptions
curl --request POST \
--url https://example.com/api/v1/me/push-subscriptions \
--header 'Content-Type: application/json' \
--data '{ "endpoint": "example", "keys": { "p256dh": "example", "auth": "example" }, "label": "example" }'
Media typeapplication/json
object
endpoint
required
string
<= 1000 characters /^https:\/\//
keys
required
object
p256dh
required
string
>= 1 characters <= 200 characters
auth
required
string
>= 1 characters <= 100 characters
label
string
<= 60 characters
Examplegenerated
{
"endpoint": "example",
"keys": {
"p256dh": "example",
"auth": "example"
},
"label": "example"
}

Default Response

Media typeapplication/json
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}