Revoke grant
DELETE
Soft-revokes a grant this API manages and emits authz.revoked.
Already-revoked, missing, project-secret setup, and owning-team grants
return 404. The row is not un-revoked. Expired grants can still be
revoked so the unique binding can be reused.
Accepts either a project secret (oauth2) or a user-bound Console
session cookie (sessionCookie). Cookie-authenticated requests
follow the scheme's CSRF rules (sessionCookie).
header
AuthorizationBearer <token>Scope: project.write
id*stringManaged assignment id (asgn_<opaque>).
project_id*stringThe unique identifier of the project
Match
^[a-zA-Z0-9_-]+$The grant was revoked.
Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";import { setApiCsrfToken } from "@zitadel/api/runtime/auth";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));// A write the session cookie authenticates carries the session's CSRF token.setApiCsrfToken((await client.getMySessionCsrfToken()).csrf_token);await client.deleteGrant("asgn_01KWH9D4R2V7F0N9WD3P2E4YM8", { project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });Example Response
Empty
Was this helpful?