Skip to main content
DELETE/end-user-role-grants/{grantId}

Revoke End User Role

Revokes a specific end-user role grant by its eur_-prefixed grant ID, setting revoked_at on the grant record.

The end-user loses the associated role on their next token mint.

This action composes with the Maker-Checker policy framework by default.

Requires PROJECT_ADMIN authority.

Parameters
grantId *path

The id of the grant to revoke (eurg_...), as the grant and list calls return it.

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 revoke end-user role grants.
404K9O_END_USER_NOT_FOUNDThe specified end-user does not exist in this project.
Response body (200)
data *object

The result of the revoke.

revoked *boolean

True when this call revoked the grant.

False when there is no active grant with this id (unknown, or already revoked); the call still succeeds.

revokedAt *any

When the grant was revoked.

Null when revoked is false.

One of: string <date-time>
or: null
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.revoke('eurg_6Ws3Pd8Kq1Zv')

Showing example in TypeScript

Response example (200)
{
  "data": {
    "revoked": false,
    "revokedAt": "string"
  }
}

More in Members & End Users