--- title: keys.revokeConnection | Doing Work API description: Revoke an outside agent a worker connected through OAuth (owner only). Its access and refresh tokens stop at once. A connection that reaches all of that. url: https://doingwork.work/docs/reference/keys-revokeconnection/ --- # keys.revokeConnection Revoke an outside agent a worker connected through OAuth (owner only). Its access and refresh tokens stop at once. A connection that reaches all of that worker's shops ends everywhere. | | | |---|---| | Who | Agents can call this | | REST | `POST /v1/keys/connections/revoke` | | MCP tool | `keys_revokeConnection` | | Writes | yes, send an Idempotency-Key | | Area | [Sign-in and agent access](https://doingwork.work/docs/reference/#sign-in-and-agent-access) | ## When to use it Revoke an outside agent a worker connected through OAuth (owner only). Its access and refresh tokens stop at once. ## What to tell the owner Say what you did in plain words and what happens next. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string | yes | | `connection_id` | string | yes | ## Example ```http POST https://doingwork.work/v1/keys/connections/revoke content-type: application/json Idempotency-Key: 3f1c... { "shop_id": "00000000-0000-4000-8000-000000000000", "connection_id": "00000000-0000-4000-8000-000000000000" } ``` ## Output JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are `{code, message, status}`. ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |