Registers this browser's push subscription to the viewer. An endpoint registered by someone else moves to the viewer: one browser has one recipient.
Input
Encoding
application/jsonendpoint
stringuri
Required
An https URL on a public host.
maxLength: 1024 byteskeys
object
Required
No description available.
label
string
Optional
No description available.
maxLength: 64 bytesOutput
Encoding
application/jsonErrors
InvalidRequest
NotSpaceMember
PushDisabled
This AppView has no VAPID key. Try It
Requests are sent directly from your browser. Some servers may block requests due to CORS.
View raw schema
{
"description": "Registers this browser's push subscription to the viewer. An endpoint registered by someone else moves to the viewer: one browser has one recipient.",
"errors": [
{
"name": "InvalidRequest"
},
{
"name": "NotSpaceMember"
},
{
"description": "This AppView has no VAPID key.",
"name": "PushDisabled"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"endpoint": {
"description": "An https URL on a public host.",
"format": "uri",
"maxLength": 1024,
"type": "string"
},
"keys": {
"properties": {
"auth": {
"description": "The 16-byte authentication secret, base64url.",
"type": "string"
},
"p256dh": {
"description": "The browser's P-256 public key, uncompressed (65 bytes), base64url.",
"type": "string"
}
},
"required": [
"p256dh",
"auth"
],
"type": "object"
},
"label": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"endpoint",
"keys"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {},
"type": "object"
}
},
"type": "procedure"
}