API reference · Account
Keep this browser's push subscription
POST/api/account/pushSigned in session
The body is PushSubscription.toJSON(). Only the browsers' own push services are accepted. At most 10 devices; the oldest make room. Same origin only, ten changes a minute. 503 push_unavailable while push is off.
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| endpointrequired | string | |
| expirationTime | number or null | |
| keysrequired | object | |
| keys. | string | |
| keys. | string |
Example
{
"endpoint": "string",
"expirationTime": 0,
"keys": {
"p256dh": "string",
"auth": "string"
}
}Answer 200
Kept; the account's devices.
| Field | Type | What it is |
|---|---|---|
| devices | array of object | |
| devices[] | string | A digest of the endpoint; never the endpoint itself. |
| devices[] | string or null | Browser and system, from the user agent. |
| devices[] | string | The push service's host. |
| devices[] | integer | |
| devices[] | integer or null |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 403OpenAI shaped error.
- 429OpenAI shaped error.
- 503OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.