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.
session_idle_timeout_minutesintegerThe organization's session idle timeout, once set. See session policy.
session_absolute_lifetime_minutesintegerThe organization's session absolute lifetime, once set.
session_policyobjectThe session policy in force, always present (below).

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

Session policy

How long a portal session lasts for every member of the organization. A session ends after idle_timeout_minutes without activity, or absolute_lifetime_minutes after sign-in even if active — whichever comes first. The member then signs in again. A change takes effect on each member's next request; sessions are not cut immediately, and it applies to the Admin making the change too.

session_policy fieldTypeNotes
idle_timeout_minutesintegerIn force. Platform default 60.
idle_timeout_sourcestringorg (set by the organization) or default.
absolute_lifetime_minutesintegerIn force. Platform default 1440 (24 h).
absolute_lifetime_sourcestringorg or default.
effective_absolute_lifetime_minutesintegerThe lifetime members actually get. The sign-in service ends every session after 10 hours, so the 24 h default is 600 in practice.
limitsobjectThe accepted ranges, in minutes: idle 5–60, absolute 60–600.
"session_policy": {
  "idle_timeout_minutes": 30,
  "idle_timeout_source": "org",
  "absolute_lifetime_minutes": 1440,
  "absolute_lifetime_source": "default",
  "effective_absolute_lifetime_minutes": 600,
  "limits": {
    "idle_timeout_minutes": { "min": 5, "max": 60 },
    "absolute_lifetime_minutes": { "min": 60, "max": 600 }
  }
}

API access with a personal access token is not a session and is not affected.

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-oss-20b"],
  "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.
session_idle_timeout_minutesinteger | nullWhole minutes, 5–60, shorter than the absolute lifetime. null = platform default.
session_absolute_lifetime_minutesinteger | nullWhole minutes, 60–600 (1–10 hours). null = platform default.

Warning

A short idle timeout signs every member out often — including you, from your next portal request. Values above the limits are refused rather than silently ignored: the sign-in service ends sessions after 60 idle minutes and 10 hours regardless.

curl -X PATCH https://portal.<domain>/api/v1/mgmt/org \
  -H "Authorization: Bearer $TF_PAT" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"session_idle_timeout_minutes": 30, "session_absolute_lifetime_minutes": 480}'
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.
422validation_failed (param = the field)A session timeout that is not a whole number of minutes, is outside its range, or an idle timeout that is not shorter than the absolute lifetime.

We use strictly necessary cookies to record your choice and run this site. We do not use cookies for advertising or tracking. See the Cookie Policy.