Skip to Content
Authgate 1.13.0 is released 🎉
Admin API ReferenceAdjust Membership Time

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 user
  • minutes - Number of minutes to add or remove
  • action - Either add or remove
  • add_on_id (optional) - Adjust this add-on membership instead of the main membership. Omit it or pass null for 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 Key
  • 404 - User not found
  • 404 - Add-on not found
  • 404 - User has no membership for this add-on (when removing time)
  • 409 - Cannot adjust time for a lifetime membership
Last updated on