Delete one of the caller's own connections (destructive)
Removes the integration_connections row globally. Intent is destructive: 'I never want to use this credential anywhere again'. Refused with 409 connection_pinned while an admin pin or an org default (enforced or soft) names the connection: those sets carry no foreign key, so the dead id would fail every consuming run. An admin removes it from the pin(s) or default first. A member pin does not block the delete. The caller's own member pins and schedule overrides drop the connection in the same transaction — a pin it empties is removed (the cascade falls back), and a schedule override it empties drops that integration and disables the schedule (its job is removed) rather than let it fall back unattended; GET /api/me/connections/{connectionId}/delete-impact lists them beforehand. Another member's pins keep the id, and their next run fails (pinned_connection_unavailable) until they pick again — a set never shrinks behind its owner. Another actor's enabled schedules naming the connection are disabled in the same transaction (disabled_reason: connection_deleted, jobs removed), their overrides kept: while the connection stays unreachable, re-enabling one requires a new choice. Delete-impact counts them (other_schedules_disabled_count). Surfaced only from the /connections management page — agent-surface unlinks now drop the member pin instead (see DELETE /api/me/integration-pins/{agentPackageId}/integrations/{integrationPackageId}). With a delegated or end-user credential, only connections inside its bound organization (and space, when it pins one) can be deleted (204 with no effect otherwise).
/api/me/connections/{connectionId}Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
uuidcurl -X DELETE "https://your-instance/api/me/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"type": "https://docs.appstrate.dev/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing session",
"code": "unauthorized",
"request_id": "req_abc123"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"param": "string",
"retry_after": 0,
"errors": [
{
"field": "string",
"code": "string",
"message": "string",
"title": "string",
"candidate_connections": [
{
"id": "string",
"label": "string",
"account_id": "string",
"owned_by_actor": true,
"needs_reconnection": true
}
],
"connection_id": "string",
"missing_scopes": [
"string"
],
"owned_by_actor": true,
"required_scopes": [
"string"
],
"auth_key": "string",
"required_auth_key": "string",
"available_auth_keys": [
"string"
],
"connect_url": "http://example.com",
"expiresAt": "2019-08-24T14:15:22Z",
"packageId": "string"
}
]
}