Subscription grants
Give an Account access to a Plan without a purchase, such as a partner entitlement or promotional access, with the V3 API.
A Subscription grant gives an Account access to a Plan without that Account buying it. Use it for partner entitlements or promotional access. A grant can expire, and it can be revoked.
A grant is not a Subscription. To buy a Plan, see Plans and purchases.
Prerequisites
users.subscription:readto read grants andusers.subscription:writeto create, change or revoke them.- The ID of the Plan. For the Plans an Account can see, List subscription plans returns
id,name,description,price,currency,interval(MonthlyorAnnual) andfeatures. Get a subscription plan returns one.
Endpoints
| Purpose | Method and path |
|---|---|
| Create a grant | POST /v3/platform/subscription-grants |
| List grants | GET /v3/platform/subscription-grants |
| Get a grant | GET /v3/platform/subscription-grants/{grantId} |
| Update a grant | PATCH /v3/platform/subscription-grants/{grantId} |
| Revoke a grant | DELETE /v3/platform/subscription-grants/{grantId} |
| List subscription plans | GET /v3/platform/subscription-plans |
| Get a subscription plan | GET /v3/platform/subscription-plans/{planId} |
Create a grant
| Field | Required | Notes |
|---|---|---|
accountId | Yes | The Account that receives access. |
planId | Yes | The Plan to grant. |
reason | No | Why the grant exists. |
expiresAt | No | Date-time when access ends. |
metadata | No | Your own key-value data. |
curl -X POST https://api.wingspan.app/v3/platform/subscription-grants \
-H "Authorization: Bearer $WINGSPAN_TOKEN" \
-H "X-Wingspan-Account: Nw7kQ2pLx9RtVb3mHc5dZa" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"accountId": "Gh8kLm3QtV6xZc2nWd5RbP",
"planId": "Zc6vKm2PxQ8tNb4wRd7LhE",
"reason": "Partner onboarding offer",
"expiresAt": "2027-01-31T23:59:59Z"
}'The response is 201 with the grant: id, accountId, planId, reason, status (Active, Expired or Revoked), expiresAt, events (createdAt, updatedAt, revokedAt), actors (createdBy, revokedBy) and metadata. The IDs above are illustrative.
Change or revoke a grant
Update a grant uses JSON Merge Patch on reason, expiresAt and metadata. The plan and the Account cannot change. Revoke a grant ends access at once and returns 204.
Errors
| Status | Cause |
|---|---|
401, 403 | Missing credentials, or the credential lacks the scope. |
404 | No grant or plan with that ID. |
422 | A required field is missing or invalid, such as planId. |
Webhook events
SubscriptionGrant lifecycle events are published as webhooks. See Webhooks and events to subscribe.
Updated 12 minutes ago