Skip to content

Quick Start

This guide walks you through the 3-step flow using cURL. Replace the placeholder values with your own API URL, key, and layout ID.

Terminal window
curl -s https://YOUR_API_URL/layout/YOUR_LAYOUT_ID \
-H "x-api-key: YOUR_API_KEY" | jq

Response:

{
"layoutId": "abc123",
"activePageId": "page_1",
"controls": [
{
"lid": 1,
"address": "/001",
"type": "Button",
"props": { "label": "Cheer" }
},
{
"lid": 2,
"address": "/002",
"type": "Slider",
"props": { "label": "Energy" }
},
{
"lid": 3,
"address": "/003",
"type": "Index",
"props": { "label": "Vote" },
"options": [
{ "index": 0, "label": "Option A" },
{ "index": 1, "label": "Option B" },
{ "index": 2, "label": "Option C" }
]
}
],
"destinationCount": 1
}
Terminal window
curl -s -X POST https://YOUR_API_URL/token \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"layoutId": "YOUR_LAYOUT_ID"}' | jq

Response:

{
"token": "eyJhbGciOiJIUzI1NiIs..."
}

Press a button:

Terminal window
curl -s -X POST https://YOUR_API_URL/action \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layoutId": "YOUR_LAYOUT_ID",
"lid": 1,
"type": "Button"
}' | jq

Move a slider:

Terminal window
curl -s -X POST https://YOUR_API_URL/action \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layoutId": "YOUR_LAYOUT_ID",
"lid": 2,
"type": "Slider",
"value": 0.75
}' | jq

Cast a vote:

Terminal window
curl -s -X POST https://YOUR_API_URL/action \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layoutId": "YOUR_LAYOUT_ID",
"lid": 3,
"type": "Index",
"value": 1
}' | jq

That’s it! The action hits the live output instantly.