---
title: "Disconnect an agent"
method: DELETE
path: "/api/me/agents/{clientId}"
---

# Disconnect an agent

`DELETE /api/me/agents/{clientId}`

## Request

- Base URL: `https://www.toma.com`
- URL: `https://www.toma.com/api/me/agents/{clientId}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

Removes the agent's consent, revokes its account (refresh) tokens, and signs out its Personal Agent Protocol sessions. Connecting the agent again restores access. Same as the disconnect_agent MCP tool.

## Path parameters

- `clientId` string, required

## Response `200`

Disconnected.

- object
  - `disconnected` true, required

## Other responses

- `401`: Sign in first.
- `404`: No such connected agent.

---

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