Update a file
PUT
https://app.eraser.io/api/files/{fileId} Example request
curl --location --request PUT 'https://app.eraser.io/api/files/abc123' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE' \
--data '{
"title": "Updated Title",
"document": "# Updated Content"
}' Example response
{
"id": "abc123",
"fileUrl": "https://app.eraser.io/workspace/abc123",
"title": "Updated Title",
"author": "user-id-1",
"folderId": null,
"createdAt": "2025-07-01T12:00:00.000Z",
"updatedAt": "2025-07-15T10:00:00.000Z",
"linkAccess": "no-link-access",
"content": {
"elements": [],
"document": "# Updated Content"
}
} Path parameters
fileId string requiredpathID of the file to update
Request body
title string New title for the file
folderId string ID of the folder to move the file to
document string New markdown content for the file's document. Replaces existing document content. Supports diagram code blocks (e.g., ```sequence-diagram) which are converted to embedded diagrams.