Skip to main content
POST
/
v1
/
admin
/
subscriptions
/
grant
# Grant 30-day premium
curl -X POST https://portal-api.7331.org/v1/admin/subscriptions/grant \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 42, "tier": 2, "duration_days": 30, "reason": "Contest winner"}'

# Grant lifetime
curl -X POST https://portal-api.7331.org/v1/admin/subscriptions/grant \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 42, "tier": 3, "reason": "Early supporter"}'
{
  "message": "Subscription granted to user 42 for 30 days"
}

Documentation Index

Fetch the complete documentation index at: https://docs.7331.org/llms.txt

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

Requires an active admin session cookie. Hierarchy enforced against the target.
user_id
integer
required
User ID of the target.
tier
integer
required
Subscription tier to grant. 1 = Trial, 2 = Premium, 3 = Lifetime. When tier=1 (Trial), duration_days is ignored (forced to 7) and TrialAlreadyUsedError returns 409 if the user has already used a trial.
duration_days
integer
Duration in days (1-3650). Only used for Premium (2). Trial always forces 7 days. Lifetime ignores this field.
reason
string
Reason for granting (1-500 characters).

Response

message
string
required
Action result message.
# Grant 30-day premium
curl -X POST https://portal-api.7331.org/v1/admin/subscriptions/grant \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 42, "tier": 2, "duration_days": 30, "reason": "Contest winner"}'

# Grant lifetime
curl -X POST https://portal-api.7331.org/v1/admin/subscriptions/grant \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 42, "tier": 3, "reason": "Early supporter"}'
{
  "message": "Subscription granted to user 42 for 30 days"
}