Update a file

Updates a file's metadata and/or document content. Only provided fields are updated.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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 Params
string
required

ID of the file to update

Body Params
string

New title for the file

string

ID of the folder to move the file to

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.

Responses

400

Invalid file ID

401

Missing or invalid bearer token

403

Unauthorized

404

File not found (or file is private, archived, a template, or belongs to a different team)

500

Internal server error

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json