Token API (/v1)
Programmatic endpoints, authenticated with a Bearer token (a personal access token atx_pat_… or an OAuth token atx_oat_…).
Generated from the Atrix Analytics — control plane API OpenAPI document, version 0.1.0. 22 operations. The raw document is at /openapi.json.
GET /v1/me
The calling token, its user, and its effective scopes.
Auth: Bearer token.
| Status | Body | Notes |
|---|---|---|
| 200 | V1MeResponse | |
| 401 | ErrorBody |
GET /v1/orgs
The org this token belongs to (org:read).
Auth: Bearer token with org:read.
GET /v1/orgs/{org_id}
Auth: Bearer token with org:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | string (uuid) | yes |
GET /v1/orgs/{org_id}/projects
Auth: Bearer token with projects:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | string (uuid) | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | ProjectList | |
| 404 | ErrorBody |
POST /v1/orgs/{org_id}/projects
Create a project (projects:write). ?dry_run=true validates and returns the plan.
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | string (uuid) | yes | |
dry_run | query | boolean | ||
Idempotency-Key | header | string | null |
Request body (application/json): CreateProjectRequest
| Field | Type | Required | Description |
|---|---|---|---|
currency | string | null | ISO 4217, default USD. | |
name | string | yes | |
region | string | yes | Region code. Fixed for the life of the project. Only live regions are accepted. |
timezone | string | null | IANA zone, default UTC. |
| Status | Body | Notes |
|---|---|---|
| 200 | DryRun | dry_run |
| 201 | CreateProjectResponse | |
| 400 | ErrorBody | |
| 403 | ErrorBody | |
| 404 | ErrorBody | |
| 409 | ErrorBody | |
| 422 | ErrorBody |
GET /v1/projects
Projects this token can read (projects:read).
Auth: Bearer token with projects:read.
| Status | Body | Notes |
|---|---|---|
| 200 | ProjectList | |
| 401 | ErrorBody |
GET /v1/projects/{project_id}
Auth: Bearer token with projects:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | ProjectDto | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
PATCH /v1/projects/{project_id}
Rename (projects:write).
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
dry_run | query | boolean | ||
Idempotency-Key | header | string | null |
Request body (application/json): RenameRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | ProjectDto | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
DELETE /v1/projects/{project_id}
Soft-delete and revoke every key (projects:write).
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
dry_run | query | boolean | ||
Idempotency-Key | header | string | null |
GET /v1/projects/{project_id}/catalog/codegen
The tracking plan for atrix codegen (Bearer token with catalog:read).
Auth: Bearer token.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | CatalogCodegenExport | |
| 401 | ErrorBody | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
GET /v1/projects/{project_id}/environments
Auth: Bearer token with projects:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | EnvironmentList | |
| 404 | ErrorBody |
GET /v1/projects/{project_id}/integrations
Auth: Bearer token with projects:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | IntegrationList | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
POST /v1/projects/{project_id}/integrations
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
Idempotency-Key | header | string | null |
Request body (application/json): CreateIntegrationRequest
| Field | Type | Required | Description |
|---|---|---|---|
config | object | null | ||
name | string | null | ||
provider | string | yes | stripe |
secret | string | null | Stripe: the endpoint's signing secret (whsec_…). RevenueCat: the Authorization header value configured in its dashboard. App Store and Google Play take none. |
| Status | Body | Notes |
|---|---|---|
| 201 | IntegrationDto | |
| 400 | ErrorBody | |
| 403 | ErrorBody | |
| 404 | ErrorBody | |
| 503 | ErrorBody |
GET /v1/projects/{project_id}/integrations/{integration_id}
Auth: Bearer token with projects:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
integration_id | path | string (uuid) | yes |
| Status | Body | Notes |
|---|---|---|
| 200 | IntegrationDto | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
PATCH /v1/projects/{project_id}/integrations/{integration_id}
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
integration_id | path | string (uuid) | yes | |
Idempotency-Key | header | string | null |
Request body (application/json): UpdateIntegrationRequest
| Field | Type | Required | Description |
|---|---|---|---|
config | object | null | ||
name | string | null | ||
secret | string | null | Replace the stored secret (rotation). | |
status | string | null | active |
| Status | Body | Notes |
|---|---|---|
| 200 | IntegrationDto | |
| 400 | ErrorBody | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
DELETE /v1/projects/{project_id}/integrations/{integration_id}
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
integration_id | path | string (uuid) | yes |
POST /v1/projects/{project_id}/integrations/{integration_id}/rotate-token
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
integration_id | path | string (uuid) | yes | |
Idempotency-Key | header | string | null |
| Status | Body | Notes |
|---|---|---|
| 200 | IntegrationDto | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
GET /v1/projects/{project_id}/keys
Auth: Bearer token with projects:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
POST /v1/projects/{project_id}/keys/{key_id}/revoke
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
key_id | path | string (uuid) | yes | |
dry_run | query | boolean | ||
Idempotency-Key | header | string | null |
POST /v1/projects/{project_id}/keys/{key_id}/rotate
Auth: Bearer token with projects:write.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes | |
key_id | path | string (uuid) | yes | |
dry_run | query | boolean | ||
Idempotency-Key | header | string | null |
Request body (application/json): RotateKeyRequest
| Field | Type | Required | Description |
|---|---|---|---|
keep_old | boolean | Keep the old key working (revoke it later). Default: revoke it now. |
| Status | Body | Notes |
|---|---|---|
| 200 | RotateKeyResponse | |
| 404 | ErrorBody | |
| 409 | ErrorBody |
POST /v1/projects/{project_id}/query
Validate a Query IR and get the region request to run it (query:read). The control plane returns a query:read region token and the region endpoint; results never pass through it.
Auth: Bearer token with query:read.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
Request body (application/json): V1QueryRequest
| Field | Type | Required | Description |
|---|---|---|---|
environment | string | null | production | |
include_sql | boolean | Ask the region to include the compiled SQL in its answer. | |
query | object | yes | A Query IR v1 document (packages/contracts/schemas/query-ir.schema.json). |
refresh | boolean | Bypass the region's result cache. |
| Status | Body | Notes |
|---|---|---|
| 200 | V1QueryResponse | |
| 400 | ErrorBody | |
| 403 | ErrorBody | |
| 404 | ErrorBody |
POST /v1/projects/{project_id}/region-token
Region token carrying the token's regional scopes (∩ the owner's role), optionally narrowed.
Auth: Bearer token.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string (uuid) | yes |
Request body (application/json): RegionTokenRequest
| Field | Type | Required | Description |
|---|---|---|---|
environment | string | null | production | |
scopes | string[] | null | Narrow further. Omit for every regional scope you hold. |
| Status | Body | Notes |
|---|---|---|
| 200 | RegionTokenResponse | |
| 403 | ErrorBody | |
| 404 | ErrorBody |