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

Create usage

POST/workspaces/{organizationId}/usage
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
periodstringrequired
min length 1
resourcestringrequired
min length 1
actionstringrequired
min length 1
countinteger
min 0 · default: 1
Responses
201

Usage recorded

idstringrequired
organizationIdstringrequired
periodstringrequired
resourcestringrequired
actionstringrequired
countintegerrequired
createdAtstringrequired
updatedAtstringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/usage' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "period": "string",
  "resource": "string",
  "action": "string",
  "count": 1
}'
Response
{
  "id": "string",
  "organizationId": "string",
  "period": "string",
  "resource": "string",
  "action": "string",
  "count": 0,
  "createdAt": "string",
  "updatedAt": "string"
}

Was this page helpful?