Notify API reference

Notify API · Channels

put/v1/workspaces/{workspace_id}/channels/webpush/vapid-keysAuth

Import a web push VAPID key

Imports an existing VAPID key pair (for example from another push provider) so subscriptions made with it keep working. The pair is checked to be a matching P-256 pair. The private key is stored encrypted and never returned. Replacing a different existing key needs `confirm: "rotate"` (see generate); importing the active pair again changes nothing.

Path parameters

workspace_id*string · uuid

Id of the workspace.

Request body

public_key*string

The VAPID public key: an uncompressed P-256 point (65 bytes), base64url. The `applicationServerKey` your existing subscriptions were made with.

Example: "BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U"

private_key*string

The VAPID private key: the 32-byte P-256 scalar, base64url. Write-only: stored encrypted and never returned.

confirmenum (1)

Required when the workspace already has a different VAPID key (see `POST /channels/webpush/vapid-keys`). Importing the pair that is already active changes nothing.

Response · 200 The active key.

credential_id*string · uuid

The credential id of the key pair.

public_key*string

The public key (base64url, uncompressed P-256). Pass it as `applicationServerKey` to `pushManager.subscribe`.

origin*object

`generated` by Notify, or `imported` from another provider.

fingerprint*string

First 16 hex characters of the SHA-256 of the private key; the private key itself is never returned.

created_at*string · date-time

When this key became active.

devices_invalidated*integer

Web push devices marked `invalid` (`vapid_rotated`) because this call replaced the previous key; 0 when nothing was replaced.

Example

Request

PUT https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/channels/webpush/vapid-keys
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "public_key": "BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkrxZJjSgSnfckjBJuBkr3qBUYIHBQFLXYp5Nksh8U",
  "private_key": "string",
  "confirm": "rotate"
}

Response

{
  "credential_id": "00000000-0000-0000-0000-000000000000",
  "public_key": "string",
  "origin": {},
  "fingerprint": "string",
  "created_at": "2026-01-01T00:00:00.000Z",
  "devices_invalidated": 0
}