v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Entitlements

Grant an entitlement to a user

Grants an entitlement definition to a specific user, optionally with an expiry time. Attempting to extend or modify a user entitlement whose source is a paid purchase (store or Stripe) returns 422 paid_entitlement.

post/users/{user_id}/entitlements

Path parameters

user_idstring required

User identifier.

Request body

entitlement_idstring required

Identifier of the entitlement definition to grant.

expires_atinteger

Unix timestamp (seconds) when the entitlement expires. Use 0 (or omit the field) to grant the entitlement with no expiry. Negative values and past timestamps are rejected with 400.

Example request

{
  "entitlement_id": "premium",
  "expires_at": 1767225600
}

Response

Entitlement granted.

object'user_entitlement' required
idstring required

Unique entitlement identifier.

urlstring required

Canonical API path.

is_activeboolean required

Whether the entitlement is currently active.

sourcestring required

Source of the entitlement grant (open enum).

started_atstring date-time nullable

Timestamp when the entitlement became active (ISO 8601 UTC).

expires_atstring date-time nullable

Timestamp when the entitlement expires (ISO 8601 UTC). Null if no expiry.

Example response

{
  "id": "premium",
  "url": "/v4/users/QON_3af4c5b8a4d24f21b72e9d0c8aef9d4e/entitlements/premium",
  "started_at": "2025-09-15T12:30:00Z",
  "expires_at": "2026-09-15T12:30:00Z",
  "product": {
    "product_id": "premium_monthly"
  }
}