---
title: "Enable message push for a browser subscription"
method: PUT
path: "/api/me/browser-push"
---

# Enable message push for a browser subscription

`PUT /api/me/browser-push`

## Request

- Base URL: `https://www.toma.com`
- URL: `https://www.toma.com/api/me/browser-push`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

## Request body

- object
  - `endpoint` string, uri, required
  - `keys` object, required
    - `p256dh` string, required
    - `auth` string, required

## Response `200`

Saved subscription.

- object
  - `enabled` boolean

## Other responses

- `400`: Invalid subscription.
- `401`: Sign in first.
- `409`: Subscription unavailable.
- `413`: The request body exceeds 2097152 bytes.
- `503`: Push is not configured.

---

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