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:read to read grants and users.subscription:write to 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 (Monthly or Annual) and features. Get a subscription plan returns one.

Endpoints

PurposeMethod and path
Create a grantPOST /v3/platform/subscription-grants
List grantsGET /v3/platform/subscription-grants
Get a grantGET /v3/platform/subscription-grants/{grantId}
Update a grantPATCH /v3/platform/subscription-grants/{grantId}
Revoke a grantDELETE /v3/platform/subscription-grants/{grantId}
List subscription plansGET /v3/platform/subscription-plans
Get a subscription planGET /v3/platform/subscription-plans/{planId}

Create a grant

FieldRequiredNotes
accountIdYesThe Account that receives access.
planIdYesThe Plan to grant.
reasonNoWhy the grant exists.
expiresAtNoDate-time when access ends.
metadataNoYour 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

StatusCause
401, 403Missing credentials, or the credential lacks the scope.
404No grant or plan with that ID.
422A required field is missing or invalid, such as planId.

Webhook events

SubscriptionGrant lifecycle events are published as webhooks. See Webhooks and events to subscribe.


Did this page help you?