MeRegister a push token

Register a push token

Links an Expo push token to the current user (the mobile app calls this after sign-in and when the token changes). Idempotent: sending the same token again just updates the record; a token linked to another user moves to the current one (account switch on the device).

curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/me/push-tokens" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "platform": "ios"
}'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "token": "example_string",
  "platform": "example_string",
  "createdAt": "2026-07-02T11:25:15.134000Z",
  "updatedAt": "2026-07-02T11:25:15.134000Z"
}
POST
/api/v1/me/push-tokens
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Session token. Mobile/services. The web uses a cookie.

Session token. Mobile/services. The web uses a cookie.
API Key (cookie: session_token)
session_tokenstring
Required

API key (sent in cookie)

Content-Typestring
Required

The media type of the request body

Options: application/json
tokenstring
Required

Expo push token

Min length: 1
platformstring

default ios

Options: ios, android
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Session token. Mobile/services. The web uses a cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Body

application/json
tokenstring
Required

Expo push token

Example:
ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]
platformstring

default ios

Allowed values:iosandroid

Responses

idstring
Required

cuid

tokenstring
Required
platformstring
Required
createdAtstring
Required
updatedAtstring
Required