Skip to navigation

Update a plan

name, description and metadata can always change. Pricing and limits can change only while the plan has no subscriptions, and otherwise the request fails with plan_locked.

Authentication

AuthorizationBearer

A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.

Path parameters

planstringRequired

The plan ID (plan_...) or key.

Request

This endpoint expects an object.
namestringOptional
descriptionstring or nullOptional
recurring_feeobject or nullOptional
An amount of money in the currency's minor unit.
included_creditsobject or nullOptional
Prepaid. Credits granted at the start of each period.
top_upobject or nullOptional
Prepaid. Lets customers buy more credits through checkout.
allowanceslist of objectsOptional

Refills and caps on the plan’s balance. See Usage windows.

poolslist of objectsOptional

Named balance pools, in drawdown order. See Pools.

per_seatbooleanOptional

recurring_fee and included_credits are per seat, multiplied by the subscription’s quantity. Default false.

default_spend_limitobject or nullOptional

The spend limit each new subscription on the plan starts with. A customer-set limit may replace it, up to ceiling.

overdraft_limitstring or nullOptional
credit_limitobject or nullOptional
An amount of money in the currency's minor unit.
minimum_commitmentobject or nullOptional
An amount of money in the currency's minor unit.
invoice_grace_periodstring or nullOptional
rateslist of objectsOptional
Replaces the whole list.
metadatamap from strings to stringsOptional
Up to 50 keys of your own, with keys up to 40 characters and values up to 500 characters.

Response

The updated plan.
idstring
object"plan"
keystring
namestring
statusenum
Allowed values:
billing_modeenum

prepaid: a credit balance that must cover charges, topped up or granted in advance. postpaid: charges accrue in money and are invoiced at period end.

Allowed values:
currencystring
intervalenum
Allowed values:
rateslist of objects
has_subscriptionsboolean
Once true, pricing can't change.
metadatamap from strings to strings
Up to 50 keys of your own, with keys up to 40 characters and values up to 500 characters.
livemodeboolean
created_atdatetime
descriptionstringOptional
credit_typestringOptional
recurring_feeobjectOptional
An amount of money in the currency's minor unit.
included_creditsobjectOptional
Prepaid. Credits granted at the start of each period.
top_upobjectOptional
Prepaid. Lets customers buy more credits through checkout.
allowanceslist of objectsOptional

Refills and caps on the plan’s balance. See Usage windows.

poolslist of objectsOptional

Named balance pools, in drawdown order. See Pools.

per_seatbooleanOptional

recurring_fee and included_credits are per seat, multiplied by the subscription’s quantity. Default false.

default_spend_limitobjectOptional

The spend limit each new subscription on the plan starts with. A customer-set limit may replace it, up to ceiling.

overdraft_limitstringOptional
credit_limitobjectOptional
An amount of money in the currency's minor unit.
minimum_commitmentobjectOptional
An amount of money in the currency's minor unit.
invoice_grace_periodstringOptional
actorobjectOptional
Who last changed the plan.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error