Disconnect an app
Disconnect a connected app, the teardown half of the connections lifecycle (connect = initiate_agent_connection, opt an agent in = set_agent_connection). scope 'agent' (default) disconnects it for THIS agent: if the agent has its OWN dedicated account it's revoked at the provider and the row removed; if the agent was opted into the workspace's account, only its opt-in goes and the account stays connected for the other agents. scope 'workspace' disconnects the workspace account, revoking it for EVERY agent that shares it. Revoking an OAuth grant is irreversible, the app must be re-authorized to reconnect. Use this to free a clean slate: an already-active connection blocks initiate_agent_connection from reconnecting. Requires workspace-admin. Returns `{ ok, toolkit, scope }` (plus `revokeFailed: true` if the row left the agent but the provider revoke couldn't complete and is flagged for retry).
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/disconnect_agent_connection" \ -H "Content-Type: application/json" \ -d '{ "toolkit": "string", "agent": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Delete custom integration POST
Delete a workspace custom HTTP integration by id (from list_workspace_integrations) and purge its stored secrets. Destructive, needs confirm: true.
Disconnect an app (workspace) POST
Disconnect a WORKSPACE-level app, revoking its account at the provider for the whole workspace (every agent loses it). Irreversible, the app must be re-authorized to reconnect. Pass the toolkit slug. Destructive, needs confirm: true.