Skip to content
Start here

Update User Subscription

PUT/user/subscriptions/{identifier}

Updates a user's subscriptions.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
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)
Billing Write
Path ParametersExpand Collapse
identifier: string

Subscription identifier tag.

maxLength32
Body ParametersJSONExpand Collapse
frequency: optional "weekly" or "monthly" or "quarterly" or "yearly"

How often the subscription is renewed automatically.

One of the following:
"weekly"
"monthly"
"quarterly"
"yearly"
rate_plan: optional RatePlan { id, currency, externally_managed, 4 more }

The rate plan applied to the subscription.

id: optional "free" or "lite" or "pro" or 7 more

The ID of the rate plan.

One of the following:
"free"
"lite"
"pro"
"pro_plus"
"business"
"enterprise"
"partners_free"
"partners_pro"
"partners_business"
"partners_enterprise"
currency: optional string

The currency applied to the rate plan subscription.

externally_managed: optional boolean

Whether this rate plan is managed externally from Cloudflare.

is_contract: optional boolean

Whether a rate plan is enterprise-based (or newly adopted term contract).

public_name: optional string

The full name of the rate plan.

scope: optional string

The scope that this rate plan applies to.

sets: optional array of string

The list of sets this rate plan applies to. Returns array of strings.

ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
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: unknown or string
One of the following:
unknown
string
success: true

Whether the API call was successful

Update User Subscription

curl https://api.cloudflare.com/client/v4/user/subscriptions/$IDENTIFIER \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "frequency": "monthly"
        }'
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {},
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {},
  "success": true
}