---
title: Cloudflare Tenant
description: The Cloudflare Tenant API is a provisioning mechanism to help Channel and Alliance partners set up and manage Cloudflare accounts and services for their customers.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/index.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Cloudflare Tenant

The Cloudflare Tenant API is a provisioning mechanism to help Channel and Alliance partners set up and manage Cloudflare accounts and services for their customers.

These APIs are built into our Client v4 API library to provide a streamlined onboarding and setup experience.

## Available resources

As you dive into the Tenant API, take advantage of the following resources:

* [Tenant structure](https://developers.cloudflare.com/tenant/structure/) explains some basic ideas behind the Tenant API and how it works.
* [Get started](https://developers.cloudflare.com/tenant/get-started/) provides the quickest path to get your customer accounts up and running.
* [How to](https://developers.cloudflare.com/tenant/how-to/) offers step-by-step instructions for specific tasks.
* [Reference topics](https://developers.cloudflare.com/tenant/reference/) contains detailed information about the Tenant API, including a list of available zone and account-level subscriptions.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}}]}
```

---

---
title: Tenant structure
description: Cloudflare helps Channel and Alliance partners manage their and their customers' accounts through a Tenant structure.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/structure.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Tenant structure

Cloudflare helps Channel and Alliance partners manage their and their customers' accounts through a Tenant structure.

![Partner accounts contain a tenant, which is a container for customer accounts and zones. For more details, keep reading.](https://developers.cloudflare.com/_astro/tenant-diagram.D0Hfc9bM_Z2lMoX4.webp) 

## Tenants and Tenant admins

A **Tenant** is a special type of Cloudflare account that contains other accounts and resources.

Once you sign a partner agreement with Cloudflare, we create a special Tenant account and then add your user to that account as a **Tenant admin**. Cloudflare can add multiple users as Tenant admins upon request.

Tenant admins then become the default [**Super administrator(s)**](https://developers.cloudflare.com/fundamentals/manage-members/roles/) for all accounts and zones contained within the Tenant.

This means that each Tenant admin's user API key can be used to provision accounts based on the catalog specified in your partner agreement.

If needed, you can also [create additional **Super administrators**](https://developers.cloudflare.com/fundamentals/manage-members/manage/).

## Accounts, users, and resources

This Tenant structure gives your account streamlined administrative access to customer:

* Accounts[1](#user-content-fn-1)
* Users[2](#user-content-fn-2)
* Resources[3](#user-content-fn-3)

At the same time, this structure keeps your customers' data and settings separate from each other.

## Footnotes

1. An entity that contains various settings, users, and resources (zones, Zero Trust applications, Workers).  
[↩](#user-content-fnref-1)
2. A member of a Cloudflare account with their own user profile and [an associated role](https://developers.cloudflare.com/fundamentals/manage-members/roles/) that specifies their privileges within that account.  
[↩](#user-content-fnref-2)
3. A resource is an entity owned by an account, which could be a zone/domain, a Workers instance, or a Zero Trust application.  
[↩](#user-content-fnref-3)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/structure/","name":"Tenant structure"}}]}
```

---

---
title: Get started
description: Having access to Cloudflare’s provisioning capabilities allows you to more easily create and manage Cloudflare accounts. The following steps will get you started on making API calls to provision accounts, users, and services.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/get-started.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Get started

Having access to Cloudflare’s provisioning capabilities allows you to more easily create and manage Cloudflare accounts. The following steps will get you started on making API calls to provision accounts, users, and services.

## Before you begin

### Channel and Alliance partner account setup

Before using the Tenant API, you need to [create an account](https://developers.cloudflare.com/fundamentals/account/create-account/), [verify your email address](https://developers.cloudflare.com/fundamentals/user-profiles/verify-email-address/), and [add your billing information](https://developers.cloudflare.com/billing/create-billing-profile/).

After you sign your partner agreement with Cloudflare, Cloudflare will add [certain entitlements](https://developers.cloudflare.com/tenant/structure/) to your account that allow you to provision and manage custom accounts. If you have signed your partner agreement and your account has not yet been enabled, MSP partners should contact `partners@cloudflare.com` and Agency Partners should contact `agency@cloudflare.com`.

### API access

You also need to [retrieve your API key](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#view-your-global-api-key) to authenticate your requests to the Tenant API.

For more details on using the Cloudflare API, refer to our [API overview](https://developers.cloudflare.com/fundamentals/api/).

## Step 1 - Create an account

Each customer or team that uses Cloudflare should have their own account. This ensures proper security and access of resources. Each account acts as a container of zones and other resources. Depending on your needs, you may even provision multiple accounts for a single customer or team.

When you create an account with the Tenant API, your Cloudflare user owns that account from creation, ongoing management, and finally deletion.

* [ Dashboard ](#tab-panel-6662)
* [ API ](#tab-panel-6663)

To create an account under your tenant using the dashboard:

1. Log into the [Cloudflare dashboard ↗](https://dash.cloudflare.com).
2. Go to **Tenants** \> **Managed Accounts**.
3. Select **Create Account**.
4. Enter the **Account Name**, **Account Description**, and **Tenant Unit**.
5. Choose the appropriate account subscription.
6. Select **Add Account**.

To create an account using the API, make a `POST` request to the `/accounts` endpoint and include the following values:

* `name` string  
   * The name of the account that is displayed in the Cloudflare dashboard.
* `type` enum  
   * Valid values are `standard` (default) and `enterprise`. For self-serve customers, use `standard`. For enterprise customers, use `enterprise`.
* `unit` object  
   * Information related to the tenant unit.  
   * `id` string  
         * (optional) ID of the unit to create this account on. Needs to be specified if user administers multiple tenants. Unit ID is the `unit_tag` from your [tenant details](https://developers.cloudflare.com/tenant/how-to/get-tenant-details/).

### Know-Your-Customer (optional)

All KYC parameters are text fields, have a 120 character limit, and are optional unless enforced by the Tenant.

* `business_name` string  
   * (optional) The name of the business associated with this account.
* `business_address` string  
   * (optional) The address of the business associated with this account.
* `business_email` string  
   * (optional) The email of the business associated with this account.
* `business_phone` string  
   * (optional) The phone number of the business associated with this account.
* `external_metadata` string  
   * (optional) External metadata for this account.

Request

```

curl "https://api.cloudflare.com/client/v4/accounts" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "<ACCOUNT_NAME>",

  "type": "standard"

}'


```

A successful request will return an HTTP status of `200` and the following response body:

Response

```

{

  "result": {

    "id": "2bab6ace8c72ed3f09b9eca6db1396bb",

    "name": "<ACCOUNT_NAME>",

    "type": "standard",

    "settings": {

      "enforce_twofactor": false

    }

  },

  "success": true,

  "errors": [],

  "messages": []

}


```

A request with a unit ID:

Request

```

curl "https://api.cloudflare.com/client/v4/accounts" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "<ACCOUNT_NAME>",

  "type": "standard",

  "unit": {

    "id": "1a2b3c4d5e6f7g8h"

  }

}'


```

A request with a unit ID and KYC:

Request

```

curl "https://api.cloudflare.com/client/v4/accounts" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "<ACCOUNT_NAME>",

  "type": "standard",

  "business_name": "Cloudflare",

  "business_email": "email@business.com",

  "business_address": "San Francisco",

  "business_phone": "1234567890",

  "external_metadata": "{'\''testKey'\'': '\''testValue'\''}",

  "unit": {

    "id": "1a2b3c4d5e6f7g8h"

  }

}'


```

## Step 2 - Grant user access

Now that you have created an account, you need to either give your customer direct access to Cloudflare or build an interface for them to interact with.

The first method gives customers control over all aspects of Cloudflare, while the latter allows you to integrate your customer's Cloudflare experience into a dashboard that you control and that they may already be familiar with.

### Option 1 - Direct access to Cloudflare

When you grant user access to an account, Cloudflare will send an invitation to the user so they can get access to the account. If they do not already have a Cloudflare user, Cloudflare will take them through the process of creating one. Once created, they will be given access to the account and any zones already created.

#### Using the dashboard

If you want to give customers access to their individual accounts, it is the same as if you were [inviting a teammate](https://developers.cloudflare.com/fundamentals/manage-members/manage/#add-account-members) to help manage your account.

#### Using the API

You can also grant access to the Cloudflare dashboard by using the API.

Request

```

curl 'https://api.cloudflare.com/client/v4/accounts/<CUSTOMER_ACCOUNT_ID>/members' \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "email": "<CUSTOMER_EMAIL>",

  "roles": ["<USER_ROLE>"]

}'


```

In most cases, you will want to create new users with a role of `Administrator` which always has the ID `05784afa30c1afe1440e79d9351c7430`.

If your customer is on an Enterprise plan, they have access to a broader set of user roles. To get a full list of available roles, send a [GET](https://developers.cloudflare.com/api/resources/accounts/subresources/roles/methods/list/) request to the API.

### Option 2 - Access via an interface

If you want greater control over how customers use Cloudflare or if you want your customers to use an existing dashboard of yours that they already know, use the Cloudflare API to build this experience.

This means that you will be making API calls to Cloudflare on behalf of your customers. To avoid getting [rate limited](https://developers.cloudflare.com/fundamentals/api/reference/limits/) by our API, Cloudflare recommend that you create accounts and users for each of your customers. Changes made by customer `A` should go through user `A` and changes made by customer `B` should go through user `B`.

Note

This capability is not enabled by default. If you need this functionality, contact [Cloudflare Support](https://developers.cloudflare.com/support/contacting-cloudflare-support/).

To grant access via an interface, you need to create a service user, as no one will log in to the dashboard with them. If you are planning to use this method, Cloudflare will enable you to see the API key in order to make API calls as this user.

Request

```

curl "https://api.cloudflare.com/client/v4/users" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "email": "<ID@example.com>"

}'


```

Response

```

{

  "result": {

    "id": "60758bd48392a06215ae817bc35084b6",

    "email": "<ID@example.com>",

    "first_name": null,

    "last_name": null,

    "username": "17bd2796b374cec14976ac3bced85c05",

    "telephone": null,

    "country": null,

    "created_on": "2019-02-21T23:20:28.645256Z",

    "modified_on": "2019-02-21T23:20:28.645256Z",

    "two_factor_authentication": {

      "enabled": false,

      "locked": false

    },

    "api_key": "xxx"

  },

  "success": true,

  "errors": [],

  "messages": []

}


```

## Step 3 - Create a zone

Now that you have a customer account and customer users (or service users), you need to create a zone.

To do this, send a [POST](https://developers.cloudflare.com/api/resources/zones/methods/create/) request to the `/zones` endpoint (including the customer account ID you received in [Step 1](#step-1---create-an-account)).

Request

```

curl "https://api.cloudflare.com/client/v4/zones" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "example.com",

  "account": {

    "id": "<CUSTOMER_ACCOUNT_ID>"

  }

}'


```

## Step 4 - Create a zone plan subscription

Now that you have a zone provisioned for the customer, you can add the appropriate zone plan based on your reseller agreement.

To create a zone subscription, typically used to upgrade a zone's plan from `PARTNERS_FREE` to a paid [Zone plan](https://developers.cloudflare.com/tenant/reference/subscriptions/#zone-plans), send a [POST](https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/create/) request to the `/zones/{zone_id}/subscription` endpoint and include the following values:

* `rate_plan` object  
   * Contains the zone plan corresponding to what customers would order in the dashboard. For a list of available values, refer to [Zone subscriptions](https://developers.cloudflare.com/tenant/reference/subscriptions/#zone-plans).
* `component_values` array  
   * Additional services depending on your reseller agreement, such as additional `page_rules`.
* `frequency` string  
   * How often the subscription is renewed automatically (defaults to `"monthly"`).

Request (without \`component\_values\`)

```

curl 'https://api.cloudflare.com/client/v4/zones/{zone_id}/subscription' \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{

  "rate_plan": {

    "id": "<RATE_PLAN>"

  },

  "frequency": "annual"

}'


```

Request (with \`component\_values\`)

```

curl 'https://api.cloudflare.com/client/v4/zones/{zone_id}/subscription' \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{

  "rate_plan": {

    "id": "PARTNERS_BIZ"

  },

  "component_values": [

    {

      "name": "page_rules",

      "value": 50

    }

  ]

}


```

## Step 5 - Create other subscriptions

Depending on your agreement, you may be allowed to resell other add-on services. These are provisioned as account-level subscriptions.

To create an account subscription, send a [POST](https://developers.cloudflare.com/api/resources/accounts/subresources/subscriptions/methods/create/) request to the `/accounts/{account_id}/subscriptions` endpoint and include the following values:

* `rate_plan` object  
   * Contains the account subscription corresponding to a specific add-on service. For a list of available values, refer to [Available subscriptions](https://developers.cloudflare.com/tenant/reference/subscriptions/).
* `component_values` array  
   * Additional services depending on your reseller agreement, such as additional endpoints for load balancing or additional seats for Cloudflare Zero Trust. If not included, the subscription includes the default values associated with each purchase.
* `frequency` string  
   * How often the subscription is renewed automatically (defaults to `"monthly"`).

Request

```

curl 'https://api.cloudflare.com/client/v4/accounts/{account_id}/subscriptions' \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{

  "rate_plan": {

    "id": "<RATE_PLAN_NAME>"

  }

}'


```

## Step 6 - Configure zone and services

Once you have added the necessary subscriptions, you or your customer can move on to configuring various services and fine-tuning account and zone settings.

Configuration can be done by anyone with access to the account (as well as the correct user permissions). This process does not differ from configuring any other Cloudflare account. For additional guidance, refer to our [Product docs](https://developers.cloudflare.com/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/get-started/","name":"Get started"}}]}
```

---

---
title: Glossary
description: The following terms are used throughout the Tenant API docs. For more details on how these concepts interact with each other, refer to Tenant structure.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/glossary.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Glossary

The following terms are used throughout the Tenant API docs. For more details on how these concepts interact with each other, refer to [Tenant structure](https://developers.cloudflare.com/tenant/structure/).

## Tenant

A **Tenant** is a special type of Cloudflare account that contains other accounts and resources.

## Tenant admin

Once you sign a partner agreement with Cloudflare, we create a special Tenant account and then add your user to that account as a **Tenant admin**. Cloudflare can add multiple users as Tenant admins upon request.

Tenant admins then become the default [**Super administrator(s)**](https://developers.cloudflare.com/fundamentals/manage-members/roles/) for all accounts and zones contained within the Tenant.

This means that each Tenant admin's user API key can be used to provision accounts based on the catalog specified in your partner agreement.

If needed, you can also [create additional **Super administrators**](https://developers.cloudflare.com/fundamentals/manage-members/manage/).

## Account

An entity that contains various settings, users, and resources (zones, Zero Trust applications, Workers).

## User

A member of a Cloudflare account with their own user profile and [an associated role](https://developers.cloudflare.com/fundamentals/manage-members/roles/) that specifies their privileges within that account.

## Resource

A resource is an entity owned by an account, which could be a zone/domain, a Workers instance, or a Zero Trust application.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/glossary/","name":"Glossary"}}]}
```

---

---
title: Get account details
description: An Account will contain various settings, resources, and subscriptions to products for users. Each Tenant can have multiple associated accounts.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/how-to/get-account-details.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Get account details

An [**Account**](https://developers.cloudflare.com/tenant/glossary/#account) will contain various settings, resources, and subscriptions to products for users. Each Tenant can have multiple associated accounts.

To retrieve a list of accounts associated with a Tenant details, send a `GET` request to the `/tenants/{tenant_id}/accounts` endpoint. You can find the Tenant tag and all Tenants associated with the user with the [**Tenant Details**](https://developers.cloudflare.com/tenant/how-to/get-tenant-details/) API. The Tenant Accounts API also requires pagination passed as query parameters:

* `page` number  
   * Page number of accounts list response, indexed from 1
* `per_page` number  
   * Number of accounts to display per page
* `order` string  
   * (optional) Order by a specific column, has to be a valid top-level key from the response  
   * `direction` number  
         * (optional) 0 for ascending or 1 for descending, is 0 by default

Request

```

curl "https://api.cloudflare.com/client/v4/tenants/{tenant_id}/accounts?page=1&per_page=10" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>"


```

A successful request will return an HTTP status of `200` and a response body containing account information and feature flags for all accounts managed by the Tenant.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/tenant/how-to/get-account-details/","name":"Get account details"}}]}
```

---

---
title: Get tenant details
description: A Tenant Admin's unit and membership details will be used for access of resources and all Tenant operations on the API. The unit ID (unit_tag), for example, can be used to create an account on a specific unit.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/how-to/get-tenant-details.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Get tenant details

A [**Tenant Admin**](https://developers.cloudflare.com/tenant/glossary/#tenant-admin)'s unit and membership details will be used for access of resources and all Tenant operations on the API. The unit ID (`unit_tag`), for example, can be used to create an account on a specific unit.

This is especially useful when a Tenant Admin has multiple units and wants to create an account on a specific unit. All accounts created are associated with the units, each of which can have one or more memberships.

To retrieve tenant details, send a `GET` request to the `/user/tenants` endpoint:

Request

```

curl "https://api.cloudflare.com/client/v4/user/tenants" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>"


```

A successful request will return an HTTP status of `200` and a response body containing tenant information, unit information, memberships, and tenant entitlements for all tenants administered by the user.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/tenant/how-to/get-tenant-details/","name":"Get tenant details"}}]}
```

---

---
title: Manage accounts
description: Each customer or team that uses Cloudflare should have their own account. This ensures proper security and access of resources. Each account acts as a container of zones and other resources. Depending on your needs, you may even provision multiple accounts for a single customer or team.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/how-to/manage-accounts.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Manage accounts

Each customer or team that uses Cloudflare should have their own account. This ensures proper security and access of resources. Each account acts as a container of zones and other resources. Depending on your needs, you may even provision multiple accounts for a single customer or team.

When you create an account with the Tenant API, your Cloudflare user owns that account from creation, ongoing management, and finally deletion.

## Create account

Each customer or team that uses Cloudflare should have their own account. This ensures proper security and access of resources. Each account acts as a container of zones and other resources. Depending on your needs, you may even provision multiple accounts for a single customer or team.

When you create an account with the Tenant API, your Cloudflare user owns that account from creation, ongoing management, and finally deletion.

* [ Dashboard ](#tab-panel-6666)
* [ API ](#tab-panel-6667)

To create an account under your tenant using the dashboard:

1. Log into the [Cloudflare dashboard ↗](https://dash.cloudflare.com).
2. Go to **Tenants** \> **Managed Accounts**.
3. Select **Create Account**.
4. Enter the **Account Name**, **Account Description**, and **Tenant Unit**.
5. Choose the appropriate account subscription.
6. Select **Add Account**.

To create an account using the API, make a `POST` request to the `/accounts` endpoint and include the following values:

* `name` string  
   * The name of the account that is displayed in the Cloudflare dashboard.
* `type` enum  
   * Valid values are `standard` (default) and `enterprise`. For self-serve customers, use `standard`. For enterprise customers, use `enterprise`.
* `unit` object  
   * Information related to the tenant unit.  
   * `id` string  
         * (optional) ID of the unit to create this account on. Needs to be specified if user administers multiple tenants. Unit ID is the `unit_tag` from your [tenant details](https://developers.cloudflare.com/tenant/how-to/get-tenant-details/).

### Know-Your-Customer (optional)

All KYC parameters are text fields, have a 120 character limit, and are optional unless enforced by the Tenant.

* `business_name` string  
   * (optional) The name of the business associated with this account.
* `business_address` string  
   * (optional) The address of the business associated with this account.
* `business_email` string  
   * (optional) The email of the business associated with this account.
* `business_phone` string  
   * (optional) The phone number of the business associated with this account.
* `external_metadata` string  
   * (optional) External metadata for this account.

Request

```

curl "https://api.cloudflare.com/client/v4/accounts" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "<ACCOUNT_NAME>",

  "type": "standard"

}'


```

A successful request will return an HTTP status of `200` and the following response body:

Response

```

{

  "result": {

    "id": "2bab6ace8c72ed3f09b9eca6db1396bb",

    "name": "<ACCOUNT_NAME>",

    "type": "standard",

    "settings": {

      "enforce_twofactor": false

    }

  },

  "success": true,

  "errors": [],

  "messages": []

}


```

A request with a unit ID:

Request

```

curl "https://api.cloudflare.com/client/v4/accounts" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "<ACCOUNT_NAME>",

  "type": "standard",

  "unit": {

    "id": "1a2b3c4d5e6f7g8h"

  }

}'


```

A request with a unit ID and KYC:

Request

```

curl "https://api.cloudflare.com/client/v4/accounts" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "<ACCOUNT_NAME>",

  "type": "standard",

  "business_name": "Cloudflare",

  "business_email": "email@business.com",

  "business_address": "San Francisco",

  "business_phone": "1234567890",

  "external_metadata": "{'\''testKey'\'': '\''testValue'\''}",

  "unit": {

    "id": "1a2b3c4d5e6f7g8h"

  }

}'


```

## View accounts

When you create an account with the Tenant API, your Cloudflare user owns that account from creation, ongoing management, and finally deletion.

* [ Dashboard ](#tab-panel-6664)
* [ API ](#tab-panel-6665)

To view any accounts owned by your tenant using the dashboard:

1. Log into the [Cloudflare dashboard ↗](https://dash.cloudflare.com).
2. Go to **Tenants** \> **Managed Accounts**.

To fetch any accounts owned by your tenant using the API, send a [GET](https://developers.cloudflare.com/api/resources/accounts/methods/list/) request to the `/accounts` endpoint.

You will get back a list of all the accounts you have created plus any accounts your user already had access to.

Request

```

curl https://api.cloudflare.com/client/v4/accounts \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>"


```

Response

```

{

  "result": [

    {

      "id": "a34bd6cc645a31486aa2ef71f1b9afb6",

      "name": "My Personal Account",

      "settings": {

        "enforce_twofactor": false

      }

    },

    {

      "id": "1b16db169c9cb7853009857198fae1b9",

      "name": "Created Account",

      "settings": {

        "enforce_twofactor": false

      }

    }

  ],

  "result_info": {

    "page": 1,

    "per_page": 20,

    "total_pages": 1,

    "count": 2,

    "total_count": 2

  },

  "success": true,

  "errors": [],

  "messages": []

}


```

## Update account

To update an account, send a [PUT](https://developers.cloudflare.com/api/resources/accounts/methods/update/) request to the `/accounts/{account_id}` endpoint.

## Delete account

To delete an account you have created, send a `DELETE` request to the `/accounts/{account_id}` endpoint.

Account deletion is permanent and will delete any zones or other resources under the account.

Request

```

curl --request DELETE \

https://api.cloudflare.com/client/v4/accounts/{account_id} \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>"


```

A successful request will return the id to confirm the operation:

Response

```

{

  "result": {

    "id": "1b16db169c9cb7853009857198fae1b9"

  },

  "success": true,

  "errors": [],

  "messages": []

}


```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/tenant/how-to/manage-accounts/","name":"Manage accounts"}}]}
```

---

---
title: Manage subscriptions
description: Once your customer has a zone provisioned, you can add zone and account-level subscriptions.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/how-to/manage-subscriptions.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Manage subscriptions

Once your customer has a zone provisioned, you can add zone and account-level subscriptions.

## Zone subscriptions

### Create zone subscription

To create a zone subscription, typically used to upgrade a zone's plan from `PARTNERS_FREE` to a paid [Zone plan](https://developers.cloudflare.com/tenant/reference/subscriptions/#zone-plans), send a [POST](https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/create/) request to the `/zones/{zone_id}/subscription` endpoint and include the following values:

* `rate_plan` object  
   * Contains the zone plan corresponding to what customers would order in the dashboard. For a list of available values, refer to [Zone subscriptions](https://developers.cloudflare.com/tenant/reference/subscriptions/#zone-plans).
* `component_values` array  
   * Additional services depending on your reseller agreement, such as additional `page_rules`.
* `frequency` string  
   * How often the subscription is renewed automatically (defaults to `"monthly"`).

Request (without \`component\_values\`)

```

curl 'https://api.cloudflare.com/client/v4/zones/{zone_id}/subscription' \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{

  "rate_plan": {

    "id": "<RATE_PLAN>"

  },

  "frequency": "annual"

}'


```

Request (with \`component\_values\`)

```

curl 'https://api.cloudflare.com/client/v4/zones/{zone_id}/subscription' \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{

  "rate_plan": {

    "id": "PARTNERS_BIZ"

  },

  "component_values": [

    {

      "name": "page_rules",

      "value": 50

    }

  ]

}


```

### Get zone subscription details

To get the details of a zone subscription, send a [GET](https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/get/) request to the `/zones/<ZONE_ID>/subscription` endpoint.

### Update zone subscription

To update a subscription on a zone, typically used to update an existing subscription's 'component\_values' or to downgrade a zone's subscription, send a [PUT](https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/update/) request to the `/zones/<ZONE_ID>/subscription` endpoint.

---

## Account subscriptions

Depending on your agreement, you may be allowed to resell other add-on services. These are provisioned as account-level subscriptions.

### Create account subscription

To create an account subscription, send a [POST](https://developers.cloudflare.com/api/resources/accounts/subresources/subscriptions/methods/create/) request to the `/accounts/{account_id}/subscriptions` endpoint and include the following values:

* `rate_plan` object  
   * Contains the account subscription corresponding to a specific add-on service. For a list of available values, refer to [Available subscriptions](https://developers.cloudflare.com/tenant/reference/subscriptions/).
* `component_values` array  
   * Additional services depending on your reseller agreement, such as additional endpoints for load balancing or additional seats for Cloudflare Zero Trust. If not included, the subscription includes the default values associated with each purchase.
* `frequency` string  
   * How often the subscription is renewed automatically (defaults to `"monthly"`).

Request

```

curl 'https://api.cloudflare.com/client/v4/accounts/{account_id}/subscriptions' \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{

  "rate_plan": {

    "id": "<RATE_PLAN_NAME>"

  }

}'


```

### Get account subscription details

To get all subscriptions for an account, send a [GET](https://developers.cloudflare.com/api/resources/accounts/subresources/subscriptions/methods/get/) request to the `/accounts/<ACCOUNT_ID>/subscriptions` endpoint.

### Update account subscription

To update a subscription on an account, send a [PUT](https://developers.cloudflare.com/api/resources/accounts/subresources/subscriptions/methods/update/) request to the `/accounts/<ACCOUNT_ID>/subscriptions/<SUBSCRIPTION_ID>` endpoint.

### Delete account subscription

To delete a subscription on an account, send a [DELETE](https://developers.cloudflare.com/api/resources/accounts/subresources/subscriptions/methods/delete/) request to the `/accounts/<ACCOUNT_ID>/subscriptions/<SUBSCRIPTION_ID>` endpoint.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/tenant/how-to/manage-subscriptions/","name":"Manage subscriptions"}}]}
```

---

---
title: Available subscriptions
description: When provisioning services for an account, you need to include certain values with each API call to specify a particular service.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/tenant/reference/subscriptions.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Available subscriptions

When [provisioning services for an account](https://developers.cloudflare.com/tenant/how-to/manage-subscriptions/), you need to include certain values with each API call to specify a particular service.

The subscriptions available to you will vary depending on your current partner program ([Agency Partner Program ↗](https://www.cloudflare.com/cloudflare-partners-self-serve-program-closed-beta/) or [Enterprise Resellers and MSP Program ↗](https://portal.cloudflarepartners.com)).

The following values are samples and not exhaustive. For the complete list of subscription values available to you, make an API call to the [zone subscriptions](https://developers.cloudflare.com/api/resources/zones/subresources/rate%5Fplans/methods/get/) or [account subscriptions](https://developers.cloudflare.com/api/resources/accounts/subresources/subscriptions/methods/get/) endpoints.

## Zone plans

When creating or updating a [zone plan](https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/get/), Partners can use one of the following values for the `id` of the `rate_plan` field (which controls the zone-level plan subscription).

| Partner program                     | Available subscriptions                                     |
| ----------------------------------- | ----------------------------------------------------------- |
| Enterprise and self-serve resellers | PARTNERS\_FREE, PARTNERS\_PRO, PARTNERS\_BIZ, PARTNERS\_ENT |
| Agency partners                     | CF\_FREE, CF\_PRO\_20\_20, CF\_BIZ                          |
| MSP partners                        | msp\_biz                                                    |

## Other subscriptions

When you [create an account subscription](https://developers.cloudflare.com/tenant/how-to/manage-subscriptions/#account-subscriptions), it provisions an add-on service for that account.

### Zero Trust subscriptions

The following table lists sample values for various Zero Trust subscriptions.

| Feature                                                                                     | Subscription IDs                                                                                             |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [Access](https://developers.cloudflare.com/cloudflare-one/integrations/identity-providers/) | PARTNERS\_ACCESS\_BASIC, PARTNERS\_ACCESS\_ENT, PARTNERS\_ACCESS\_PREMIUM, TEAMS\_ACCESS\_ENT, TEAMS\_ACCESS |
| [Gateway](https://developers.cloudflare.com/cloudflare-one/traffic-policies/)               | TEAMS\_GATEWAY\_ENT, TEAMS\_GATEWAY                                                                          |
| [Cloudflare Zero Trust](https://developers.cloudflare.com/cloudflare-one/)                  | TEAMS\_ENT, TEAMS\_FREE, TEAMS\_STANDARD                                                                     |

### Developer subscriptions

The following table lists sample values for various Developer platform subscriptions.

| Feature                                                                             | Subscription IDs                                                                       |
| ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [Images](https://developers.cloudflare.com/images/)                                 | IMAGES\_ENT,IMAGES\_BASIC                                                              |
| [Image transformations](https://developers.cloudflare.com/images/transform-images/) | IMAGE\_RESIZING\_ENT, IMAGE\_RESIZING\_BASIC                                           |
| [Stream](https://developers.cloudflare.com/stream/)                                 | PARTNERS\_STREAM\_ENT, PARTNERS\_STREAM\_BASIC, STREAM\_BASIC                          |
| [Workers](https://developers.cloudflare.com/workers)                                | PARTNERS\_WORKERS\_ENT, WORKERS\_PAID, PARTNERS\_WORKERS\_SS, PARTNERS\_WORKERS\_BASIC |

### Application performance and security

The following table lists sample values for various application performance and security subscriptions.

| Feature                                                                                                               | Subscription IDs                                                                        |
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [API Shield](https://developers.cloudflare.com/api-shield/)                                                           | API\_SHIELD\_ZONE                                                                       |
| [Advanced certificate manager](https://developers.cloudflare.com/ssl/edge-certificates/advanced-certificate-manager/) | ADVANCED\_CERT\_MANAGER\_FREE, ADVANCED\_CERT\_MANAGER                                  |
| [Argo smart routing](https://developers.cloudflare.com/argo-smart-routing/)                                           | PARTNERS\_ZONE\_ARGO, ARGO\_ZONE\_BASIC                                                 |
| [Ethereum gateway](https://developers.cloudflare.com/web3/ethereum-gateway/)                                          | WEB3\_ETHEREUM\_ENT, WEB3\_ETHEREUM\_ENT\_CONTRACT, WEB3\_ETHEREUM\_ENT\_PAYGO          |
| [IPFS gateway](https://developers.cloudflare.com/web3/ipfs-gateway/)                                                  | WEB3\_IPFS\_ENT, WEB3\_IPFS\_ENT\_CONTRACT, WEB3\_IPFS\_ENT\_PAYGO                      |
| [Load balancing](https://developers.cloudflare.com/load-balancing/)                                                   | PARTNERS\_LOAD\_BALANCING, PARTNERS\_LOAD\_BALANCING\_ENT, LOAD\_BALANCING\_BASIC\_PLUS |
| [Rate limiting](https://developers.cloudflare.com/waf/rate-limiting-rules/)                                           | PARTNERS\_RATE\_LIMITING                                                                |
| [Spectrum](https://developers.cloudflare.com/spectrum/)                                                               | PARTNERS\_SPECTRUM                                                                      |
| [Waiting Room](https://developers.cloudflare.com/waiting-room/)                                                       | WAITING\_ROOMS\_BASIC, WAITING\_ROOMS\_ADV                                              |

### Network services

The following table lists sample values for various network services subscriptions.

| Feature                                                                                       | Subscription IDs                                  |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [Cloudflare Network Firewall](https://developers.cloudflare.com/cloudflare-network-firewall/) | MAGIC\_FIREWALL\_BASIC, MAGIC\_FIREWALL\_ADVANCED |
| [Cloudflare WAN](https://developers.cloudflare.com/cloudflare-wan/)                           | MAGIC\_WAN                                        |

## Getting new subscriptions

If your reseller plan does not have access to a specific subscription, you will receive the following error when making an API call:

```

"errors": [

        {

            "code": 1225,

            "message": "Your account does not have access to this product. Contact billing@cloudflare.com for assistance."

        }

]


```

To change your program or - in some cases - get a specific subscription added to your reseller plan, contact `partners@cloudflare.com`. Agency Partners should contact [agency@cloudflare.com](mailto:agency@cloudflare.com)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/tenant/","name":"Tenant"}},{"@type":"ListItem","position":3,"item":{"@id":"/tenant/reference/","name":"Reference"}},{"@type":"ListItem","position":4,"item":{"@id":"/tenant/reference/subscriptions/","name":"Available subscriptions"}}]}
```
