> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-qstashminimalrightbar.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Vectors

> This endpoint deletes the vectors with given IDs.

## Request

You can either upsert a single vector, or multiple vectors in a array.

<ParamField body="ids" type="string[]" required>
  The IDs of the vectors to be deleted.
</ParamField>

## Response

<ResponseField name="deleted" type="number">
  The count of the successfully deleted vectors.
</ResponseField>

<RequestExample>
  ```sh curl
  curl https://better-dodo-20522-us1-vector.upstash.io/delete \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -d '["id11", "id12", "abcde"]'
  ```

  ```js Node
  const url = "https://better-dodo-20522-us1-vector.upstash.io/delete"; // Replace with your index endpoint.
  const token = "YOUR_TOKEN"; // Replace with your actual token
  const data = {
    ids: ["1", "2", "abcde"],
  };

  fetch(url, {
    method: "DELETE",
    headers: {
      Authorization: `Bearer ${token}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(data),
  })
    .then((response) => response.json())
    .then((data) => console.log(data))
    .catch((error) => console.error("Error:", error));
  ```

  ```python Python
  import requests
  import json

  url = 'https://better-dodo-20522-us1-vector.upstash.io/delete' # Replace with your index endpoint.
  token = 'YOUR_TOKEN' # Replace with your actual token
  headers = {
      'Authorization': f'Bearer {token}',
      'Content-Type': 'application/json'
  }
  data = {
      'ids': ["1", "2", "abcde"],
  }

  response = requests.delete(url, headers=headers, data=json.dumps(data))
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "result" : {
      "deleted" : 2
    }
  }
  ```
</ResponseExample>
