Skip to main content
POST
/
token
/
extend
/
{newEndTs}
Extend the validity of an existing API token
curl --request POST \
  --url https://api.example.com/token/extend/{newEndTs}

Documentation Index

Fetch the complete documentation index at: https://txline-docs.txodds.com/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint allows a user to extend their current subscription by updating the expiry timestamp on-chain and off-chain. It performs the following actions:
  1. Validates that the requested newEndTs is valid (in the future, greater than current expiry, and within the 1-year limit).
  2. Calls the extend_subscription instruction on the Solana blockchain to update the user’s stake account.
  3. Upon on-chain success, updates the end_ts of the API token in the off-chain database.
The user continues to use their existing API token; only its validity period is updated.

Path Parameters

newEndTs
int64
required
The new subscription end timestamp (in seconds) requested by the user.

Response

Returns a plain text string with a success message. Example:
Subscription extended successfully.