Skip to main content
POST
/
documents
/
update-document
Update Document
curl --request POST \
  --url https://api.zeroentropy.dev/v1/documents/update-document \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "collection_name": "<string>",
  "path": "<string>",
  "metadata": {},
  "index_status": "not_parsed"
}
'
{
  "message": "Success!"
}

Authorizations

Authorization
string
header
required

The Authorization header must be provided in the format Bearer <your-api-key>.

You can get your API Key at the Dashboard!

Body

application/json
collection_name
string
required

The name of the collection.

path
string
required

The filepath of the document that you are updating. A 404 Not Found status code will be returned if no document with this path was found.

metadata
object

If this field is provided, the given metadata json will replace the document's existing metadata json. In other words, if you want to add a new field, you will need to provide the entire metadata object (Both the original fields, and the new field).

index_status
enum<string> | null

If the document is in the index_status of parsing_failed orindexing_failed, then this endpoint allows you to update the index status tonot_parsedandnot_indexed`, respectively. This allows the document to re-attempt to parse/index after failure.

Available options:
not_parsed,
not_indexed

Response

Successful Response

message
string
default:Success!

This string will always be "Success!". This may change in the future.