Rename or move a document.
Change the name of a document, move it into another directory, or both. Nothing else
about a document is written through this API: its content comes from the import, its
state from processing. Properties other than name and directory in the body are
ignored.
A move keeps the document's id and its index entry; only its place in the tree changes.
The name must stay unique among the documents of the target directory, a taken name is
a conflict. A document is renamed or moved only once its processing has finished, in
state ready; before that the answer is 422.
Requires edit permission on the document's current directory and, for a move, on the target directory as well.
apiKeyX-API-Key<token>API key issued in the Galilea settings.
documentId*stringThe id of the document, as returned by GET /documents.
uuidapplication/json- body
Request body of PATCH /documents/{documentId}. At least one of the two properties must
be present; a property that is absent stays as it is.
1 <= propertiesname?stringThe new name. Must not contain / and must be unique among the documents of the target directory.
length <= 255directory?stringThe directory to move the document into. The calling user needs edit permission there.
uuidThe changed document.
application/json- response
One document as this API answers it, in the list and alone: what it is called, where it
sits, where its processing stands and who created it. Nothing more. There is no content property and no file reference, and there will be neither in
this API.
id*stringuuidname*stringThe document name as shown in the Galilea application; for an upload, the file name without its extension.
directory*stringThe directory the document is in.
uuidstate*DocumentStateProcessing state of a document.
- processing: the document runs through parsing and indexing.
- ready: the document was processed and can be used.
- rejected: the document was not processed because the file or the available credits do not permit it; repeating the processing changes nothing until the cause is removed.
- error: processing was attempted and failed; repeating it can succeed.
For
rejectedanderror,errorMessagecarries the text Galilea recorded, if it recorded one.
"processing""ready""rejected""error"errorMessage?|For rejected and error: the English text Galilea recorded for the case, written for support rather than for display. Not translated, not a stable code, and null when nothing was recorded; the API puts no substitute text in its place. Null in every other state.
createdAt*stringdate-timecreatedBy*The user the document was created on behalf of; for an API upload, the user the key belongs to.
lastModifiedAt*stringdate-timecurl -X PATCH "https://example.com/documents/0ea697ea-a714-4c30-a80c-00e4e45d1f60" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "0ea697ea-a714-4c30-a80c-00e4e45d1f60", "name": "esx-4cl-ag_08_connecting", "directory": "5491d698-d876-4e72-bceb-f6259c10ce9c", "state": "ready", "errorMessage": null, "createdAt": "2026-10-02T10:02:48Z", "createdBy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Integration STW" }, "lastModifiedAt": "2026-10-02T10:05:11Z"}