Disconnect an integration
Integrations
Disconnect Integration
Best-effort revoke at the third-party provider, then soft-delete the row and clear encrypted tokens.
DELETE
Disconnect an integration
Disconnect a connected integration. The endpoint:
- Best-effort revokes the refresh token at the third-party provider (e.g.
https://oauth2.googleapis.com/revoke). Provider revoke failures are logged but do not fail the request — the local-side disconnect always proceeds. - Clears
access_token_encryptedandrefresh_token_encrypted. - Sets
deleted_at = now()andstatus = 'disconnected'.
integrations:manage.
The row is soft-deleted, not removed, because flow_versions from the past may still reference its id. Calls placed against active flow agents that reference a disconnected integration will hit the integration-call node’s error transition with a structured integration_disconnected result.
To re-connect the same Google account, finish the OAuth flow from the dashboard’s Integrations page (the public API does not expose a connect endpoint). The OAuth callback finds the existing soft-deleted row (matched by (company_id, provider, account_label)), revives it, and writes fresh tokens.
Returns 204 No Content on success.