Get a diagram
GET
https://app.eraser.io/api/files/{fileId}/diagrams/{diagramId} Example request
curl --location 'https://app.eraser.io/api/files/abc123/diagrams/diag1' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE' Example response
{
"id": "diag1",
"diagramUrl": "https://app.eraser.io/workspace/abc123?diagram=diag1&layout=canvas",
"diagramType": "sequence-diagram",
"code": "A > B: Hello",
"updatedAt": "2025-07-15T09:30:00.000Z"
} Path parameters
fileId string requiredpathID of the file containing the diagram
diagramId string requiredpathID of the diagram to retrieve
Responses
200 – The diagram
id string requiredUnique identifier for the diagram
diagramUrl string requiredURL to view the diagram in the Eraser canvas
diagramType string requiredType of the diagram
sequence-diagramentity-relationship-diagramcloud-architecture-diagramflowchart-diagrambpmn-diagram
code string requiredEraser DSL code for the diagram
updatedAt string requiredISO 8601 timestamp of when the diagram was last updated
{
"id": "string",
"diagramUrl": "https://app.eraser.io/workspace/abc123?diagram=def456&layout=canvas",
"diagramType": "sequence-diagram",
"code": "string",
"updatedAt": "2026-01-01T00:00:00Z"
}