Semestra

Notifications

GET
/me/notifications/config

The VAPID public key a browser subscribes with. Not for agents.

Authorization

cookiesemestra_session<token>

Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.

Response Body

Successful Response

application/json
  1. response
public_key*Public Key

VAPID public key for PushManager.subscribe

Example Request
curl -X GET 'https://example.com/me/notifications/config'
Example Response
{  "public_key": "string"}
POST
/me/notifications/devices

Saves this browser's push subscription for the current sign-in session (sent again on every visit to keep it current). Not for agents.

Authorization

cookiesemestra_session<token>

Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.

Request Body

application/json
  1. body
endpoint*Endpoint

Push service URL

Lengthlength <= 2048
p256dh*P256Dh

Browser's public key, base64url

Lengthlength <= 256
auth*Auth

Authentication secret, base64url

Lengthlength <= 64

Response Body

Successful Response

application/json
  1. response
ok?Ok
Defaulttrue
Example Request
curl -X POST 'https://example.com/me/notifications/devices' \  -H 'Content-Type: application/json' \  -d '{  "endpoint": "string",  "p256dh": "string",  "auth": "string"}'
Example Response
{  "ok": true}
POST
/me/notifications/devices/remove

Not for agents.

Authorization

cookiesemestra_session<token>

Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.

Request Body

application/json
  1. body
endpoint*Endpoint

Push service URL of the device

Lengthlength <= 2048

Response Body

Successful Response

application/json
  1. response
ok?Ok
Defaulttrue
Example Request
curl -X POST 'https://example.com/me/notifications/devices/remove' \  -H 'Content-Type: application/json' \  -d '{  "endpoint": "string"}'
Example Response
{  "ok": true}
POST
/me/notifications/test

Ignores quiet hours. Not for agents.

Authorization

cookiesemestra_session<token>

Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.

Response Body

Successful Response

application/json
  1. response
delivered*Delivered

How many devices accepted the test notification

Example Request
curl -X POST 'https://example.com/me/notifications/test'
Example Response
{  "delivered": 0}