Excalidraw+ API

Update read-only link

Change a read-only link: its name, where it starts, its display options, or turn it off and on with status.

Only the fields you send change. A new start (frameId, elementIds or area) also renders a new preview image. A link that is inactive shows nothing until it is active again, and keeps its URL.

Use cases:

  • Moving a link's start after the drawing grew
  • Turning an embed off for a while
  • Switching an embed to dark mode
PATCH
/api/v1/scenes/{sceneId}/readonly-links/{linkId}

Authorization

apiKey
headerAuthorizationBearer <Bearer>

The API will use the Authorization: Bearer <your-key> header for requests.

Path Parameters

sceneId*string
linkId*string

Request Body

application/json
  1. body
name?string

The link's name in the scene's Embeddable links list.

Length1 <= length
frameId?string

Start on this frame, which then fills the view. Not combinable with elementIds or area.

elementIds?array<string>

Start on these elements with some space around them, e.g. the ids a write tool returned. Not combinable with frameId or area.

Items1 <= items <= 2000
area?

Start on this part of the scene, in scene coordinates. Not combinable with frameId or elementIds.

showTitle?boolean

Show the scene's name at the top.

showMenu?boolean

Show the menu, which saves the scene to a file or as an image.

darkMode?boolean

Show the scene in dark mode.

disableInteraction?boolean

Stop viewers from panning and zooming: they only see the starting area.

showDarkModeToggle?boolean

Show a button that switches between light and dark mode.

showFrameOutlines?boolean

Show the outlines and names of frames.

status?|

'inactive' turns the link off, 'active' turns it on again.

Response Body

This response returns the changed link with its URL and embed code.

application/json
  1. response

This response returns the changed link with its URL and embed code.

id*string
scene*string
workspace*string
created*string
updated*string
updatedBy*string|null
creator*string|null
preview*string|null
previewPath*string|null
type*"readonly"
Value in"readonly"
status*|
name*string|null
data*
url*string

The read-only page, in the link's theme.

embedHtml*string

An iframe that embeds the page in another site.

Example Request
curl -X PATCH 'https://api.excalidraw.com/api/v1/scenes/string/readonly-links/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "id": "string",
  "scene": "string",
  "workspace": "string",
  "created": "string",
  "updated": "string",
  "updatedBy": "string",
  "creator": "string",
  "preview": "string",
  "previewPath": "string",
  "type": "readonly",
  "status": "active",
  "name": "string",
  "data": {
    "showTitle": true,
    "showMenu": true,
    "darkMode": true,
    "disableInteraction": true,
    "showDarkModeToggle": true,
    "showFrameOutlines": true,
    "x": 0,
    "y": 0,
    "width": 0,
    "height": 0
  },
  "url": "string",
  "embedHtml": "string"
}

Last updated on