Skip to content

Disconnect an OAuth client

The oauth_connections.revoke operation: POST /api/v1/oauth_connections/{id}/revoke in the REST API and the oauth_connections_revoke tool in the MCP server.

POST/api/v1/oauth_connections/{id}/revoke

Disconnects an OAuth client that acts for you from one organization (orgId), or from all of them. Its tokens stop working there at once; once it covers no organization, every token and refresh token it holds is revoked. Disconnecting it again changes nothing.

At a glance

  • REST: POST /api/v1/oauth_connections/{id}/revoke
  • MCP tool: oauth_connections_revoke
  • Operation ID: oauth_connections.revoke
  • Scope: Platform
  • Permission: account:write
  • Risk tier: security
  • Dry run: Supported (send Ownrecord-Dry-Run: true)
  • Idempotency: Idempotency-Key required
  • Modes: Test and live
  • Authentication: API key with the account:write scope
  • Since: M10

Request

Path parameters

FieldTypeDescription
idogr_… ID

Body

A JSON object (Content-Type: application/json):

FieldTypeRequiredDescription
orgIdorg_… IDNo

Response

200 OK with a JSON object:

FieldTypeDescription
idstring
object"oauth_connection"
clientobject
client.idocl_… ID
client.namestring
client.publisherstring
client.dynamicboolean
orgsarray of object
orgs[].orgIdorg_… ID
orgs[].scopesarray of one of 84 values, e.g. org:read, org:write, org:admin (all in the OpenAPI document)
orgs[].consentedAtstring
createdAtstring
updatedAtstring

Examples

Disconnect from every organization

HTTP
POST /api/v1/oauth_connections/ogr_01m4ttwd3veh9apbewxheq5xhd/revoke
Authorization: Bearer or_test_…
Idempotency-Key: 3f1c9a52-7d0e-4b8f-9a61-0c2d5e8b7f14

Response (200):

JSON
{
  "id": "ogr_01m4ttwd3veh9apbewxheq5xhd",
  "object": "oauth_connection",
  "client": {
    "id": "ocl_01m4ttwd3veh9apbewxheq5xhe",
    "name": "Claude",
    "publisher": "Unverified (registered by the client itself)",
    "dynamic": true
  },
  "orgs": [],
  "createdAt": "2026-10-25T09:00:00.000Z",
  "updatedAt": "2026-10-26T14:30:00.000Z"
}

Errors

CodeHTTP statusWhenWhat to do
resource_not_found404You have no connection with this ID.Check the ID and that your credentials are scoped to the right organization, entity, brand and mode.
permission_denied403This isn't a signed-in person in the console.Ask an organization owner or admin for a role or scope that allows this action.

It can also return these common errors: validation_failed, api_version_unsupported, invalid_json, unsupported_media_type, authentication_required, api_key_invalid, idempotency_key_required, idempotency_key_reused, idempotency_in_progress, rate_limited, internal_error.