---
title: "Revoke a connected agent and kill its vended API key"
method: DELETE
path: "/api/oauth-connections/{id}"
tags: ["OAuth connections"]
---

# Revoke a connected agent and kill its vended API key

`DELETE /api/oauth-connections/{id}`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/oauth-connections/{id}`
- Auth: API key in cookie `luca.session_token`

The kill switch for a connected agent. It marks the connection revoked and deletes the API key we vended it, so public API access stops right away. It also drops the stored consent, so the next authorize shows a real consent screen, and clears the refresh and access tokens.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Path parameters

- `id` string, required

## Headers

- `Luca-API-Version` '1'

## Response `200`

ok

- OauthConnectionRevokeResponse
  - `ok` true, required
  - `id` string, required
  - `revokedAt` string, required

## Other responses

- `401`: unauthorized
- `429`: rate limited
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
