## Update User Subscription `client.user.subscriptions.update(stringidentifier, SubscriptionUpdateParamsbody, RequestOptionsoptions?): SubscriptionUpdateResponse` **put** `/user/subscriptions/{identifier}` Updates a user's subscriptions. ### Parameters - `identifier: string` Subscription identifier tag. - `body: SubscriptionUpdateParams` - `frequency?: "weekly" | "monthly" | "quarterly" | "yearly"` How often the subscription is renewed automatically. - `"weekly"` - `"monthly"` - `"quarterly"` - `"yearly"` - `rate_plan?: RatePlan` The rate plan applied to the subscription. - `id?: "free" | "lite" | "pro" | 7 more` The ID of the rate plan. - `"free"` - `"lite"` - `"pro"` - `"pro_plus"` - `"business"` - `"enterprise"` - `"partners_free"` - `"partners_pro"` - `"partners_business"` - `"partners_enterprise"` - `currency?: string` The currency applied to the rate plan subscription. - `externally_managed?: boolean` Whether this rate plan is managed externally from Cloudflare. - `is_contract?: boolean` Whether a rate plan is enterprise-based (or newly adopted term contract). - `public_name?: string` The full name of the rate plan. - `scope?: string` The scope that this rate plan applies to. - `sets?: Array` The list of sets this rate plan applies to. Returns array of strings. ### Returns - `SubscriptionUpdateResponse = unknown | string | null` - `unknown` - `string | null` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const subscription = await client.user.subscriptions.update('506e3185e9c882d175a2d0cb0093d9f2'); console.log(subscription); ``` #### Response ```json { "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 } ```