---
title: "Rotate a push notification subscription"
method: POST
path: "/users/@me/push/rotate"
tags: ["Users"]
---

# Rotate a push notification subscription

`POST /users/@me/push/rotate`

Replaces an existing push subscription whose endpoint has been rotated by the browser (pushsubscriptionchange). Deletes the row keyed by the old endpoint and inserts a new one for the new endpoint.

## Request body

- PushRotateRequest
  - `old_endpoint` string, required — The previous push subscription endpoint URL being rotated out
  - `endpoint` string, required — The new push subscription endpoint URL
  - `keys` object, required — Encryption keys for the new push subscription
    - `p256dh` string, required — The P-256 ECDH public key (base64url)
    - `auth` string, required — The authentication secret (base64url)
  - `user_agent` string — The user agent string identifying the client

## Response `200`

Success

- PushSubscribeResponse
  - `subscription_id` string, required — The unique identifier for the push subscription

## Other responses

- `400` — Bad Request - The request was malformed or contained invalid data
- `401` — Unauthorized - Authentication is required or the token is invalid
- `403` — Forbidden - You do not have permission to perform this action
- `429` — Too Many Requests - You are being rate limited
- `500` — Internal Server Error - An unexpected error occurred

---

[API](https://skmtc.dev/fluxer/apis/fluxer-api.md) · [All operations](https://skmtc.dev/fluxer/apis/fluxer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fluxer/fluxer-api/revisions/d9c706133cc5/schema)
