Tenant

Base URL: $BUSINESS_API

The object

keystring · required
versionstring · required
namestring · required
descriptionstring · optional
settingsobject · required

Portable setting snapshots. Implemented kinds are tariffs, billing_schedules, automation_rules, notification_templates, and connector_definitions. Secret references, health state, customer data, and other tenant records are rejected or omitted; connectors are created disabled and schedules remain paused.

idstring · required
organization_idstring · required
statestring · required

one of draft, published

created_bystring · required
published_bystring · optional
published_atstring (date-time) · optional
created_atstring (date-time) · required
The object
[
  {
    "key": "key",
    "version": "version",
    "name": "Ana Matsinhe",
    "description": "Leitura confirmada no local.",
    "settings": {},
    "id": "org_2sCTxsOpzeEdvmgLlwMjjwUVH08",
    "organization_id": "org_2ZNeUPlw01Za6RbKMZDGGbR4cV5",
    "state": "draft",
    "created_by": "created by",
    "published_by": "published by",
    "published_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z"
  }
]

List available organization templates

Logs

GET /tenant/organization-templates

List published templates from the account's administrative organization

Returns the published templates of the organization that administers this tenant, taken from the active organization link or else the owning organization. The list is empty when the tenant has neither. Only utility staff with business:organization:read can call it.

Returns

200 Published templates available for explicit adoption

Show attributes
keystring · required
versionstring · required
namestring · required
descriptionstring · optional
settingsobject · required

Portable setting snapshots. Implemented kinds are tariffs, billing_schedules, automation_rules, notification_templates, and connector_definitions. Secret references, health state, customer data, and other tenant records are rejected or omitted; connectors are created disabled and schedules remain paused.

idstring · required
organization_idstring · required
statestring · required

one of draft, published

created_bystring · required
published_bystring · optional
published_atstring (date-time) · optional
created_atstring (date-time) · required

Errors 403

Permissions business:organization:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X GET "$BUSINESS_API/tenant/organization-templates" \
  -H "Authorization: Bearer sk_test_..."
Response 200
[
  {
    "key": "key",
    "version": "version",
    "name": "Ana Matsinhe",
    "description": "Leitura confirmada no local.",
    "settings": {},
    "id": "org_2sCTxsOpzeEdvmgLlwMjjwUVH08",
    "organization_id": "org_2ZNeUPlw01Za6RbKMZDGGbR4cV5",
    "state": "draft",
    "created_by": "created by",
    "published_by": "published by",
    "published_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z"
  }
]

List template adoptions requested for this account

Logs

GET /tenant/organization-template-adoptions

Returns every template adoption recorded for the caller's tenant, with its state (pending_acceptance, active or detached), version and organization. Only utility staff with business:organization:read can call it.

Returns

200 Pending and active organization template adoptions for the authenticated tenant

Show attributes
idstring · required
template_idstring · required
organization_idstring · required
tenant_idstring · required
versionstring · required
statestring · required

one of pending_acceptance, active, detached

accepted_bystring · optional
accepted_atstring (date-time) · optional
applied_atstring (date-time) · optional
detached_atstring (date-time) · optional
created_atstring (date-time) · required

Errors 403

Permissions business:organization:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X GET "$BUSINESS_API/tenant/organization-template-adoptions" \
  -H "Authorization: Bearer sk_test_..."
Response 200
[
  {
    "id": "org_27V0IXXc4PdUU9dGwVzoc5xWqTd",
    "template_id": "tem_2wwLTWQZrCq3poE3JiMXbI6xTEk",
    "organization_id": "org_2ZNeUPlw01Za6RbKMZDGGbR4cV5",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "version": "version",
    "state": "pending_acceptance",
    "accepted_by": "accepted by",
    "accepted_at": "2026-11-19T09:30:00Z",
    "applied_at": "2026-11-19T09:30:00Z",
    "detached_at": "2026-11-19T09:30:00Z",
    "created_at": "2026-11-19T09:30:00Z"
  }
]

Accept organization template adoption

Logs

POST /tenant/organization-templates/{templateID}/accept

Accept and apply a pending organization template as the account owner

Applies the template's settings to the caller's tenant and marks the adoption active. Accepting an adoption that is already active returns it unchanged; one that is detached returns 409, and 404 is returned when the template has been changed or unpublished since the adoption was requested. Only a tenant owner can call it, and the acceptance is written to the organization's audit trail.

Parameters

templateIDstring · path · required

ID of the organization template whose pending adoption is accepted.

Returns

200 Template copied and adoption recorded

Show attributes
idstring · required
template_idstring · required
organization_idstring · required
tenant_idstring · required
versionstring · required
statestring · required

one of pending_acceptance, active, detached

accepted_bystring · optional
accepted_atstring (date-time) · optional
applied_atstring (date-time) · optional
detached_atstring (date-time) · optional
created_atstring (date-time) · required

Errors 403 · 404

Permissions business:organization:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X POST "$BUSINESS_API/tenant/organization-templates/{templateID}/accept" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "id": "org_27V0IXXc4PdUU9dGwVzoc5xWqTd",
  "template_id": "tem_2wwLTWQZrCq3poE3JiMXbI6xTEk",
  "organization_id": "org_2ZNeUPlw01Za6RbKMZDGGbR4cV5",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "version": "version",
  "state": "pending_acceptance",
  "accepted_by": "accepted by",
  "accepted_at": "2026-11-19T09:30:00Z",
  "applied_at": "2026-11-19T09:30:00Z",
  "detached_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z"
}

Detach organization template adoption

Logs

DELETE /tenant/organization-templates/{templateID}

Detach the account from a shared template while keeping copied settings

Moves an active adoption to detached and records the time, so later versions of the template are no longer tied to this tenant. Only a tenant owner can call it (403 otherwise); 404 when the tenant has no adoption of that template and 409 when the adoption is not active. The action is written to the organization's audit trail.

Parameters

templateIDstring · path · required

ID of the organization template whose adoption is detached.

Returns

200 Adoption detached; copied account settings are retained

Show attributes
idstring · required
template_idstring · required
organization_idstring · required
tenant_idstring · required
versionstring · required
statestring · required

one of pending_acceptance, active, detached

accepted_bystring · optional
accepted_atstring (date-time) · optional
applied_atstring (date-time) · optional
detached_atstring (date-time) · optional
created_atstring (date-time) · required

Errors 403 · 404

Permissions business:organization:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X DELETE "$BUSINESS_API/tenant/organization-templates/{templateID}" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "id": "org_27V0IXXc4PdUU9dGwVzoc5xWqTd",
  "template_id": "tem_2wwLTWQZrCq3poE3JiMXbI6xTEk",
  "organization_id": "org_2ZNeUPlw01Za6RbKMZDGGbR4cV5",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "version": "version",
  "state": "pending_acceptance",
  "accepted_by": "accepted by",
  "accepted_at": "2026-11-19T09:30:00Z",
  "applied_at": "2026-11-19T09:30:00Z",
  "detached_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z"
}

Get pending organization link consents

Logs

GET /tenant/organization-links/pending

List organization link requests awaiting this tenant owner's consent

Returns the requests from organizations to link this tenant that are still waiting for a decision, so an owner can approve or reject them. Only a utility staff member holding the owner role can call it; anyone else receives 403.

Returns

200 Pending organization link requests for the authenticated tenant

Show attributes
idstring · required
organization_idstring · required
tenant_idstring · required
tenant_namestring · optional
tenant_slugstring · optional
statestring · required

one of pending_consent, active, removal_pending, removed, owned

consent_approved_bystring · required
consent_approved_atstring (date-time) · optional
added_bystring · required
notice_period_untilstring (date-time) · optional
grantsobject · required

Errors 403

Permissions business:organization:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X GET "$BUSINESS_API/tenant/organization-links/pending" \
  -H "Authorization: Bearer sk_test_..."
Response 200
[
  {
    "id": "org_2BfeY3PegjBaQbr8EdxWUjNy4BN",
    "organization_id": "org_2ZNeUPlw01Za6RbKMZDGGbR4cV5",
    "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
    "tenant_name": "Ana Matsinhe",
    "tenant_slug": "tenant slug",
    "state": "pending_consent",
    "consent_approved_by": "consent approved by",
    "consent_approved_at": "2026-11-19T09:30:00Z",
    "added_by": "added by",
    "notice_period_until": "2026-11-19T09:30:00Z",
    "grants": {
      "key": [
        "value"
      ]
    }
  }
]

Get tenant configuration for the authenticated utility

Logs

GET /tenant

Returns the caller's tenant record: ID, slug, name, status, kind, workspace state, country, locale, currency and timezone, the owning organization, and any template or closure dates. Requires business:organization:read.

Returns

200 Tenant configuration

Show attributes
idstring · required
owner_organization_idstring · required
slugstring · required
namestring · required
statusstring · required

one of provisioning, active, suspended, closed

kindstring · required

one of live, sandbox

workspace_statestring · required

one of sandbox_only, unverified, verifying, live, restricted, suspended, closed, sandbox

parent_tenant_idstring · optional
copied_from_tenant_idstring · optional
template_keystring · optional
closed_atstring · optional · nullable
deletion_due_atstring · optional · nullable
country_codestring · optional
localestring · required
currencystring · required
timezonestring · required

Permissions business:organization:read · Roles: admin, analyst, billing_clerk, customer_service, field_reader, field_supervisor, finance, operations, owner, viewer

curl -X GET "$BUSINESS_API/tenant" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "owner_organization_id": "own_2Hj8Qbz4glBOQR5aWPneq1JWux7",
  "slug": "slug",
  "name": "Ana Matsinhe",
  "status": "provisioning",
  "kind": "live",
  "workspace_state": "sandbox_only",
  "parent_tenant_id": "par_21NQMtrA6ldIklFucB3eoRxCqDB",
  "copied_from_tenant_id": "cop_2sEl3AsnbMmfvSknXeeX3YMH7WK",
  "template_key": "template key",
  "closed_at": "2026-11-19T09:30:00Z",
  "deletion_due_at": "2026-11-19T09:30:00Z",
  "country_code": "MZ",
  "locale": "pt",
  "currency": "MZN",
  "timezone": "Africa/Maputo"
}