Skip to content
Start here

List tenant entitlements

client.tenants.entitlements.get(stringtenantId, RequestOptionsoptions?): TenantEntitlements { allow_add_subdomain, allow_auto_accept_invites, cname_setup_allowed, 3 more }
GET/tenants/{tenant_id}/entitlements

List of innate entitlements available for the Tenant.

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
ParametersExpand Collapse
tenantId: string
ReturnsExpand Collapse
TenantEntitlements { allow_add_subdomain, allow_auto_accept_invites, cname_setup_allowed, 3 more }
allow_add_subdomain: AllowAddSubdomain { type, value }
type: "bool"
value: boolean
allow_auto_accept_invites: AllowAutoAcceptInvites { type, value }
type: "bool"
value: boolean
cname_setup_allowed: CNAMESetupAllowed { type, value }
type: "bool"
value: boolean
custom_entitlements: Array<CustomEntitlement> | null
allocation: OrganizationsAPIMaxCountAllocation { type, value } | OrganizationsAPIBoolAllocation { type, value } | OrganizationsAPINullAllocation { type, value }
One of the following:
OrganizationsAPIMaxCountAllocation { type, value }
type: "max_count"
value: number
OrganizationsAPIBoolAllocation { type, value }
type: "bool"
value: boolean
OrganizationsAPINullAllocation { type, value }
type: ""
value?: unknown
feature: Feature { key }
key: string
mhs_certificate_count: MhsCertificateCount { type, value }
type: "max_count"
value: number
partial_setup_allowed: PartialSetupAllowed { type, value }
type: "bool"
value: boolean

List tenant entitlements

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const tenantEntitlements = await client.tenants.entitlements.get('tenant_id');

console.log(tenantEntitlements.allow_add_subdomain);
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "allow_add_subdomain": {
      "type": "bool",
      "value": true
    },
    "allow_auto_accept_invites": {
      "type": "bool",
      "value": true
    },
    "cname_setup_allowed": {
      "type": "bool",
      "value": true
    },
    "custom_entitlements": [
      {
        "allocation": {
          "type": "max_count",
          "value": 0
        },
        "feature": {
          "key": "key"
        }
      }
    ],
    "mhs_certificate_count": {
      "type": "max_count",
      "value": 0
    },
    "partial_setup_allowed": {
      "type": "bool",
      "value": true
    }
  },
  "success": true
}
Returns Examples
{
  "errors": [],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "allow_add_subdomain": {
      "type": "bool",
      "value": true
    },
    "allow_auto_accept_invites": {
      "type": "bool",
      "value": true
    },
    "cname_setup_allowed": {
      "type": "bool",
      "value": true
    },
    "custom_entitlements": [
      {
        "allocation": {
          "type": "max_count",
          "value": 0
        },
        "feature": {
          "key": "key"
        }
      }
    ],
    "mhs_certificate_count": {
      "type": "max_count",
      "value": 0
    },
    "partial_setup_allowed": {
      "type": "bool",
      "value": true
    }
  },
  "success": true
}