Create Account
Creates the billing account that owns wallets and receives rated usage through usage control rules in one project.
POST /v1/projects/:project_id/accountsAuthentication
Section titled “Authentication”Authorization: Bearer <api-key>Content-Type: application/jsonPath Parameters
Section titled “Path Parameters”| Field | Required | Description |
|---|---|---|
project_id |
Yes | Project that owns the account. Accounts, wallets, subject routes, vouchers, and usage-control state are isolated within this project. |
Request Body
Section titled “Request Body”{ "name": "Acme Organization", "primary_subject_type": "organization", "primary_subject_id": "org_001"}| Field | Required | Description |
|---|---|---|
name |
No | Display name for the billing account. |
primary_subject_type |
No | Primary subject type, for example organization, workspace, or customer. |
primary_subject_id |
No | Primary subject ID. If provided, primary_subject_type must also be provided. |
Response
Section titled “Response”{ "id": "acct_xxx", "tenant_id": "t_001", "project_id": "proj_gateway", "name": "Acme Organization", "primary_subject_type": "organization", "primary_subject_id": "org_001", "status": "active", "created_at": 1782720000, "updated_at": 1782720000}- Accounts are isolated by
tenant_id + project_id. The same primary subject may exist in another project without sharing wallets or routes. - A common SaaS pattern is to create one account for an organization, then create subject routes for each user that should bill against that organization.