Skip to Content
iAdvizeDocs

Disconnect an OAuth connector

Disconnects an `oauth` connector, as Disconnect on its dashboard page: its sign-in with the vendor is erased, the vendor is asked to revoke it, and an open `connector_unavailable` alert on it is resolved. The agent stops calling the connector until a member signs in again from `connection.connectUrl`, in a browser: no API call can sign in. Its switched-off tools are kept. Records a `connector.oauth_disconnected` audit entry, attributed to the API key. A connector that is not connected is answered as it is, with nothing recorded. Refused while a holdout test runs on a site whose live version uses the connector.

POST
/api/v1/connectors/{connectorId}/disconnect

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).

Path Parameters

connectorId*string

The connector id (prefixed conn_), from the site's connector list or the subject of a connector_unavailable or catalog_empty alert. A connector id that isn't yours, or that was deleted, is a 404.

Response Body

The connector, not connected.

application/json
  1. response
data*

A connector of a site: an MCP server the site's agents can call. Every secret (token, secret header values) appears as a flag and is never returned.

Example Request
curl -X POST 'https://example.com/api/v1/connectors/string/disconnect'
Example Response
{  "data": {    "id": "conn_01kvnwmagvf27rc9cze5rm9e1r",    "siteId": "site_01kvnwmagvf27rc9cze5rm9e1s",    "type": "custom",    "name": "Jira",    "url": "https://mcp.example-vendor.com/v1/mcp",    "authMode": "oauth",    "connection": {      "state": "not_connected",      "connectedAt": null,      "connectUrl": "https://iadvize.ai/dashboard/sites/site_01kvnwmagvf27rc9cze5rm9e1s/connectors/conn_01kvnwmagvf27rc9cze5rm9e1r"    },    "tokenSet": false,    "headers": [],    "settings": null,    "tools": [      {        "name": "search_issues",        "description": "Search issues.",        "enabled": true      },      {        "name": "delete_issue",        "description": null,        "enabled": false      }    ],    "disabledTools": [      "delete_issue"    ],    "lastCheckedAt": "2026-11-26T10:00:00.000Z",    "lastAnsweredAt": "2026-11-26T10:00:00.000Z",    "dashboardUrl": "https://iadvize.ai/dashboard/sites/site_01kvnwmagvf27rc9cze5rm9e1s/connectors/conn_01kvnwmagvf27rc9cze5rm9e1r",    "createdAt": "2026-11-26T09:00:00.000Z",    "updatedAt": "2026-11-26T10:00:00.000Z"  }}