Elements
Element endpoints manage element content and ordering, attached components, attributes, audio, covers, linked boards, 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, covers, and linked boards are handled by their dedicated endpoints.
Provide title and content as valid Arcweave HTML content using <p>, <b>, or <code> tags.
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.
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 Arcweave HTML content using <p>, <b>, or <code> tags.
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 automatically deletes all attributes owned by that element.
If it is the project's starting element, Arcweave also clears the starting element to null. No replacement is selected automatically.
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
Set the starting element # PATCH/api/v1/{hash}/starting-element
/api/v1/{hash}/starting-elementRequest
The starting element is the element where the project begins when entering Play Mode.
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.
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 | Component to attach. |
index | No | Non-negative integer or - | Position in the attachment list. Defaults to -, which appends it. |
componentId is required. index is optional.
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"
}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 | Play Mode supports once, loop, and 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.
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"
}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 | Play Mode supports once, loop, and stop. Omit to retain. |
delay | No | Number | Playback delay in milliseconds. Omit to retain. |
Send at least one of assetId, mode, or delay.
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.
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
Request fields:
| Field | 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 filename. 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. |
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"
}
}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 type is omitted, Arcweave resolves it from the asset identified by id and applies that type's allowed fields. Image covers reject video playback fields, and YouTube covers reject mode and showOptions. Mixed or unsupported fields return 400 Bad Request.
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"]
}Linked boards
Set element linked board # PATCH/api/v1/{hash}/element/{elementID}/linked-board
/api/v1/{hash}/element/{elementID}/linked-boardRequest
PATCH /api/v1/{hash}/element/{elementID}/linked-boardcurl --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}/linked-board"{
"boardId": "b1"
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
boardId | Yes | String | Board to link to the element. |
The board must exist.
Response
Returns 200 OK with project version data:
{
"version": 12,
"newVersion": 13,
"versionTime": ["1720788000", "123456"]
}Delete element linked board # DELETE/api/v1/{hash}/element/{elementID}/linked-board
/api/v1/{hash}/element/{elementID}/linked-boardRequest
DELETE /api/v1/{hash}/element/{elementID}/linked-boardcurl --request DELETE \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json" \
"https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/linked-board"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, unsupported asset type, or missing required payload data. |
403 | Project permission denied. |
404 | Project, element, child entry, component, attribute, asset, board, or output not found. |
409 | The board or target resource changed before the command was applied. |