Skip to main content
GET/end-user-role-grants

List End User Roles

Returns all active role grants for project end-users, cursor-paginated.

Each entry is a eur_-prefixed grant record including end_user_id, role, granted_by, and granted_at.

Requires PROJECT_ADMIN authority.

Parameters
projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
401K9O_SESSION_EXPIREDYour session has expired; sign in again to continue.
403K9O_ACCESS_DENIEDYou do not hold the required role to list end-user role grants.
Response body (200)
data *object

The project's active end-user role grants.

grants *object[]

The active grants, oldest first: every end user's, or one end user's when endUserId is given.

Revoked grants are not listed.

id *string

The grant's id (eurg_...).

Use it to revoke the grant.

endUserId *string

The end user who holds the role (eu_...).

role *string

The role name.

grantedAt *string <date-time>

When the role was granted.

grantedBy *string

Who granted it: the subject id of the caller that made the grant (an operator's user id, usr_...), or invitation when the end user received it by redeeming an invitation.

meta *any

Request metadata: cost, timing and the request and trace ids.

TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.endUsers.roleGrants.list()

Showing example in TypeScript

Response example (200)
{
  "data": {
    "grants": [
      {
        "id": "string",
        "endUserId": "string",
        "role": "string",
        "grantedAt": "string",
        "grantedBy": "string"
      }
    ]
  }
}

More in Members & End Users