---
title: "Register a web push subscription"
method: POST
path: "/api/push/subscribe"
---

# Register a web push subscription

`POST /api/push/subscribe`

## Request

- Base URL: `https://techsnif.com`
- URL: `https://techsnif.com/api/push/subscribe`
- Auth: none declared

Stores a browser Web Push subscription for big-story notifications. TechSnif only notifies for tier 3 (top) stories, at most one story per pipeline run, at most one push every 3 hours, and at most 3 pushes per UTC day. Send the object produced by PushSubscription.toJSON(); the endpoint must be an https URL. Re-subscribing with the same endpoint refreshes the stored keys.

## Request body

- object
  - `subscription` object, required
    - `endpoint` string, uri, required: https push service endpoint
    - `keys` object, required
      - `p256dh` string, required
      - `auth` string, required

## Response `201`

Subscription stored

- object
  - `ok` boolean

## Other responses

- `400`: Invalid subscription payload

---

[API](https://skmtc.dev/techsnif/apis/techsnif-api.md) · [All operations](https://skmtc.dev/techsnif/apis/techsnif-api/llms.txt) · [OpenAPI document](https://skmtc.dev/techsnif/apis/techsnif-api/revisions/7404c46acbb0?raw)
