List the signed-in user’s grants
const url = 'https://your-tenant-host/v1/grants';const options = { method: 'GET', headers: { cookie: 'ek.session_token=<ek.session_token>', 'x-edgekit-site-id': 'site_example' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://your-tenant-host/v1/grants \ --header 'x-edgekit-site-id: site_example' \ --cookie ek.session_token=<ek.session_token>Every grant this person holds that reaches the selected site, newest term first: their own and their organizations’, pinned to the site or covered by the product. Expired, suspended and revoked grants are included and labelled: a purchase that has lapsed is part of the answer to what have I bought. Carries no money; a grant has no price by construction.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Example
site_exampleThe site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Responses
Section titled “Responses”The user’s grants on this site.
object
Every grant the signed-in user holds that reaches the selected site — their own and their organizations’, pinned to the site or covered by the product. Newest term first. Not paged: a person’s commercial history with one organization is bounded by what they have bought.
object
What a screen shows: status and the expiry date folded into one value. revoked and suspended beat the clock, so a revoked grant whose term also lapsed reports revoked. Open: render an unknown member by status.
The stored status: active | suspended | revoked. Sent beside state because a suspended term still exists: dunning and a billing-provider pause both suspend, and neither is an expiry.
Who minted it: recurly, comp, import, api. The organization’s own vocabulary rather than an enum, so an importer’s own value arrives verbatim.
Why it was minted: purchase, gift, promo, partner, school, staff, winback. Null on older grants, written before source was split into who and why.
UTC ISO. Typed nullable, but always set in practice.
UTC ISO, or null for open-ended. Null is a lifetime grant, never a missing value.
UTC ISO. Access before this instant was granted without payment — set for comped and imported trials too, which no billing provider’s own trial dates can see.
The access set this grant references: what it covers. Carries no price — that is the offer’s, and the money is the billing provider’s invoice.
object
The merchandised offer it was bought as, or null for a grant that predates the offer describing it — an import, or a comp nobody sold.
object
Set only when this person reaches the grant through a seat in one of their organizations. Omitting it on a screen shows somebody their employer’s grant as if they had bought it.
object
Example
{ "grants": [ { "id": "01999b1e-6f3a-7c2d-9e51-2a4c8d0f6b31", "state": "live", "status": "active", "source": "recurly", "reason": "purchase", "startsAt": "2026-08-16T09:12:44.000Z", "product": { "id": "01999b1e-6f3a-7c2d-9e51-2a4c8d0f6b31" }, "offer": { "id": "01999b1e-6f3a-7c2d-9e51-2a4c8d0f6b31" }, "organization": { "id": "01999b1e-6f3a-7c2d-9e51-2a4c8d0f6b31" } } ]}Invalid request.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Missing or invalid credential.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Not allowed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}