Skip to content
Start here

List user tenants

GET/user/tenants

Lists the Cloudflare tenants in which the authenticated user has direct membership using the legacy Tenant response shape. Use GET /organizations to list Organizations the user can access, including through hierarchy, using the modern Organization response shape.

Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ReturnsExpand Collapse
errors: array of unknown
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: array of object { cdate, customer_id, edate, 10 more }
cdate: string
formatdate-time
customer_id: string
edate: string
formatdate-time
tenant_contacts: object { email, website }
email: optional string
website: optional string
tenant_labels: array of string
tenant_metadata: object { billing_account_type, configuration_account, created_by, 4 more }
billing_account_type: optional string
configuration_account: optional string
created_by: optional string
dns: optional object { ns_pool }
ns_pool: object { primary, secondary }
primary: string
secondary: string
flags: optional map[string]
innate_account_entitlements: optional array of object { allocation, feature }
allocation: object { type, value }
type: string
value: boolean or number or string or 2 more
One of the following:
boolean
number
string
map[unknown]
array of unknown
feature: object { key }
key: string
tenant_entitlements: optional array of object { allocation, feature }
allocation: object { type, value }
type: string
value: boolean or number or string or 2 more
One of the following:
boolean
number
string
map[unknown]
array of unknown
feature: object { key }
key: string
tenant_name: string
tenant_network: object { choices }
choices: optional map[unknown]
tenant_status: string
tenant_tag: string
tenant_type: string
tenant_units: array of object { unit_memberships, unit_metadata, unit_name, 2 more }
unit_memberships: array of object { member_metadata, member_status, member_tag }
member_metadata: unknown
member_status: string
member_tag: string
unit_metadata: unknown
unit_name: string
unit_status: string
unit_tag: string
ui_flags: object { show_orgs_ui, show_tenants_ui }

Which top-level dashboard experiences to render for this tenant; both may be true.

show_orgs_ui: boolean

Render the Organizations experience for this tenant.

show_tenants_ui: boolean

Render the legacy Tenants experience for this tenant.

success: true

List user tenants

curl https://api.cloudflare.com/client/v4/user/tenants \
    -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    -H "X-Auth-Key: $CLOUDFLARE_API_KEY"
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "cdate": "2019-12-27T18:11:19.117Z",
      "customer_id": "customer_id",
      "edate": "2019-12-27T18:11:19.117Z",
      "tenant_contacts": {
        "email": "email",
        "website": "website"
      },
      "tenant_labels": [
        "string"
      ],
      "tenant_metadata": {
        "billing_account_type": "billing_account_type",
        "configuration_account": "configuration_account",
        "created_by": "created_by",
        "dns": {
          "ns_pool": {
            "primary": "primary",
            "secondary": "secondary"
          }
        },
        "flags": {
          "foo": "string"
        },
        "innate_account_entitlements": [
          {
            "allocation": {
              "type": "type",
              "value": true
            },
            "feature": {
              "key": "key"
            }
          }
        ],
        "tenant_entitlements": [
          {
            "allocation": {
              "type": "type",
              "value": true
            },
            "feature": {
              "key": "key"
            }
          }
        ]
      },
      "tenant_name": "tenant_name",
      "tenant_network": {
        "choices": {
          "foo": {}
        }
      },
      "tenant_status": "tenant_status",
      "tenant_tag": "tenant_tag",
      "tenant_type": "tenant_type",
      "tenant_units": [
        {
          "unit_memberships": [
            {
              "member_metadata": {},
              "member_status": "member_status",
              "member_tag": "member_tag"
            }
          ],
          "unit_metadata": {},
          "unit_name": "unit_name",
          "unit_status": "unit_status",
          "unit_tag": "unit_tag"
        }
      ],
      "ui_flags": {
        "show_orgs_ui": true,
        "show_tenants_ui": true
      }
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "cdate": "2019-12-27T18:11:19.117Z",
      "customer_id": "customer_id",
      "edate": "2019-12-27T18:11:19.117Z",
      "tenant_contacts": {
        "email": "email",
        "website": "website"
      },
      "tenant_labels": [
        "string"
      ],
      "tenant_metadata": {
        "billing_account_type": "billing_account_type",
        "configuration_account": "configuration_account",
        "created_by": "created_by",
        "dns": {
          "ns_pool": {
            "primary": "primary",
            "secondary": "secondary"
          }
        },
        "flags": {
          "foo": "string"
        },
        "innate_account_entitlements": [
          {
            "allocation": {
              "type": "type",
              "value": true
            },
            "feature": {
              "key": "key"
            }
          }
        ],
        "tenant_entitlements": [
          {
            "allocation": {
              "type": "type",
              "value": true
            },
            "feature": {
              "key": "key"
            }
          }
        ]
      },
      "tenant_name": "tenant_name",
      "tenant_network": {
        "choices": {
          "foo": {}
        }
      },
      "tenant_status": "tenant_status",
      "tenant_tag": "tenant_tag",
      "tenant_type": "tenant_type",
      "tenant_units": [
        {
          "unit_memberships": [
            {
              "member_metadata": {},
              "member_status": "member_status",
              "member_tag": "member_tag"
            }
          ],
          "unit_metadata": {},
          "unit_name": "unit_name",
          "unit_status": "unit_status",
          "unit_tag": "unit_tag"
        }
      ],
      "ui_flags": {
        "show_orgs_ui": true,
        "show_tenants_ui": true
      }
    }
  ],
  "success": true
}