Docs
Schedule demo Open app

Get a file

GET https://app.eraser.io/api/files/{fileId}

Example request

curl --location 'https://app.eraser.io/api/files/abc123' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE'

Example response

{
  "id": "abc123",
  "fileUrl": "https://app.eraser.io/workspace/abc123",
  "title": "My File",
  "author": "user-id-1",
  "folderId": null,
  "createdAt": "2025-07-01T12:00:00.000Z",
  "updatedAt": "2025-07-15T09:30:00.000Z",
  "linkAccess": "no-link-access",
  "content": {
    "elements": [
      {
        "id": "elem1",
        "type": "diagram",
        "diagramType": "sequence-diagram",
        "code": "A > B: Hello",
        "x": 0,
        "y": 0,
        "width": 400,
        "height": 300
      }
    ],
    "document": "# Hello\n\nThis is a test."
  }
}

Path parameters

fileId string requiredpath

ID of the file to retrieve

Responses

200 – The file with its content

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