Skip to content

/api/v1/me/push-subscriptions (POST)

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": "https://example.com", "keys": { "p256dh": "example", "auth": "example" }, "userAgent": "example" }'
Media type application/json
object
endpoint
required
string format: uri
keys
required
object
p256dh
required
string
>= 1 characters
auth
required
string
>= 1 characters
userAgent
string
<= 256 characters
Example generated
{
"endpoint": "https://example.com",
"keys": {
"p256dh": "example",
"auth": "example"
},
"userAgent": "example"
}

Registered

Media type application/json
object
id
required
string
deviceSubscribed
required
boolean
Example generated
{
"id": "example",
"deviceSubscribed": true
}

No session

Media type application/problem+json
object
type
required
string
title
required
string
status
required
number
code
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"code": "example"
}

Invalid

Media type application/problem+json
object
type
required
string
title
required
string
status
required
number
code
required
string
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"code": "example"
}