Skip to content

List billing organizations

Lists every organization you are an active member of, for the Bill to choice when renting a Forge cloud server. Forge is not tied to one organization: a server is billed to the organization its create names in organization_id, and this list is where that choice comes from. Show title as the picker's label, help beneath it, and each organization's reason when it cannot be chosen; every sentence is written by the backend.

An organization is selectable when all three hold there:

  • Forge cloud compute is switched on for the organization;
  • you hold the use_forge capability in it;
  • Aitronos servers are offered to you in it (not switched off for the organization, and not offered to Aitronos staff only).

A spending limit never makes an organization unselectable: once it is chosen, the catalog explains the limit in blocked_reason, and a create past it is refused with 402 FORGE_COMPUTE_SPEND_LIMIT_REACHED.

It names no organization (it is about you, across all of yours) and requires a credential that acts for a person (a bearer token, or a key belonging to a person). A credential confined to some organizations is shown those alone. Removed memberships and deleted organizations are never listed.

GEThttps://api.aitronos.com/v1/forge/compute/billing-organizations

Returns

default_organization_id string or null — the organization to preselect: your saved choice (see Choose the default billing organization) while it is still selectable, else your current organization if it is selectable, else the first selectable one; null when none is selectable.

title string — the picker's label, e.g. Bill to.

help string — a sentence explaining the picker, e.g. Rented servers are billed to this organization's Forge cloud compute.

organizations array — every organization you are an active member of, in order. Each entry:

  • id string — the organization's id. Send it as organization_id when creating a server.
  • name string — the organization's name.
  • logo_url string or null — the organization's logo, as a public URL.
  • selectable boolean — whether servers can be billed to it now.
  • reason string or null — why it cannot be chosen, as a sentence to show; null when selectable. One of: Cloud servers are not available for this organization., Cloud servers could not be checked for this organization right now. Try again in a moment. (the switch could not be read; ask again later), You don't have permission to rent servers in this organization., Aitronos servers are not offered to you in this organization.
  • month_to_date_label string or null — what the organization has spent on cloud servers this calendar month, as a sentence to show, e.g. CHF 0.52 on servers this month. Only for members holding view_billing there; null otherwise, or when it cannot be read right now.
  • order integer — display position from 0: selectable organizations first, then by name.
{
  "default_organization_id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c",
  "title": "Bill to",
  "help": "Rented servers are billed to this organization's Forge cloud compute.",
  "organizations": [
    {
      "id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c",
      "name": "Acme Engineering",
      "logo_url": "https://cdn.example.com/logos/acme.png",
      "selectable": true,
      "reason": null,
      "month_to_date_label": "CHF 0.52 on servers this month",
      "order": 0
    },
    {
      "id": "org_8f2d4b6a1c3e4f5a8b7c9d0e1f2a3b4c",
      "name": "Side Project",
      "logo_url": null,
      "selectable": true,
      "reason": null,
      "month_to_date_label": null,
      "order": 1
    },
    {
      "id": "org_1a2b3c4d5e6f4a7b8c9d0e1f2a3b4c5d",
      "name": "Client Workspace",
      "logo_url": null,
      "selectable": false,
      "reason": "You don't have permission to rent servers in this organization.",
      "month_to_date_label": null,
      "order": 2
    },
    {
      "id": "org_9e8d7c6b5a4f4e3d2c1b0a9f8e7d6c5b",
      "name": "Research Lab",
      "logo_url": null,
      "selectable": false,
      "reason": "Cloud servers are not available for this organization.",
      "month_to_date_label": null,
      "order": 3
    }
  ]
}

Errors

StatusCodeWhen
401AUTHENTICATION_REQUIREDNo valid credential.
403API_KEY_PERSON_REQUIREDAn organization API key: it has no person of its own.
cURL
curl "https://api.aitronos.com/v1/forge/compute/billing-organizations" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Response:

{
  "default_organization_id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c",
  "title": "Bill to",
  "help": "Rented servers are billed to this organization's Forge cloud compute.",
  "organizations": [
    {
      "id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c",
      "name": "Acme Engineering",
      "logo_url": "https://cdn.example.com/logos/acme.png",
      "selectable": true,
      "reason": null,
      "month_to_date_label": "CHF 0.52 on servers this month",
      "order": 0
    },
    {
      "id": "org_1a2b3c4d5e6f4a7b8c9d0e1f2a3b4c5d",
      "name": "Client Workspace",
      "logo_url": null,
      "selectable": false,
      "reason": "You don't have permission to rent servers in this organization.",
      "month_to_date_label": null,
      "order": 1
    }
  ]
}