Operations 5
Documentation
Documentation
https://docs.eraser.io/docs/eraser-api
APIReference
https://docs.eraser.io/reference
GettingStarted
https://docs.eraser.io/docs/quickstart
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/eraser-files-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Eraser AI Requests Files API
description: The Eraser REST API provides programmatic access to diagram generation, file management, folder management, audit logs, and team usage metrics. Developers can generate diagrams from natural language prompts or Eraser DSL, create and manage files and diagrams on the canvas, and retrieve aggregated usage metrics. API access requires a team API token and is available on Starter, Business, and Enterprise paid plans with usage-based billing for API calls beyond plan credits.
version: v1.0
contact:
name: Eraser Support
url: https://www.eraser.io/
email: hello@eraser.io
termsOfService: https://www.eraser.io/
servers:
- url: https://app.eraser.io
description: Eraser API Server
security:
- bearerAuth: []
tags:
- name: Files
description: Create and manage Eraser files
paths:
/api/files:
post:
operationId: createFile
summary: Create a new file
description: Creates a new Eraser file with optional document content and canvas elements.
tags:
- Files
externalDocs:
description: API documentation
url: https://docs.eraser.io/reference/create-file
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFileRequest'
responses:
'200':
description: File created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/FileWithContent'
'400':
description: Invalid request body
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
operationId: listFiles
summary: List files
description: Returns a paginated list of files for the authenticated team, with optional filtering by folder, author, and sorting.
tags:
- Files
externalDocs:
description: API documentation
url: https://docs.eraser.io/reference/list-files
parameters:
- name: limit
in: query
required: false
description: Maximum number of files to return (1-500). Defaults to 100.
schema:
type: integer
minimum: 1
maximum: 500
default: 100
- name: cursor
in: query
required: false
description: Cursor for pagination. Use nextCursor from a previous response.
schema:
type: string
- name: folderId
in: query
required: false
description: Filter files by folder ID.
schema:
type: string
- name: sort
in: query
required: false
description: Sort field with optional - prefix for descending order. Defaults to -updatedAt.
schema:
type: string
enum:
- createdAt
- -createdAt
- updatedAt
- -updatedAt
default: -updatedAt
- name: author
in: query
required: false
description: Filter by author (user ID or email address).
schema:
type: string
responses:
'200':
description: Files retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/FileList'
'400':
description: Invalid request parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/files/{fileId}:
get:
operationId: getFile
summary: Get a file
description: Retrieves a specific file by ID, including its content and canvas elements.
tags:
- Files
externalDocs:
description: API documentation
url: https://docs.eraser.io/reference/get-file
parameters:
- name: fileId
in: path
required: true
description: ID of the file to retrieve
schema:
type: string
responses:
'200':
description: File retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/FileWithContent'
'400':
description: Invalid file ID format
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized access
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: File not found, private, archived, template, or belongs to different team
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
operationId: updateFile
summary: Update a file
description: Updates a file's title, folder location, or document content. Markdown diagram code blocks in the document are converted to embedded diagrams.
tags:
- Files
externalDocs:
description: API documentation
url: https://docs.eraser.io/reference/update-file
parameters:
- name: fileId
in: path
required: true
description: ID of the file to update
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateFileRequest'
responses:
'200':
description: File updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/FileWithContent'
'400':
description: Invalid file ID
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: File not found, private, archived, template, or belongs to different team
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
operationId: archiveFile
summary: Archive a file
description: Archives (soft-deletes) a file by ID. The file can be restored through the Eraser UI afterward.
tags:
- Files
externalDocs:
description: API documentation
url: https://docs.eraser.io/reference/archive-file
parameters:
- name: fileId
in: path
required: true
description: ID of the file to archive
schema:
type: string
responses:
'200':
description: File archived successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ArchiveFileResponse'
'400':
description: Invalid file ID
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: File not found, private, archived, template, or belongs to different team
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
FileWithContent:
allOf:
- $ref: '#/components/schemas/File'
- type: object
properties:
content:
$ref: '#/components/schemas/FileContent'
FileContent:
type: object
properties:
elements:
type: array
items:
$ref: '#/components/schemas/CanvasElementWithId'
description: Canvas elements in the file
document:
type: string
description: Markdown content of the file's document
ArchiveFileResponse:
type: object
required:
- archived
- fileUrl
properties:
archived:
type: boolean
description: Whether the file was successfully archived
fileUrl:
type: string
description: URL of the archived file
Error:
type: object
properties:
error:
type: string
description: Error message describing what went wrong
DiagramType:
type: string
enum:
- sequence-diagram
- entity-relationship-diagram
- cloud-architecture-diagram
- flowchart-diagram
- bpmn-diagram
description: Type of Eraser diagram
UpdateFileRequest:
type: object
properties:
title:
type: string
description: New title for the file
folderId:
type: string
description: ID of the folder to move the file to
document:
type: string
description: New markdown content. Supports diagram code blocks converted to embedded diagrams.
CreateFileRequest:
type: object
properties:
title:
type: string
description: Title of the file. Defaults to "Untitled".
folderId:
type: string
description: Identifier for the folder destination
document:
type: string
description: Markdown content for the file's document. Supports diagram code blocks.
linkAccess:
$ref: '#/components/schemas/LinkAccess'
elements:
type: array
items:
$ref: '#/components/schemas/CanvasElement'
description: Canvas elements (diagrams, shapes, etc.)
File:
type: object
required:
- id
- fileUrl
- title
- author
- createdAt
- updatedAt
- linkAccess
properties:
id:
type: string
description: Unique file identifier
fileUrl:
type: string
description: URL to view the file in Eraser
title:
type: string
description: File name
author:
type: string
description: Creator's user ID
folderId:
type:
- string
- 'null'
description: Parent folder ID, or null if at root
createdAt:
type: string
format: date-time
description: ISO 8601 creation timestamp
updatedAt:
type: string
format: date-time
description: ISO 8601 last modification timestamp
linkAccess:
$ref: '#/components/schemas/LinkAccess'
FileList:
type: object
required:
- files
properties:
files:
type: array
items:
$ref: '#/components/schemas/File'
nextCursor:
type:
- string
- 'null'
description: Cursor for retrieving the next page of results
LinkAccess:
type: string
enum:
- no-link-access
- anyone-with-link-can-edit
- publicly-viewable
- publicly-editable
- sso-readable
- sso-editable
description: File link access permission level
CanvasElement:
type: object
required:
- type
properties:
type:
type: string
description: Element category (e.g., diagram, rectangle, ellipse)
diagramType:
$ref: '#/components/schemas/DiagramType'
code:
type: string
description: Eraser DSL code for diagram rendering
x:
type: number
description: Horizontal canvas position
y:
type: number
description: Vertical canvas position
width:
type: number
description: Element width
height:
type: number
description: Element height
CanvasElementWithId:
allOf:
- $ref: '#/components/schemas/CanvasElement'
- type: object
properties:
id:
type: string
description: Unique element identifier
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Team-specific API bearer token from Eraser settings
auditApiKey:
type: apiKey
in: header
name: Authorization
description: Audit-specific API key for accessing audit log endpoints
externalDocs:
description: Eraser API Documentation
url: https://docs.eraser.io/docs/eraser-api