PHP Client for Cloudflare API
Accounts

Subscriptions

Subscriptions endpoint reference.

List

Lists all of an account's subscriptions.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
php
$response = $client->accounts()->subscriptions()->list('ACCOUNT_ID');
View this operation on the Cloudflare API Reference

Create

Creates an account subscription.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
valuesarrayNo[]Subscription values, e.g. frequency, rate_plan.
php
$response = $client->accounts()->subscriptions()->create('ACCOUNT_ID', []);
View this operation on the Cloudflare API Reference

Update

Updates an account subscription.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
subscriptionIdstringYesSubscription identifier tag.
valuesarrayNo[]Subscription values, e.g. frequency, rate_plan.
php
$response = $client->accounts()->subscriptions()->update('ACCOUNT_ID', 'SUBSCRIPTION_ID', []);
View this operation on the Cloudflare API Reference

Append

Smartly applies the incoming subscription into the lifecycle of the subscription.

Unlike update(), which overwrites, this asks Cloudflare to work out how the supplied subscription should be folded into the existing one.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
subscriptionIdstringYesSubscription identifier tag.
valuesarrayNo[]Subscription values, e.g. frequency, rate_plan.
php
$response = $client->accounts()->subscriptions()->append('ACCOUNT_ID', 'SUBSCRIPTION_ID', []);

Delete

Deletes an account's subscription.

ParamTypeRequiredDefaultDescription
accountIdstringYesAccount identifier.
subscriptionIdstringYesSubscription identifier tag.
php
$response = $client->accounts()->subscriptions()->delete('ACCOUNT_ID', 'SUBSCRIPTION_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026