Flambe docs
API referencePush tokens

Register a device for push

Registering the same `token` again updates the existing record rather than creating a duplicate, so this is safe to call on every launch.

POST
/api/push-tokens

Registering the same token again updates the existing record rather than creating a duplicate, so this is safe to call on every launch.

Authorization

bearerAuth
AuthorizationBearer <token>

A Clerk session JWT. Obtain one with a Clerk frontend SDK (session.getToken()) or, for server-to-server use, with a Clerk machine token. The token's sub claim is the Flambe user id that scopes every request.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/push-tokens" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "token": "string",  "platform": "ios",  "device_id": "string",  "device_name": "string",  "device_type": "string",  "app_version": "string",  "app_build": "string",  "session_id": "string"}