---
title: "Disconnect an application"
method: DELETE
path: "/api/oauth/connections/{grantId}"
tags: ["OAuth"]
---

# Disconnect an application

`DELETE /api/oauth/connections/{grantId}`

## Request

- Base URL: `https://scanduro.com`
- URL: `https://scanduro.com/api/oauth/connections/{grantId}`
- Auth: `sessionCookie` (a scheme the document does not define)

Revokes every token in the grant family. Immediate — revocation is checked on every request
rather than cached. Scoped to the caller's workspace, so a guessed grant id from another
tenant is a `404` rather than a denial of service against someone else's assistant.

The token rows are kept after revocation on purpose: a `last_used_at` later than a
`revoked_at` is the evidence that a leaked credential is still being tried.

## Path parameters

- `grantId` string, required

## Response `200`

How many tokens were revoked.

- object
  - `revoked` integer

## Other responses

- `401`: No valid session
- `404`: Resource absent or belongs to another workspace

---

[API](https://skmtc.dev/scanduro/apis/scanduro-public-api.md) · [All operations](https://skmtc.dev/scanduro/apis/scanduro-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scanduro/apis/scanduro-public-api/revisions/cdb36d96cad7?raw)
