Elements
Element endpoints manage element content and ordering, attached components, attributes, audio, covers, outputs, and the project's starting element.
Element endpoints
Create element # POST/api/v1/{hash}/element
/api/v1/{hash}/elementRequest
POST /api/v1/{hash}/elementcurl --request POST \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element"{
"boardId": "b1",
"x": 200,
"y": 300,
"width": 320,
"height": 180,
"title": "<p>Opening</p>",
"content": "<p>The story begins.</p>"
}| Property | Required | Type | Description |
|---|---|---|---|
boardId | Yes | String | Board that will contain the element. |
x | Yes | Number | Horizontal board coordinate. |
y | Yes | Number | Vertical board coordinate. |
width | No | Number | Element width. Defaults to 301. |
height | No | Number | Element height. Defaults to 121. |
theme | No | String | One of the color themes. Defaults to default. |
autoHeight | No | Boolean | Automatic-height setting. Defaults to true. |
title | No | String, null, or localized map | Element title. Defaults to null. |
content | No | String, null, or localized map | Element content. Defaults to null. |
index | No | Non-negative integer or "-" | Position in the board. Defaults to "-", which appends the element. |
The element must fit inside the 40000 by 40000 board canvas. width and height must each be between 0 and 40000; x must be between 0 and 40000 - width, and y must be between 0 and 40000 - height.
The server generates the element ID. Relationship-managed fields such as components, attributes, outputs, and covers are handled by their dedicated endpoints.
Provide title and content as valid rich text HTML. Element content supports blockquotes and Arcscript code blocks; titles support neither. Inline code is not supported.
Arcweave validates Arcscript code blocks in content, including whether the variables, attributes, and elements they reference exist. Invalid Arcscript returns 400 Bad Request with the title Bad Request - invalid Arcscript, and the request is not applied.
A string or null updates only the project's main language. Locale maps update only the supplied, already configured languages; see Localized content for examples and error handling.
If boardId does not exist, the request returns 409 Conflict with conflictType: "missing_parent". A board folder returns 400 Bad Request.
Response
Returns 201 Created with the generated resource ID and project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"],
"id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}Get element # GET/api/v1/{hash}/element/{elementID}
/api/v1/{hash}/element/{elementID}Request
GET /api/v1/{hash}/element/{elementID}curl --request GET \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}"Response
Returns 200 OK with the stored element:
{
"id": "e1",
"boardId": "b1",
"x": 10205,
"y": 10469,
"width": 138,
"height": 100,
"theme": "cyan",
"title": {
"en": {
"text": "<p>Test element 1</p>"
}
},
"content": {
"en": {
"text": "<p>Test element 1 content</p><pre><code>custom_b1.board_var_9 = 42</code></pre>"
}
},
"components": [
{
"id": "ref1",
"component": "c1"
}
],
"outputs": ["con1"]
}The response contains the stored element object and its boardId. Relationship fields can be absent or null when empty:
components: component attachments. Eachidis the attachment ID used by the component attachment endpoints.attributes: IDs of the element's attributes.assets.audio: audio attachments withid,asset,mode, anddelay. Eachidis the attachment ID used by the audio endpoints.assets.cover: the element's cover.outputs: IDs of the element's outgoing connections.
Update element # PATCH/api/v1/{hash}/element/{elementID}
/api/v1/{hash}/element/{elementID}Request
PATCH /api/v1/{hash}/element/{elementID}curl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}"{
"x": 240,
"theme": "cyan",
"title": {
"en": {
"text": "<p>Updated element title</p>"
}
},
"content": {
"en": {
"text": "<p>Updated element content.</p>"
}
}
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
theme | No | String | One of the color themes. Omit to keep the current theme. |
autoHeight | No | Boolean | Updated automatic-height setting. If omitted, the current value is retained. |
x | No | Number | Updated horizontal coordinate. If omitted, the current value is retained. |
y | No | Number | Updated vertical coordinate. If omitted, the current value is retained. |
width | No | Number | Updated width. If omitted, the current value is retained. |
height | No | Number | Updated height. If omitted, the current value is retained. |
title | No | String, null, or localized map | Updated title. Path-style localized properties are supported. |
content | No | String, null, or localized map | Updated content. Path-style localized properties are supported. |
Supported update fields are theme, autoHeight, x, y, width, height, title, and content. Path-style localized updates such as title/en/text are also supported. The id and relationship fields are immutable through this endpoint.
Geometry updates must keep the complete element inside the 40000 by 40000 board canvas. The server uses the element's current geometry for fields omitted from the request.
Provide title and content as valid rich text HTML. Element content supports blockquotes and Arcscript code blocks; titles support neither. Inline code is not supported. Arcscript in content is validated as described in Create element.
A string or null updates only the project's main language. Locale maps update only the supplied, already configured languages; see Localized content for examples and error handling.
If the element does not exist, the request returns 409 Conflict with conflictType: "missing_target".
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Reorder element # PATCH/api/v1/{hash}/element/{elementID}/index
/api/v1/{hash}/element/{elementID}/indexRequest
PATCH /api/v1/{hash}/element/{elementID}/indexcurl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/index"{
"index": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
index | Yes | Non-negative integer | New position within the current board. |
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Delete element # DELETE/api/v1/{hash}/element/{elementID}
/api/v1/{hash}/element/{elementID}Request
DELETE /api/v1/{hash}/element/{elementID}curl --request DELETE \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}"Deleting an element also deletes its incoming and outgoing connections and all attributes owned by that element. Jumpers that target the element remain, with their elementId cleared to null. Mentions of the element elsewhere in the project are converted to plain text.
If it is the project's starting element, Arcweave also clears the starting element to null. No replacement is selected automatically.
If the element does not exist, the request returns 409 Conflict with conflictType: "missing_target".
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Outputs
Reorder output # PATCH/api/v1/{hash}/element/{elementID}/output/{connectionID}/index
/api/v1/{hash}/element/{elementID}/output/{connectionID}/indexRequest
PATCH /api/v1/{hash}/element/{elementID}/output/{connectionID}/indexcurl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/output/{connectionID}/index"{
"index": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
index | Yes | Non-negative integer | New position within the element output list. |
connectionID identifies one of the outgoing connections in the element's outputs list. Outputs can only be reordered within the same element.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Starting element
The starting element is the element where the project begins when entering Play Mode.
Get the starting element # GET/api/v1/{hash}/starting-element
/api/v1/{hash}/starting-elementRetrieve the project's current starting element without exporting the project or knowing the element ID first.
The key needs Read projects (project:read), and its owner needs View projects list permission for the target project in the key's Team workspace. See Permissions.
Request
GET /api/v1/{hash}/starting-elementcurl --request GET \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/starting-element"The unversioned /api/{hash}/starting-element route is an alias. Use /api/v1 for new integrations.
This request counts toward the overall workspace API quota, but does not consume the import/export quota or require an export feature.
Response
Returns 200 OK with the starting element's ID and full stored element. The element object has the same shape as Get element, including boardId, localized text, and attachment references:
{
"elementId": "e1",
"element": {
"id": "e1",
"boardId": "b1",
"x": 10205,
"y": 10469,
"width": 138,
"height": 100,
"theme": "cyan",
"title": {
"en": {
"text": "<p>Test element 1</p>"
}
},
"content": {
"en": {
"text": "<p>Test element 1 content</p><pre><code>custom_b1.board_var_9 = 42</code></pre>"
}
},
"components": [
{
"id": "ref1",
"component": "c1"
}
],
"outputs": ["con1"]
}
}When no starting element is configured, the endpoint still returns 200 OK, with both fields set to null:
{
"elementId": null,
"element": null
}The response reflects the current selection across all boards, including recent changes made through Set the starting element. Reading it does not change the selection or add a project command-history entry.
Set the starting element # PATCH/api/v1/{hash}/starting-element
/api/v1/{hash}/starting-elementRequest
PATCH /api/v1/{hash}/starting-elementcurl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/starting-element"{
"id": "e2"
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
id | Yes | String or null | Element ID, or null to clear the starting element. |
Set id to null to clear the starting element. The id key must always be present. Use Get the starting element to read the current selection or verify an update.
Arcweave also clears the starting element automatically when that element is deleted, including when its board or a containing folder is deleted. No replacement is selected automatically. Board deletion still requires at least one playable board to remain; clearing the starting element does not remove that requirement.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Components
Attach component # POST/api/v1/{hash}/element/{elementID}/component
/api/v1/{hash}/element/{elementID}/componentRequest
POST /api/v1/{hash}/element/{elementID}/componentcurl --request POST \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/component"{
"componentId": "c1",
"index": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
componentId | Yes | String | Regular component to attach. Folders and root containers are not allowed. |
index | No | Non-negative integer or - | Position in the attachment list. Defaults to -, which appends it. |
componentId must identify a regular component. Component folders and root containers return 400 Bad Request; regular components located inside folders can be attached. index is optional.
Response
Returns 201 Created with project version data. The id is the new attachment ID, used as {componentAttachmentID} in the endpoints below:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"],
"id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}Move attached component # PATCH/api/v1/{hash}/element/{elementID}/component/{componentAttachmentID}/index
/api/v1/{hash}/element/{elementID}/component/{componentAttachmentID}/indexRequest
PATCH /api/v1/{hash}/element/{elementID}/component/{componentAttachmentID}/indexcurl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/component/{componentAttachmentID}/index"{
"targetElementId": "e2",
"index": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
targetElementId | No | String | Target element. Omit to keep the current element. |
index | Yes | Non-negative integer | New position within the target element. |
Omit targetElementId to reorder within the current element. {componentAttachmentID} is the attachment entry ID, not the component ID.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Remove attached component # DELETE/api/v1/{hash}/element/{elementID}/component/{componentAttachmentID}
/api/v1/{hash}/element/{elementID}/component/{componentAttachmentID}Request
DELETE /api/v1/{hash}/element/{elementID}/component/{componentAttachmentID}curl --request DELETE \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/component/{componentAttachmentID}"Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Attributes
Elements can own attributes. See Attributes for the shared board, element, and component attribute API.
Audio
Attach audio # POST/api/v1/{hash}/element/{elementID}/audio
/api/v1/{hash}/element/{elementID}/audioRequest
POST /api/v1/{hash}/element/{elementID}/audiocurl --request POST \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/audio"{
"assetId": "audio2",
"mode": "loop",
"delay": 50,
"index": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
assetId | Yes | String | Audio asset to attach. |
mode | No | String | Playback mode: once, loop, or stop. Defaults to once. |
delay | No | Number | Playback delay in milliseconds. Defaults to 0. |
index | No | Non-negative integer or - | Position in the audio list. Defaults to -, which appends it. |
assetId is required and must identify an audio asset. mode, delay, and index are optional.
In Play Mode, once plays the clip once, loop repeats it, and stop stops all playing instances of the clip.
Response
Returns 201 Created with project version data. The id is the new audio attachment ID, used as {audioAttachmentID} in the endpoints below:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"],
"id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}Update audio attachment # PATCH/api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}
/api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}Request
PATCH /api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}curl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/audio/{audioAttachmentID}"{
"mode": "once",
"delay": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
assetId | No | String | Replacement audio asset. If omitted, the current asset is retained. |
mode | No | String | Playback mode: once, loop, or stop. Omit to retain. |
delay | No | Number | Playback delay in milliseconds. Omit to retain. |
Send at least one of assetId, mode, or delay. {audioAttachmentID} is the attachment entry ID from the element's assets.audio list, not the asset ID.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Move audio attachment # PATCH/api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}/index
/api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}/indexRequest
PATCH /api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}/indexcurl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/audio/{audioAttachmentID}/index"{
"targetElementId": "e2",
"index": 0
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
targetElementId | No | String | Target element. Omit to keep the current element. |
index | Yes | Non-negative integer | New position within the target element. |
Omit targetElementId to reorder within the current element. {audioAttachmentID} is the attachment entry ID, not the asset ID.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Remove audio attachment # DELETE/api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}
/api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}Request
DELETE /api/v1/{hash}/element/{elementID}/audio/{audioAttachmentID}curl --request DELETE \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/audio/{audioAttachmentID}"Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Covers
Set element cover # PATCH/api/v1/{hash}/element/{elementID}/cover
/api/v1/{hash}/element/{elementID}/coverRequest
PATCH /api/v1/{hash}/element/{elementID}/covercurl --request PATCH \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data @payload.json \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/cover"{
"cover": {
"id": "image_asset_id"
}
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
cover | Yes | Object | Cover definition. Unknown fields are rejected. |
cover.type | No | String | image, template-image, icon, video, template-video, or youtube. |
cover.id | Conditional | String | Project asset ID. Required when type is omitted or uses an image/video project asset. |
cover.file | Conditional | String | Icon library path in artist/icon-name form, such as Arcweave/star. Required when type is icon. |
cover.url | Conditional | String | YouTube URL. Required when type is youtube. |
cover.mode | No | String | Video playback mode: once, loop, or stop. |
cover.autoplay | No | Boolean | Whether video playback starts automatically. |
cover.showControls | No | Boolean | Whether video playback controls are visible. |
cover.showOptions | No | Boolean | Whether video playback options are visible. |
Set a video cover:
{
"cover": {
"id": "video_asset_id",
"type": "video",
"mode": "loop",
"autoplay": true,
"showControls": false,
"showOptions": true
}
}The referenced asset must exist and have a supported cover type. Fields are restricted by the selected cover type:
| Cover type | Required fields | Optional fields |
|---|---|---|
image, template-image | id | type |
video, template-video | id | type, mode, autoplay, showControls, showOptions |
icon | type, file | None |
youtube | type, url | autoplay, showControls |
When id is supplied, Arcweave applies the allowed fields of the referenced asset's type and stores that type, replacing any type in the request. Image and template-image assets keep their type; video and template-video assets are stored as video. If you also send type, the fields must be valid for that type as well. Image covers reject video playback fields, and YouTube covers reject mode and showOptions. Mixed or unsupported fields return 400 Bad Request.
The new cover replaces the element's existing cover, including any playback options you omit.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Delete element cover # DELETE/api/v1/{hash}/element/{elementID}/cover
/api/v1/{hash}/element/{elementID}/coverRequest
DELETE /api/v1/{hash}/element/{elementID}/covercurl --request DELETE \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/cover"Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Common errors
| Status | Meaning |
|---|---|
400 | Invalid fields, malformed localized content, invalid Arcscript, board folder target, unsupported asset type, component folder/root attachment, or missing required payload data. |
403 | Project permission denied. |
404 | Project, element, target element, component, asset, component or audio attachment, or output not found. |
409 | An unknown locale was supplied, the board to create in or the element to update or delete does not exist, or the board or target resource changed before the command was applied. |