Create or update an end user
Idempotent on email: the first call creates the account (201), repeat calls update it in place (200). Re-provisioning a revoked or deleted account restores it. Optionally assigns one or more plans (each becomes its own subscription with its own credit pool; access is the union of held plans) and access grants (additive and idempotent -- duplicates of grants the user already holds are skipped).
Validation runs before any write: a request failing with tier_not_found, grant_target_not_found, or live_paid_subscription leaves no partial account behind.
Requires the end_users:write scope.
Authorization
apiKey An organization API key, created from a Storefront's Webhooks page (Provisioning API card). The secret is shown once at creation and stored only as a hash. Keys are organization-wide and carry scopes (end_users:read, end_users:write). Rate limit: 120 requests per minute per key (sliding 60-second window).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/end-users" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com" }'{ "endUser": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "email": "user@example.com", "fullName": "string", "createdAt": "2019-08-24T14:15:22Z" }, "created": true, "subscriptions": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "tierPlanId": "5e2e90db-0903-4f92-af9a-07e1540bc709", "tierPlanName": "string", "status": "string", "creditAllowance": 0, "creditsUsed": 0, "creditsResetAt": "2019-08-24T14:15:22Z" } ], "grantsCreated": 0}