curl --location --request POST 'https://api.getmetal.io/v1/index' \--header 'Content-Type: application/json' \--header 'x-metal-api-key: <api-key>' \--header 'x-metal-client-id: <client-id>' \--data-raw '{ "index": "index-id", "text": "text that will replace the existing document", "id": "id-to-update", "metadata": { "fieldA": "my custom value" }}'
Copy
Ask AI
{ "id": "id-to-update", "text": "text that will replace the existing document", "createdAt": "2023-03-17T17:21:13.163Z", "metadata": { "fieldA": "my custom value" }}
🧬 Embedding Documents
Update Document
This endpoint updates and replaces an existing Document(embedding).
POST
/
v1
/
index
Copy
Ask AI
curl --location --request POST 'https://api.getmetal.io/v1/index' \--header 'Content-Type: application/json' \--header 'x-metal-api-key: <api-key>' \--header 'x-metal-client-id: <client-id>' \--data-raw '{ "index": "index-id", "text": "text that will replace the existing document", "id": "id-to-update", "metadata": { "fieldA": "my custom value" }}'
Copy
Ask AI
{ "id": "id-to-update", "text": "text that will replace the existing document", "createdAt": "2023-03-17T17:21:13.163Z", "metadata": { "fieldA": "my custom value" }}
curl --location --request POST 'https://api.getmetal.io/v1/index' \--header 'Content-Type: application/json' \--header 'x-metal-api-key: <api-key>' \--header 'x-metal-client-id: <client-id>' \--data-raw '{ "index": "index-id", "text": "text that will replace the existing document", "id": "id-to-update", "metadata": { "fieldA": "my custom value" }}'
Copy
Ask AI
{ "id": "id-to-update", "text": "text that will replace the existing document", "createdAt": "2023-03-17T17:21:13.163Z", "metadata": { "fieldA": "my custom value" }}