Skip to content

List an organization's tenants.

Method

GET https://papi.afi.ai/api/v1/orgs/{org_id}/tenants

Description

Lists tenants for the specified organization ID. Use the limit and page_token query parameters to paginate through tenants.

Path params
org_id string required

ID of the organization whose tenants to list.

Query params
limit int32

Maximum number of items to return per page (default 100).

page_token string

Token from the previous list operation (`next_page_token`) used to continue listing.

curl -X GET \
    -H 'Authorization: {api-key}' \
    https://papi.afi.ai/api/v1/orgs/{org_id}/tenants

Successful response (200) schema
object

TenantsPage contains the results of listing organization tenants.

next_page_token string

Token for the next page in the listing operation. Set this value as `page_token` in the subsequent request. Empty on the last page.

items array of objects

List of tenants.

object

Tenant describes a single tenant.

id string

Unique ID of the tenant.

external_id string

External (Google Workspace, Microsoft 365, etc.) ID of the tenant.

kind string

Tenant kind (`gsuite` for Google Workspace, `o365` for Microsoft 365, etc.).

name string

Tenant name. For Google Workspace and Microsoft 365 tenants, this is typically the domain name.

region string

Region where the tenant resides. Two-letter country or territory code in accordance with ISO 3166-1 alpha-2 (for example, US, CA, AU, UK, EU).

deleted boolean

True if the tenant has been terminated and can no longer be queried. Deleted tenant subscriptions use the `canceled` state.

Response example
{
  "next_page_token": "string",
  "items": [
    {
      "id": "string",
      "external_id": "string",
      "kind": "string",
      "name": "string",
      "region": "string",
      "deleted": true
    }
  ]
}