Skip to content
Visit Tenant on GitHub
Set theme to dark (⇧+D)

Step 3: Enabling services

In order for your customers to get the most out of Cloudflare it is important that you can easily provision paid services so customer's services are as fast and secure as possible. To do that, we are going to create some subscriptions for our customer, but first the customer needs a zone.

Create a zone

Creating a zone is no different the Client V4 API, but be sure to specify the customer's account when creating the zone.

API Docs

Example - Create Zone

curl -X POST -H 'Content-Type: application/json' -H 'x-auth-email: <x-auth-email>' -H 'x-auth-key: <x-auth-key>' -d '{ "name": "", "account": { "id": "<customer account id>" } }'

Create a zone subscription

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

API Docs

Example - Create Zone Subscription

curl -X POST<zone id>/subscription -H 'Content-Type: application/json' -H 'x-auth-email: <x-auth-email>' -H 'x-auth-key: <x-auth-key>' -d '{"rate_plan": {"id": "<rate plan identifier>"}}'

Allowed rate plans are:


These are the same plans that customers buy in the dashboard. Additionally, depending on your agreement there may be additional services you can select including dedicated_certificates, dedicated_certificates_custom, page_rules, etc. These are specified as component_values in the subscriptions creation request.

An example POST body for such a request may look like:


Create account subscriptions

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

API Docs

Example - Create Account Subscription

curl -X POST<account id>/subscriptions -H 'Content-Type: application/json' -H 'x-auth-email: <x-auth-email>' -H 'x-auth-key: <x-auth-key>' -d '{ "rate_plan": {"id": "<rate plan id>"} }'

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

Continue the tutorial

Learn how to modify zone settings and other services.

Step 4: Service configuration