Docs
Schedule demo Open app

Archive a file

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

Example request

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

Example response

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

Path parameters

fileId string requiredpath

ID of the file to archive

Responses

200 – The file was archived successfully

archived boolean required

Whether the file was archived

fileUrl string required

URL of the archived file

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

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