## Cancel Index Sync

`client.indexes.cancelSync(stringindexID, IndexCancelSyncParamsparams?, RequestOptionsoptions?): IndexCancelSyncResponse`

**post** `/api/v1/indexes/{index_id}/sync/cancel`

Cancel the running sync for an index. Returns 409 if no sync is running.

### Parameters

- `indexID: string`

- `params: IndexCancelSyncParams`

  - `organization_id?: string | null`

  - `project_id?: string | null`

### Returns

- `IndexCancelSyncResponse = unknown`

### Example

```typescript
import LlamaCloud from '@llamaindex/llama-cloud';

const client = new LlamaCloud({
  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});

const response = await client.indexes.cancelSync('index_id');

console.log(response);
```

#### Response

```json
{}
```
