/api/v1/me/push-subscriptions
POST
/api/v1/me/push-subscriptions
const url = 'https://example.com/api/v1/me/push-subscriptions';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"endpoint":"example","keys":{"p256dh":"example","auth":"example"},"label":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
endpoint
required
string
keys
required
object
p256dh
required
string
auth
required
string
label
string
Examplegenerated
{ "endpoint": "example", "keys": { "p256dh": "example", "auth": "example" }, "label": "example"}Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
id
required
string format: uuid
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}