Dashboard
APISubscription Bot Membership Extension API
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Examples
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Extend Subscription Bot Memberships

Set a future end date for one membership, a selected batch, or all memberships in your Telegram or Discord subscription bot project. extend is a target date, not a duration.

Restricted keys can extend selected membership_ids. Whole-project updates with all_memberships: true require an unrestricted project API key.

Choose exactly one selector: membership_ids or all_memberships: true. Sending neither selector, or both, returns 422.

PATCH/v2/projects/{project_id}/memberships/extend

Authorization

Bearer API KeyRequired

API key scope: memberships:update (required for restricted keys).

Path Parameters

project_idstringrequired

The unique identifier of the project.

Request Body

extendstring | numberrequired

Future target expiry in UTC ISO format YYYY-MM-DDTHH:mm:ss.sssZ, for example 2030-01-01T00:00:00.000Z. Also accepts 13-digit Unix milliseconds for compatibility.

membership_idsstring[]

One to 100 distinct membership UUIDs. Use a one-item array to extend a particular membership.

all_membershipsboolean

Must be true when selecting the whole project. Cannot be combined with membership_ids.

Selection and subscription limits

For membership_ids, every membership must exist in this project, have no pending termination, and end on or before the target. Reactivating expired access must fit the plan's subscriber limit. A failure returns 404 or 409 without changing the selection.

For all_memberships: true, later end dates, lifetime memberships, and expired memberships whose plans are full are skipped. More than 10,000 memberships returns 409 without changes. The response message reports skipped memberships.

End dates never move earlier, and lifetime memberships are never given an expiration. Sending the same target again succeeds without extending access twice. Find IDs through the membership list API. To update a user's memberships together, use the user membership extension route.

To extend a membership granted through Redeem for Member, put its returned membership_id in a one-item membership_ids array.

Whole-project body:

{ "extend": "2027-12-31T23:59:59.000Z", "all_memberships": true }
Last updated: