Skip to content

Grant

Grant = object

One grant that gives this user access on the site the client is pinned to.

The list includes the user’s own grants and the grants of user organizations they hold a seat in, limited to grants that reach this site. The same user can see a different list on another site.

A grant carries no price, currency or billing interval. Paid, free, gifted and organization access all have the same shape.

expiresAt: string | null


id: string


offer: { code: string; id: string; name: string; } | null

The offer the grant was bought through. Null for a grant that was never sold, and for an imported or manually created grant with no matching offer.


organization: { id: string; name: string; } | null

The user organization the grant belongs to, when this user has access through a seat in it. Null when the grant is the user’s own. Show it, so the user does not read their employer’s grant as one they bought.


product: object

The product: what the grant gives access to. Carries no price.

id: string

name: string

slug: string


reason: string | null

Why it was created: purchase, gift, promo, winback and others. Null on older grants.


source: string

What created the grant: recurly, comp, import, api. An open list, not an enum.


startsAt: string | null

UTC ISO 8601 timestamps. All three can be null, startsAt included. A null expiresAt means the grant does not expire.


state: GrantState


status: string

active, suspended or revoked. Expiry shows only in GrantState.


trialEndsAt: string | null

Access before this time was free: a trial, however the grant was created.