Skip to Content
Docs
API referencePlatform API

Billing

Get the billing account

GET
/workspaces/{workspace_id}/billing

The workspace's plan and billing interval, the plan a pending downgrade moves it to and when (scheduled_plan, scheduled_plan_at), what it holds (projects, seats, FGA instances, custom domains), what its plan grants, and the Free checklist. Pontive bills workspaces through billing-svc on the Directory instance: plan and interval changes, payment and invoices are billing's, in its portal on the dashboard's Billing page, not here. Any workspace member reads it.

Path Parameters

workspace_id*string

Workspace ID

Response Body

OK

application/json
  1. response
billing_interval?string

monthly or annual: the contract's billing frequency on a paid plan.

Value in"monthly""annual"
custom_domains?integer
entitlements?

What the workspace's plan grants, as the console shows it.

fga_instances?integer

Production instances with Fine-Grained Authorization on, and custom auth domains.

has_subscription?boolean

Whether the workspace is on a paid plan.

plan?string

The workspace's plan, and when it last changed. It follows the package of the workspace's contract on the directory instance, changed in billing's portal on the Billing page.

plan_changed_at?string
Formatdate-time
projects?

Projects: the plan's included slots, the live ones, those beyond the slots, the b2b ones, the paused ones.

scheduled_plan?string

The plan of the contract's pending change: a downgrade waiting for the end of the period or the term. A pending change of billing interval alone is none. Null while none is pending.

scheduled_plan_at?string

When the scheduled plan applies; null with no scheduled plan.

Formatdate-time
scheduled_plan_blockers?array<>

The Free checklist (pontive-spec 10, Downgrade to Free): while a downgrade to Free is pending, what the workspace would hold that Free cannot; while a move to Free keeps it paused, what still does. Null otherwise.

seats?

Seats: the members, and the plan's included seats. A pending invitation holds no seat.

workspace_id?string
Example Request
curl -X GET 'https://api.pontive.com/v1/workspaces/string/billing'
Example Response
{  "billing_interval": "monthly",  "custom_domains": 0,  "entitlements": {    "audit_log_retention_hours": 0,    "included_projects": 0,    "included_seats": 0,    "max_non_prod_instances": 0,    "modules_available": [      "string"    ],    "modules_non_production": [      "string"    ],    "name": "string",    "plan": "string",    "request_log_retention_hours": 0,    "usage": {      "property1": {        "cap": 0,        "included": 0,        "per": 0      },      "property2": {        "cap": 0,        "included": 0,        "per": 0      }    }  },  "fga_instances": 0,  "has_subscription": true,  "plan": "string",  "plan_changed_at": "2019-08-24T14:15:22Z",  "projects": {    "additional": 0,    "b2b": 0,    "included": 0,    "live": 0,    "paused": 0  },  "scheduled_plan": "string",  "scheduled_plan_at": "2019-08-24T14:15:22Z",  "scheduled_plan_blockers": [    {      "count": 0,      "kind": "seats"    }  ],  "seats": {    "current": 0,    "included": 0  },  "workspace_id": "string"}

Workspace usage

GET
/workspaces/{workspace_id}/usage

The current calendar month: every meter pooled across the workspace's instances against its plan's allowances and caps, split by project; tracked token counts; each project and instance. Nothing is priced here. Trails real time by up to 15 minutes.

Path Parameters

workspace_id*string

Workspace ID

Response Body

OK

application/json
  1. response
billing_interval?plan.Interval
Value in"monthly""annual"
meters?

Meters is every meter pooled across the workspace's instances, production and non-production alike, against the plan's allowances.

period?
plan?"free"
Value in"free"
projects?array<>
reported_at?string
tracked?

Tracked holds measured-only counters: tokens issued, by kind.

workspace_id?string
Example Request
curl -X GET 'https://api.pontive.com/v1/workspaces/string/usage'
Example Response
{  "billing_interval": "monthly",  "meters": {    "property1": {      "by_project": {        "property1": 0,        "property2": 0      },      "cap": 0,      "included": 0,      "usage": 0    },    "property2": {      "by_project": {        "property1": 0,        "property2": 0      },      "cap": 0,      "included": 0,      "usage": 0    }  },  "period": {    "end": "string",    "source": "string",    "start": "string"  },  "plan": "free",  "projects": [    {      "included": true,      "instances": [        {          "custom_domains": 0,          "environment": "string",          "fga": true,          "instance_id": "string",          "meters": {            "property1": 0,            "property2": 0          },          "name": "string",          "reported_at": "string"        }      ],      "name": "string",      "project_id": "string",      "status": "string",      "tenancy_mode": "string"    }  ],  "reported_at": "string",  "tracked": {    "property1": 0,    "property2": 0  },  "workspace_id": "string"}