---
title: "Delete Source Connection"
method: DELETE
path: "/source-connections/{source_connection_id}"
tags: ["source-connections"]
---

# Delete Source Connection

`DELETE /source-connections/{source_connection_id}`

Permanently delete a source connection and all its synced data.

**What happens when you delete:**

1. Any running sync is cancelled and the API waits (up to 15 s) for the
   worker to stop writing.
2. The source connection, sync configuration, job history, and entity
   metadata are cascade-deleted from the database.
3. A background cleanup workflow is scheduled to remove data from the
   vector database (Vespa) and raw data storage (ARF). This may take
   several minutes for large datasets but does **not** block the response.

The API returns immediately after step 2. Vector database cleanup happens
asynchronously -- the data becomes unsearchable as soon as the database
records are deleted.

**Warning**: This action cannot be undone.

## Path parameters

- `source_connection_id` string, uuid, required — Unique identifier of the source connection to delete (UUID)

## Response `200`

Deleted source connection

- SourceConnection — Complete source connection details including auth, config, sync status, and entities. This schema provides full information about a source connection, suitable for detail views and monitoring sync progress.
  - `id` string, uuid, required — Unique identifier of the source connection
  - `organization_id` string, uuid, required — Organization this connection belongs to
  - `name` string, required — Display name of the connection
  - `description` string, nullable — Optional description of the connection's purpose
  - `short_name` string, required — Source type identifier
  - `readable_collection_id` string, required — Collection this connection belongs to
  - `status` 'active' | 'pending_auth' | 'syncing' | 'error' | 'inactive' | 'pending_sync', required — Source connection status enum - represents overall connection state.
  - `created_at` string, date-time, required — When the connection was created (ISO 8601)
  - `modified_at` string, date-time, required — When the connection was last modified (ISO 8601)
  - `auth` AuthenticationDetails, required — Authentication information.
    - `method` 'direct' | 'oauth_browser' | 'oauth_token' | 'oauth_byoc' | 'auth_provider', required — Authentication methods for source connections.
    - `authenticated` boolean, required
    - `authenticated_at` string, date-time, nullable
    - `expires_at` string, date-time, nullable
    - `auth_url` string, nullable — For pending OAuth flows
    - `auth_url_expires` string, date-time, nullable
    - `redirect_url` string, nullable
    - `claim_token` string, nullable — One-time token to verify OAuth flow ownership. Only returned when creating an OAuth browser connection.
    - `provider_readable_id` string, nullable
    - `provider_id` string, nullable
  - `config` object, nullable — Source-specific configuration values
  - `schedule` ScheduleDetails — Schedule information.
    - `cron` string, nullable
    - `next_run` string, date-time, nullable
    - `continuous` boolean
    - `cursor_field` string, nullable
    - `cursor_value` unknown
  - `sync` SyncDetails — Sync execution details.
    - `total_runs` integer
    - `successful_runs` integer
    - `failed_runs` integer
    - `last_job` SyncJobDetails — Sync job details.
      - `id` string, uuid, required
      - `status` 'created' | 'pending' | 'running' | 'completed' | 'failed' | 'cancelling' | 'cancelled', required — Sync job status enum.
      - `started_at` string, date-time, nullable
      - `completed_at` string, date-time, nullable
      - `duration_seconds` number, nullable
      - `entities_inserted` integer
      - `entities_updated` integer
      - `entities_deleted` integer
      - `entities_failed` integer
      - `error` string, nullable
  - `sync_id` string, uuid, nullable — ID of the associated sync (internal use)
  - `entities` EntitySummary — Entity state summary.
    - `total_entities` integer
    - `by_type` object
  - `federated_search` boolean — Whether this source uses federated (real-time) search instead of syncing

## Other responses

- `404` — Source Connection Not Found
- `422` — Validation Error
- `429` — Rate Limit Exceeded

---

[API](https://skmtc.net/airweave-ai/apis/airweave.md) · [All operations](https://skmtc.net/airweave-ai/apis/airweave/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/airweave-ai/airweave/versions/bf410c28c0c6/schema)
