LoguDocs
Open Logu

Delivery · unsubscribeWebPush

Turn off browser notifications

DELETE /v1/web-push/subscriptions

Removes this browser's subscription (no error if there was none).

Who may call it
any signed-in human
Server
https://api.logu.dev

Request body#

Content type application/json (required).

The browser to unsubscribe. Strict.

FieldTypeRequiredNotes
endpointstringrequired0–2048 chars
{
  "endpoint": "https://fcm.googleapis.com/fcm/send/c1KrmpTuRm4:APA91bGq3nYdF8wN2xH5kL7mP9rT1vY3zB6"
}

Example#

curl -s -X DELETE "https://api.logu.dev/v1/web-push/subscriptions" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"https://fcm.googleapis.com/fcm/send/c1KrmpTuRm4:APA91bGq3nYdF8wN2xH5kL7mP9rT1vY3zB6"}'

Responses#

204

Removed.

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
400bad_requestThe request is malformed or a field is invalid (see issues).
400unknown_fieldThe body has a field the endpoint doesn't know (often a typo or snake_case).
401unauthorizedNo credentials, or the API key or session is invalid or revoked.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
500internal_errorSomething went wrong on Logu's side.