---
title: "Revoke a connected account at the provider"
method: POST
path: "/api/v3.1/connected_accounts/{nanoid}/revoke"
tags: ["Connected Accounts"]
---

# Revoke a connected account at the provider

`POST /api/v3.1/connected_accounts/{nanoid}/revoke`

## Request

- Base URL: `https://backend.composio.dev`
- URL: `https://backend.composio.dev/api/v3.1/connected_accounts/{nanoid}/revoke`
- Auth: API key in header `x-api-key`

Best-effort upstream revocation. On success, the connection transitions to REVOKED. Returns 400 when the toolkit does not support programmatic revocation, 409 when the connection is not in a revokable state, 500 when every upstream dispatch fails.

## Path parameters

- `nanoid` string, connectedAccountId, required

## Response `200`

Connection revoked. `revoked_tokens` reports which subjects were killed at the provider on this call; an empty array indicates the connection was already revoked.

- object: Result of revoking a connected account at the upstream provider.
  - `revoked_tokens` string[], required: Tokens revoked at the provider on this call. Empty array means the connection was already revoked (no upstream dispatch).
  - `connected_account` object, required
    - `id` string, required: The unique identifier of the connected account
    - `status` 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED', required: The connection status after this call (REVOKED on success).

## Other responses

- `400`: Bad request - non-OAUTH2 auth scheme or toolkit lacks a revoke configuration.
- `401`: Unauthorized - Authentication failed
- `403`: Forbidden - Insufficient permissions to revoke this connected account
- `404`: Not found - Connected account does not exist, was deleted, or its parent auth config was removed.
- `409`: Conflict - Connection is in a state that cannot be revoked (only ACTIVE / already-REVOKED are accepted).
- `500`: Internal server error - DB failure, data integrity violation, or every upstream dispatch failed.

## Changes

- **2026-10-16** `98956f31abf3`: 2 info
  - api operation id `postV3_1ConnectedAccountsByNanoidRevoke` removed and replaced with `postConnectedAccountsByNanoidRevoke`
  - api tag `Authentication` removed
- **2026-06-17** `589a7d115a5e`: 2 info
  - the endpoint scheme security `CookieAuth` was removed from the API
  - the endpoint scheme security `UserApiKeyAuth` was removed from the API
- **2026-05-29** `ca2b1b8e1372`: 1 warning
  - added the new `credential` enum value to the `revoked_tokens/items/` response property for the response status `200`
- **2026-05-13** `8bc881e0e4bf`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/composiohq/apis/composio-platform-api-v3-1/changes/api/v3.1/connected_accounts/:nanoid/revoke/post.md)

---

[API](https://skmtc.dev/composiohq/apis/composio-platform-api-v3-1.md) - [All operations](https://skmtc.dev/composiohq/apis/composio-platform-api-v3-1/llms.txt) - [OpenAPI document](https://skmtc.dev/composiohq/apis/composio-platform-api-v3-1/revisions/4bd56a0836f8?raw)
