---
title: "Disconnect an OAuth app: delete stored tokens (best-effort remote revocation when a revocation endpoint is known)"
method: DELETE
path: "/api/oauth-apps/{provider}/tokens"
tags: ["Script Connections"]
---

# Disconnect an OAuth app: delete stored tokens (best-effort remote revocation when a revocation endpoint is known)

`DELETE /api/oauth-apps/{provider}/tokens`

## Path parameters

- `provider` string, required

## Response `200`

Disconnect result

- union
  - object
    - `disconnected` false, required
    - `message` string, required
  - object
    - `disconnected` true, required
    - `revocationAttempted` boolean, required

## Other responses

- `403` — Only the lead agent can manage script connections
- `404` — OAuth app not found

## Changes

- **2026-08-07** `06cac6a7c5bc` — 3 info
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`
- **2026-07-09** `4f56890cc278` — 1 info
  - endpoint added
- **2026-07-02** `0c910612f9ac` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/oauth-apps/:provider/tokens/delete.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/revisions/4d23bb3d853c?raw)
