Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create push token

POST/workspaces/{organizationId}/push-tokens
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Request body
application/json
namestring
providerstring
default: "fcm"
Allowed:fcmapnsexpo
tokenstringrequired
min length 1
Responses
201

Push token created

idstringrequired
organizationIdstringrequired
userIdstringrequired
namestring | nullrequired
providerstringrequired
Allowed:fcmapnsexpo
tokenstringrequired
createdAtstringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/push-tokens' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "provider": "fcm",
  "token": "string"
}'
Response
{
  "id": "string",
  "organizationId": "string",
  "userId": "string",
  "name": "string",
  "provider": "fcm",
  "token": "string",
  "createdAt": "string"
}

Was this page helpful?