Subscription routes: update
The Subscription Verbs update as api.sb routes, with inputs, result, refusals and an example.
Reference for Subscription, one group of Subscription routes.
Subscription.update
Changes the given properties of a Subscription. Verb page.
PATCH /{namespace}/ subscriptions/ {id}Path: id. Body, as JSON: the other inputs. Emits Subscription.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Subscription. |
renewsAt | datetime | When it next renews. | |
quantity | integer | How many units of the Offer’s Price it holds, such as 12 members; 1 by default. | |
trialEndsAt | datetime | When a trial ends and the first paid period starts. | |
termEndsAt | datetime | When a committed term ends; the Renewal and the renewal notice read it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
subscription | Subscription | required | The Subscription. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X PATCH https: //api.sb/ leaseline.app/ subscriptions/ sub_whVFaHKWIV \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"renewsAt": "2026-10-22T12: 00: 00Z"}'{
"api": "https: //api.sb/ leaseline.app",
"subscription": {
"$id": "https: //api.sb/ leaseline.app/ subscriptions/ sub_whVFaHKWIV",
"$type": "Subscription",
"status": "active",
"renewsAt": "2026-10-22T12: 00: 00Z"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Subscription.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}