Skip to main content
PATCH
JavaScript

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-ACCOUNT-ID
string

Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.

X-ENVIRONMENT-ID
string

Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Body

application/json

Partially updates an existing subscription — only the fields included in the request body are changed; any field left out keeps its current value. Object fields such as metadata are replaced wholesale rather than merged key by key, so a request that includes metadata must repeat any existing keys it's supposed to keep (to clear metadata entirely, send metadata: {}). List fields such as addons, priceOverrides, and entitlements work the same way: the array you send becomes the field's complete new value, so an existing addon or entitlement that isn't included in the array is removed from the subscription, not left untouched.

metadata
object

Additional metadata for the subscription, stored as an arbitrary flat key-value object.

charges
object[]
addons
SubscriptionAddon · object[]
trialEndDate
string<date-time>

Subscription trial end date

promotionCode
string

Promotion code

Maximum string length: 255
entitlements
(SubscriptionFeatureEntitlementRequest · object | SubscriptionCreditEntitlementRequest · object)[]

Feature entitlement configuration for a subscription

billingPeriod
enum<string>
Available options:
MONTHLY,
ANNUALLY
awaitPaymentConfirmation
boolean

Await payment confirmation

billingInformation
object
scheduleStrategy
enum<string>
Available options:
END_OF_BILLING_PERIOD,
END_OF_BILLING_MONTH,
IMMEDIATE
budget
object | null
minimumSpend
object | null

Minimum spend amount

priceOverrides
object[]
appliedCoupon
object
billingCycleAnchor
enum<string>
Available options:
UNCHANGED,
NOW
cancellationDate
string<date-time> | null

Subscription cancellation date

salesforceId
string | null

Salesforce ID

Maximum string length: 255

Response

The updated subscription object.

Response object

data
Subscription · object
required

Customer subscription to a plan