Skip to content

API reference

Get billing

billing.GetBillingReadAPI key

Read the workspace's billing state: the acting member's own credit, whether a payment method is on file and the current period.

POST/v1/operations/billing.GetBilling
On this page

Access & visibility

Allow billing.GetBilling on your API key.

Workspace access by default. Private member data requires approved member delegation through Brigg-Act-As; the key supplies permissions while private ownership and project boundaries remain enforced.

Set up authentication · Choose permissions

Request

No parameters. Send an empty JSON object ({}).

Balance, charges and underlying usage

Brigg bills two things separately. Each member has their own AI usage, which comes with their seat and pays for the work they ask for. Work the company runs with nobody behind it, and everything with a price of its own such as SMS, phone minutes and domains, is billed monthly for actual use; there is no shared balance to top up. Get billing returns the workspace's billing state: balance_nok is the acting member's own never-expiring credit, and zero for a workspace key. List credit ledger returns the company's recent movements, newest first: a negative amount is a charge; a positive amount adds credit. The default is 50 rows and the maximum is 500, with no cursor for older pages.

For the company's spending over a period, use List usage. Its from and to values are inclusive Unix millisecond timestamps. Use totals.spent_nok for what was charged: it comes from the ledger. The items describe individual charges and their activities. Use totals for period spending: item detail can be incomplete. Figures are in Norwegian kroner, not minor currency units.

A member's own charges are visible only to that member, never through the company's ledger. Storage usage is a separate byte quota, not a currency balance.

Response

Returns 200 OK with a JSON body.

billingBillingRequired

Billing state, payment availability and credit balance.

Billing
planstringRequired

Retired plan indicator, kept for existing clients: start when the workspace pays for anything, otherwise free.

Allowed: "trial", "free", "start", "team", "enterprise", "legacy", "invoiced".

balance_noknumberRequired

The acting member's own never-expiring credit in Norwegian kroner, not øre: one-time credit and usage bought for them. Zero for a workspace key: Brigg holds no shared workspace balance. Company work is billed monthly for actual use.

monthly_credit_noknumberRequired

Always zero. Kept for existing clients.

last_refill_atnull or numberRequired

Start of the current billing period, in Unix milliseconds.

next_refill_atnull or numberRequired

End of the current billing period, in Unix milliseconds.

trial_ends_atnull or numberRequired

Always null. Trials are retired.

has_payment_methodbooleanRequired

Whether a payment method is configured for the workspace.

Allowed: false, true.

created_atnumberRequired

Creation time in Unix milliseconds.

updated_atnumberRequired

Last update time in Unix milliseconds.

personal_allowancenull or objectRequired

The acting member's own AI usage this period. Null for a workspace key, a guest or an outside party.

Nested fields

Variant 2

used_percentnumberRequired

How much of what the member holds this period is used, 0 to 100.

renews_atnull or numberRequired

When the period's allowance starts over, in Unix milliseconds.

purchased_noknumberRequired

Usage bought for the member that is still unspent, in Norwegian kroner. It does not expire.

emptybooleanRequired

Whether the member has nothing left: their own AI work is paused until renewal, a top-up or a higher tier.

Allowed: false, true.

company_spendnull or numberRequired

The company's AI use this billing period in Norwegian kroner, before any credit offset. Null unless the caller manages the workspace.

company_budgetnull or numberRequired

The company's monthly AI limit in Norwegian kroner. Null unless the caller manages the workspace.

amount_outstandingnull or numberRequired

What the company owes right now in Norwegian kroner: usage not yet invoiced plus invoices not yet paid. Null unless the caller manages the workspace.

online_payments_availablebooleanRequired

Whether this workspace can use Brigg's online payment flow.

Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.

HTTP status Code What to do
400 invalid_json Send a JSON object with Content-Type: application/json.
400 invalid_input Check the request fields and types.
401 invalid_key The workspace API key is missing, invalid or revoked.
403 forbidden Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member.
404 not_found The requested operation or resource is not available to this credential.
429 rate_limited Wait for Retry-After before retrying.

Next steps

Download OpenAPI · Versioning & retirement

JSON schemas

Use the complete schemas for validation or client generation.

Full request JSON schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false,
  "examples": [
    {}
  ]
}
Full response JSON schema
{
  "type": "object",
  "properties": {
    "billing": {
      "description": "Billing state, payment availability and credit balance.",
      "title": "Billing",
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "enum": [
            "trial",
            "free",
            "start",
            "team",
            "enterprise",
            "legacy",
            "invoiced"
          ],
          "description": "Retired plan indicator, kept for existing clients: start when the workspace pays for anything, otherwise free."
        },
        "balance_nok": {
          "type": "number",
          "description": "The acting member's own never-expiring credit in Norwegian kroner, not øre: one-time credit and usage bought for them. Zero for a workspace key: Brigg holds no shared workspace balance. Company work is billed monthly for actual use."
        },
        "monthly_credit_nok": {
          "type": "number",
          "description": "Always zero. Kept for existing clients."
        },
        "last_refill_at": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "Start of the current billing period, in Unix milliseconds."
        },
        "next_refill_at": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "End of the current billing period, in Unix milliseconds."
        },
        "trial_ends_at": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "Always null. Trials are retired."
        },
        "has_payment_method": {
          "type": "boolean",
          "enum": [
            false,
            true
          ],
          "description": "Whether a payment method is configured for the workspace."
        },
        "created_at": {
          "type": "number",
          "description": "Creation time in Unix milliseconds."
        },
        "updated_at": {
          "type": "number",
          "description": "Last update time in Unix milliseconds."
        },
        "personal_allowance": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "object",
              "properties": {
                "used_percent": {
                  "type": "number",
                  "description": "How much of what the member holds this period is used, 0 to 100."
                },
                "renews_at": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "description": "When the period's allowance starts over, in Unix milliseconds."
                },
                "purchased_nok": {
                  "type": "number",
                  "description": "Usage bought for the member that is still unspent, in Norwegian kroner. It does not expire."
                },
                "empty": {
                  "type": "boolean",
                  "enum": [
                    false,
                    true
                  ],
                  "description": "Whether the member has nothing left: their own AI work is paused until renewal, a top-up or a higher tier."
                }
              },
              "required": [
                "used_percent",
                "renews_at",
                "purchased_nok",
                "empty"
              ],
              "additionalProperties": false
            }
          ],
          "description": "The acting member's own AI usage this period. Null for a workspace key, a guest or an outside party."
        },
        "company_spend": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "The company's AI use this billing period in Norwegian kroner, before any credit offset. Null unless the caller manages the workspace."
        },
        "company_budget": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "The company's monthly AI limit in Norwegian kroner. Null unless the caller manages the workspace."
        },
        "amount_outstanding": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "number"
            }
          ],
          "description": "What the company owes right now in Norwegian kroner: usage not yet invoiced plus invoices not yet paid. Null unless the caller manages the workspace."
        }
      },
      "required": [
        "plan",
        "balance_nok",
        "monthly_credit_nok",
        "last_refill_at",
        "next_refill_at",
        "trial_ends_at",
        "has_payment_method",
        "created_at",
        "updated_at",
        "personal_allowance",
        "company_spend",
        "company_budget",
        "amount_outstanding"
      ],
      "additionalProperties": false
    },
    "online_payments_available": {
      "type": "boolean",
      "description": "Whether this workspace can use Brigg's online payment flow."
    }
  },
  "required": [
    "billing",
    "online_payments_available"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "billing": {
        "plan": "start",
        "balance_nok": 487.5,
        "monthly_credit_nok": 295,
        "last_refill_at": null,
        "next_refill_at": null,
        "trial_ends_at": null,
        "has_payment_method": false,
        "created_at": 1794301200000,
        "updated_at": 1794301200000,
        "personal_allowance": null,
        "company_spend": null,
        "company_budget": null,
        "amount_outstanding": null
      },
      "online_payments_available": false
    }
  ]
}

Search by operation name or what you want to build.

Use arrow keys to browse. Enter opens a result.