post
https://app.eraser.io/api/files
Creates a new Eraser file with optional document content and canvas elements.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Example request
curl --location 'https://app.eraser.io/api/files' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE' \
--data '{
"title": "My File",
"document": "# Hello\n\nThis is a test."
}'
An example request with diagram elements:
curl --location 'https://app.eraser.io/api/files' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE' \
--data '{
"title": "Diagram File",
"elements": [
{
"type": "diagram",
"diagramType": "sequence-diagram",
"code": "A > B: Hello"
}
]
}'
Example response
{
"id": "abc123",
"fileUrl": "https://app.eraser.io/workspace/abc123",
"title": "My File",
"author": "api",
"folderId": null,
"createdAt": "2025-07-15T09:30:00.000Z",
"updatedAt": "2025-07-15T09:30:00.000Z",
"linkAccess": "no-link-access",
"content": {
"elements": [],
"document": "# Hello\n\nThis is a test."
}
} 400Invalid request body
401Missing or invalid bearer token
403Unauthorized
500Internal server error