Skip to main content
POST
/
v1
/
workspaces
/
{workspace_id}
/
billing
/
events
Record a billing event
curl --request POST \
  --url https://api.usezombie.com/v1/workspaces/{workspace_id}/billing/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_type": "PAYMENT_FAILED",
  "reason": "<string>"
}
'
{
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "billing_status": "<string>",
  "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub OAuth

Path Parameters

workspace_id
string<uuid>
required

Workspace identifier

Body

application/json
event_type
enum<string>
required

Type of billing event

Available options:
PAYMENT_FAILED,
DOWNGRADE_TO_FREE
reason
string
required

Human-readable reason for the event

Response

Billing event recorded

workspace_id
string<uuid>
required
billing_status
string
required

Updated billing status

request_id
string<uuid>
required