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

Create token

POST/workspaces/{organizationId}/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
namestringrequired
min length 1
permissionsstring | string[]
Show properties
Any of:
string
string
string[]
Array of string
string
actorTypestring
Allowed:useragent
providerstring
teamIdsstring[]
Responses
201

Token created

idstringrequired
organizationIdstringrequired
namestringrequired
tokenstringrequired
permissionsstringrequired
actorTypestring
Allowed:useragent
providerstring
createdAtstringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/tokens' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "permissions": "string",
  "actorType": "user",
  "provider": "string",
  "teamIds": [
    "string"
  ]
}'
Response
{
  "id": "string",
  "organizationId": "string",
  "name": "string",
  "token": "string",
  "permissions": "string",
  "actorType": "user",
  "provider": "string",
  "createdAt": "string"
}

Was this page helpful?