Saves which organization to preselect as Bill to when you rent a Forge cloud server, and returns the billing organizations with it as default_organization_id. The choice is yours alone and follows you across devices.
It only preselects. Every server is billed to the organization its create names in organization_id, and nothing already running moves. If the saved organization later stops being selectable, the list falls back to your current organization, or the first selectable one, until you choose again.
The organization must be one of yours marked selectable in List billing organizations. Otherwise the request is refused with 403 FORGE_COMPUTE_BILLING_ORGANIZATION_NOT_SELECTABLE, whose message is the reason to show, and nothing is saved. Requires a credential that acts for a person; one confined to some organizations can choose only among those.
organization_id string required
The organization to preselect: an id from organizations marked selectable. Unknown fields are refused.
The billing organizations, with default_organization_id set to the chosen organization.
{
"default_organization_id": "org_8f2d4b6a1c3e4f5a8b7c9d0e1f2a3b4c",
"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
}
]
}| Status | Code | When |
|---|---|---|
| 401 | AUTHENTICATION_REQUIRED | No valid credential. |
| 403 | API_KEY_PERSON_REQUIRED | An organization API key: it has no person of its own. |
| 403 | FORGE_COMPUTE_BILLING_ORGANIZATION_NOT_SELECTABLE | Servers cannot be billed to this organization: you are not an active member of it, your credential is confined to other organizations ("This key cannot be used in this organization."), Forge cloud compute is off there or could not be checked, you do not hold use_forge there, or Aitronos servers are not offered to you there. message is the reason to show; details.organization_id is the organization. Nothing was saved. |
| 422 | VALIDATION_ERROR | A body of the wrong shape: organization_id missing or empty, or an unknown field. |
- Bash
- Python
- Python
- JavaScript
curl -X PUT "https://api.aitronos.com/v1/forge/compute/billing-organizations/default" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"organization_id": "org_8f2d4b6a1c3e4f5a8b7c9d0e1f2a3b4c"}'Response:
{
"default_organization_id": "org_8f2d4b6a1c3e4f5a8b7c9d0e1f2a3b4c",
"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
}
]
}- Forge cloud compute overview
- List billing organizations
- Choose the default billing organization
- List project groups
- Register or update a project group
- Delete a project group
- List compute offerings
- Get offering options
- Resolve a free size
- List connected accounts
- Connect a cloud account
- Disconnect a cloud account
- Create a server
- List servers
- List your servers in every organization
- Get a server
- Get a server's daily cost and uptime
- List a server's running intervals
- List a server's event history
- Park a server
- Resume a server
- Delete a server
- Get compute settings
- Get spend limits
- Change the organization's limits
- Set your own limit
- List member limits
- Set a member's limit