> For a complete page index of the Captain API documentation, fetch https://docs.filesearch.dev/llms.txt?excludeSpec=true

# Delete Sync

DELETE https://api.filesearch.dev/v2/syncs/{sync_id}

Remove a sync: syncing stops and the connector is marked inactive. Its per-object sync state is cleared. Documents already indexed by the sync remain in the collection.

Reference: https://docs.filesearch.dev/reference/sync/manage/delete

## Request

### Path parameters

- `sync_id` (string, required) — The sync id.

### Headers

- `authorization` (string, optional, nullable) — Bearer \{api\_key}. Your Captain API key.

## Response

### 200

Successful Response

- `sync_id` (string, optional)
- `status` (enum, optional)
  - Allowed values: `inactive`
- `deactivated_at` (string, optional)

## Examples

**Response**

```json
{
  "sync_id": "sync_7e0abee6e110457db2c8",
  "status": "inactive",
  "deactivated_at": "2026-08-07T17:00:29.773962+00:00"
}
```

**SDK Code**

```python Python REST
import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

response = requests.delete(
    f"{BASE_URL}/v2/syncs/sync_7e0abee6e110457db2c8",
    headers=headers
)

print(response.json())
```

```typescript TypeScript REST
const BASE_URL = "https://api.filesearch.dev";
const API_KEY = "your_api_key";

const response = await fetch(
    `${BASE_URL}/v2/syncs/{sync_id}`,
    {
        method: "DELETE",
        headers: {
            "Authorization": `Bearer ${API_KEY}`,
            "Content-Type": "application/json"
        }
    }
);

const data = await response.json();
console.log(data);
```