Create a subscription
Needs the subscriptions:write scope, or a full-access key. About scopes
api/v1/subscriptionsAuthorization
AuthorizationRequiredBearer <token>
An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).
In: header
Request Body
application/jsonOptionalcustomer_idstring
Exactly one of customer_id / customer_external_id.
"uuid"customer_external_idstring
Your own customer id.
1Maximum length: 200plan_idstring
The base plan: at most one of plan_id / plan_code. Optional when items is given: the first item becomes the base.
"uuid"plan_codestring
A plan code; its latest active version is used.
1Maximum length: 200itemsarray<object>
Extra charges beside the base plan, each plan_id or plan_code. Same interval as the base.
quantityAny properties in integer, string
Seats on the base plan. Default 1.
start_atstring
"date-time"trial_endstring | null
Omitted = the product's trial_days; null = no trial.
"date-time"metadataobject
Flat scalars: at most 50 keys of at most 40 characters; strings at most 500 characters.
Header Parameters
Idempotency-Keystring
A unique value for this operation, chosen by you. A retry with the same key and the same body returns the first response instead of running again. The same key with a different body answers 409 idempotency_key_reused; a key whose first request is still running answers 409 idempotency_in_progress.
Subscription created; an advance first invoice is finalized and charged against the default card.