Adjust Membership Time
Add or remove time from a user’s main membership or one of their add-on memberships.
Endpoint: POST /adjust-membership-time
Headers:
Authorization: Bearer <admin_api_key>(required)Content-Type: application/json
Request Body:
{
"user_id": "456e7890-e89b-12d3-a456-426614174000",
"minutes": 43200,
"action": "add",
"add_on_id": "aaa11111-e89b-12d3-a456-426614174000"
}Fields:
user_id- The UUID of the userminutes- Number of minutes to add or removeaction- Eitheraddorremoveadd_on_id(optional) - Adjust this add-on membership instead of the main membership. Omit it or passnullfor the main membership. Adding time creates the add-on membership if the user doesn’t have it yet
You can find an add-on’s ID in the URL of its page in your dashboard, or in the add_ons of Get User.
Response:
Returns the full user object (same shape as Get User).
Errors:
401- Invalid Admin API Key404- User not found404- Add-on not found404- User has no membership for this add-on (when removing time)409- Cannot adjust time for a lifetime membership
Last updated on