Skip to main content
POST
/
v1
/
indexes
/
delete
Delete Index
curl --request POST \
  --url https://api.example.com/v1/indexes/delete

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.

This action is irreversible. All items, vectors and metadata will be permanently lost.
Permanently delete an index and all its data.

Authentication

Required - API key via X-API-Key header:
X-API-Key: cyborg_your_api_key_here
You can get an API key from the CyborgDB Admin Dashboard. For more info, follow this guide.

Request Body

{
  "index_name": "my_index",
  "index_key": "64_character_hex_string_representing_32_bytes"
}

Response

{
  "status": "success",
  "message": "Index 'my_index' deleted successfully"
}

Exceptions

  • 401: Authentication failed (invalid API key)
  • 404: Index not found
  • 422: Invalid request parameters
  • 500: Internal server error

Example Usage

curl -X POST "http://localhost:8000/v1/indexes/delete" \
     -H "X-API-Key: cyborg_your_api_key_here" \
     -H "Content-Type: application/json" \
     -d '{
       "index_name": "my_index",
       "index_key": "your_64_character_hex_key_here"
     }'

Confirmation Example

# First, list indexes to confirm the target index exists
curl -X GET "http://localhost:8000/v1/indexes/list" \
     -H "X-API-Key: cyborg_your_api_key_here"

# Then delete the specific index
curl -X POST "http://localhost:8000/v1/indexes/delete" \
     -H "X-API-Key: cyborg_your_api_key_here" \
     -H "Content-Type: application/json" \
     -d '{
       "index_name": "old_index",
       "index_key": "your_64_character_hex_key_here"
     }'

# Verify deletion by listing indexes again
curl -X GET "http://localhost:8000/v1/indexes/list" \
     -H "X-API-Key: cyborg_your_api_key_here"

Data Removal

When an index is deleted, the following data is permanently removed:
  • Index structure: All index files and metadata
  • Vector embeddings: All stored vector data
  • Item contents: All associated content data
  • Metadata: All key-value metadata pairs
  • Training data: Any cached training information

Use Cases

  • Cleanup: Remove outdated or test indexes
  • Resource management: Free up storage and memory
  • Development lifecycle: Clean up development environments
  • Data governance: Remove indexes containing deprecated data