Update metadata (PATCH)

Update a document's metadata without re-indexing.


PATCH/api/v1/documents

Update document metadata.


Request body

ParameterTypeDescription
idrequiredstringDocument ID to update.
metadatarequiredobjectNew metadata (replaces existing).

Example

import { Etoile } from "@etoile-dev/client";

const etoile = new Etoile({
apiKey: process.env.ETOILE_API_KEY,
});

await etoile.patch({
id: "starry-night",
metadata: {
  artist: "Vincent van Gogh",
  year: 1889,
  featured: true,
},
});

Response

{
"message": "Document metadata updated successfully.",
"id": "starry-night"
}

Auth

Requires secret key.