> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyborg.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete

Permanently removes items from the index by ID, along with their contents and metadata.

```typescript theme={null}
async delete({ ids: string[] }): Promise<DeleteResponse>
```

### Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `ids` | `string[]` | - | IDs of the items to delete. An empty array is a no-op. |

### Returns

`Promise<DeleteResponse>` with `status` and `message`, e.g. `{ status: 'success', message: 'Deleted 2 vectors' }`. The count is the number of IDs sent, including IDs that don't exist.

### Exceptions

<AccordionGroup>
  <Accordion title="CyborgDBValidationError">
    The service rejects the request (HTTP `422`), for example when `ids` isn't an array of strings.
  </Accordion>

  <Accordion title="CyborgDBAuthenticationError">
    The `indexKey` or `apiKey` is invalid, or a read-only user key is used (HTTP `401`/`403`).
  </Accordion>

  <Accordion title="CyborgDBServiceError">
    The service returns `5xx`.
  </Accordion>
</AccordionGroup>

See [Errors](../errors) for the full hierarchy.

### Example Usage

```typescript theme={null}
const result = await index.delete({ ids: ['doc1', 'doc2'] });
console.log(result);
// Output: { status: 'success', message: 'Deleted 2 vectors' }

console.log((await index.listIds()).ids);
// Output: [ 'doc3' ]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.