APIExtend User Membership

Extend User Membership

Set the end date for a specific user's membership in a project.

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

Authorization

Bearer TokenRequired

Path Parameters

project_idstringRequired

The unique identifier of the project.

user_idstringRequired

The user identifier whose membership to extend.

Request Body

extendnumber | stringRequired

Target end date - either Unix timestamp in milliseconds (13 digits as number) or ISO 8601 timestamp string. Must be in the future.

Request
# Using Unix timestamp in milliseconds (number)
curl -X PATCH "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/memberships/123456789012345678/extend" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "extend": 1768213947560
  }'
 
# Or using ISO 8601 timestamp (string)
curl -X PATCH "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/memberships/123456789012345678/extend" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "extend": "2026-01-12T10:32:27.560Z"
  }'
Membership extendedapplication/json
{
  "ok": true,
  "request_id": "11111111-1111-1111-1111-111111111111",
  "method": "PATCH",
  "path": "/v2/projects/YOUR_PROJECT_ID/memberships/123456789012345678/extend",
  "code": 200,
  "total": 1,
  "message": "Membership end dates set successfully",
  "data": {
    "new_end_date": "2026-01-15T00:00:00.000Z"
  }
}

Last updated: