/{app_slug}/v1/agent-access/grants/{grant_id}AuthDisconnect an end user's agent
Revokes the connection at once (refresh stops, introspection answers `{"active": false}`), whoever made it. Audited as `agent_access.grant.revoked` with reason `app` and the PAK as actor; record who asked for it in your own trail. Requires `auth.agent_access.grants.manage` on the app.
Path parameters
app_slug*stringThe app slug.
grant_id*stringThe connection id (`agr_…`).
Response · 204
Disconnected.
Example
Request
DELETE https://api.auth.productcraft.co/{app_slug}/v1/agent-access/grants/{grant_id}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
await auth.consumer("my-app").agentAccess.grants.delete("agr_9xYk2LmQ0aBcDeFg");auth.consumer(…).agentAccess.grants.delete(grantId, options?): void