Organization

Read your organization, and read and update its settings.

The organization is implied by the token — there is no org id in any path.

EndpointScopeToken owner's role
GET /orgorg:readAny member (response depends on the role)
GET /org/settingsorg:readAdmin
PATCH /orgorg:write (sensitive)Admin

org:write changes exactly the settings the portal's Settings → Organization form edits. Suspending or deleting the organization and changing its billing mode are done in the portal.

The organization object

For an Admin token owner, the organization record and its settings are returned as one flat object. Settings fields appear once they have been set; an organization that never set monthly_budget, for example, has no monthly_budget key.

FieldTypeNotes
idstringOpaque id.
namestring
slugstring
is_activebooleanfalse while the organization is suspended.
billing_modestringThe organization's billing mode (read-only here).
regionstringThe organization's region.
created_atstringISO-8601 UTC.
spend_ceilingnumberUpper bound (USD) no project spend limit may exceed. Absent = unbounded.
default_model_allowliststring[]Allowlist applied to new projects.
default_rpm_limitintegerDefault requests-per-minute limit.
default_daily_capnumberDefault daily spend cap (USD).
default_monthly_capnumberDefault monthly spend cap (USD).
monthly_budgetnumberOrganization monthly budget (USD).
budget_behaviorstringalert_only or hard_stop when the budget is reached.
email_otp_enabledbooleanEmail one-time-code MFA for member sign-ins. Admins always use MFA.

Treat the object as open: new fields may appear within v1.

The organization identity (members)

A token owner who is not an Admin gets only the organization's identity. Settings and billing mode are admin-only.

FieldTypeNotes
idstringOpaque id.
namestring
slugstring
regionstringThe organization's region.
is_activebooleanfalse while the organization is suspended.
created_atstringISO-8601 UTC.
rolestringThe token owner's own role, admin or member.
{
  "id": "3f9a7c21-5d4e-4b8a-9c0f-1e2d3a4b5c6d",
  "name": "Acme Corp",
  "slug": "acme",
  "region": "default",
  "is_active": true,
  "created_at": "2026-03-02T09:41:17Z",
  "role": "member"
}

Retrieve the organization

GET /api/v1/mgmt/org

An Admin gets the organization object; any other member gets the organization identity.

curl https://portal.<domain>/api/v1/mgmt/org \
  -H "Authorization: Bearer $TF_PAT"
{
  "id": "3f9a7c21-5d4e-4b8a-9c0f-1e2d3a4b5c6d",
  "name": "Acme Corp",
  "slug": "acme",
  "is_active": true,
  "billing_mode": "prepaid",
  "region": "default",
  "created_at": "2026-03-02T09:41:17Z",
  "spend_ceiling": 10000,
  "default_model_allowlist": ["openai/gpt-4o-mini"],
  "default_rpm_limit": 600,
  "default_monthly_cap": 1000,
  "monthly_budget": 5000,
  "budget_behavior": "alert_only",
  "email_otp_enabled": true
}

Retrieve the organization settings

GET /api/v1/mgmt/org/settings

Admin only. Returns the organization object with every settings key. A member gets 403 insufficient_scope.

curl https://portal.<domain>/api/v1/mgmt/org/settings \
  -H "Authorization: Bearer $TF_PAT"

Update the organization

PATCH /api/v1/mgmt/org

Send any of the fields below at the top level of the body. Only the fields you send change; an empty body or an unknown field is 400 invalid_request (param names the field). Requires Idempotency-Key and an owner who is currently an Admin. Returns 200 with the updated organization object.

Body fieldTypeNotes
namestringCannot be empty.
slugstringCannot be empty. Already in use → 409 slug_taken.
default_model_allowliststring[]
default_rpm_limitinteger
default_daily_capnumberUSD.
default_monthly_capnumberUSD.
monthly_budgetnumberUSD.
budget_behaviorstringalert_only or hard_stop.
email_otp_enabledboolean
spend_ceilingnumberUSD, not negative. 0 clears the bound.
curl -X PATCH https://portal.<domain>/api/v1/mgmt/org \
  -H "Authorization: Bearer $TF_PAT" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 9c8b7a6f-5e4d-4c3b-8a2f-1e0d9c8b7a6f" \
  -d '{"monthly_budget": 6000, "budget_behavior": "hard_stop"}'

Errors specific to the organization

StatusCodeWhen
400invalid_request (param set when known)Empty body; unknown field; empty name or slug; budget_behavior not alert_only/hard_stop; negative spend_ceiling; a field of the wrong type.
403insufficient_scopeToken lacks org:read/org:write, or (for GET /org/settings and PATCH) the owner is not currently an Admin.
409slug_takenThe slug is already in use.