Docs
Schedule demo Open app

Delete a diagram

DELETE https://app.eraser.io/api/files/{fileId}/diagrams/{diagramId}

Example request

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

Example response

{
  "deleted": true,
  "fileUrl": "https://app.eraser.io/workspace/abc123"
}

Path parameters

fileId string requiredpath

ID of the file containing the diagram

diagramId string requiredpath

ID of the diagram to delete

Responses

200 – The diagram was deleted successfully

deleted boolean required

Whether the diagram was deleted

fileUrl string required

URL of the file that contained the diagram

200 response
{
  "deleted": true,
  "fileUrl": "https://app.eraser.io/workspace/abc123"
}

400 – Invalid file ID or diagram ID

401 – Missing or invalid bearer token

403 – Unauthorized

404 – File or diagram not found

500 – Internal server error