Delete a document
Remove a document from your index by its ID.
import { Etoile } from "@etoile-dev/client";
const etoile = new Etoile({
apiKey: process.env.ETOILE_API_KEY,
});
await etoile.delete("starry-night");const response = await fetch("https://etoile.dev/api/v1/documents", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.ETOILE_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
id: "starry-night",
}),
});curl -X DELETE "https://etoile.dev/api/v1/documents" \
-H "Authorization: Bearer $ETOILE_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "starry-night"
}'Related
- Delete document (DELETE) — API reference
- Index text — index a new document