Create a short-lived client token for browser SDK use.
Use case: Your backend calls this endpoint to generate a token, then passes it to your frontend. The frontend uses the token to make authenticated requests to /client/* endpoints.
Context types:
context: Public data accessible to the client via /client/contextserverContext: Private data only accessible to handlers (never exposed to client)Security:
Example flow:
POST /v1/client-tokens with { context: { customerId: "cust_123" }, serverContext: { creditLimit: 1000 } }/client/* endpoints (e.g., check limits)API Key or Personal Access Token (PAT). When using PAT, include X-Project header.
Public context accessible to the client via /client/context (e.g., { customerId: "...", plan: "..." })
Private context only accessible to handlers, never exposed to client (e.g., { internalId: "..." })
Time-to-live in seconds. Default: 3600 (1 hour). Max: 86400 (24 hours).
0 < x <= 86400