You say#views.open
views.open
Open a modal for the person who just acted (the triggerId of their command, click or shortcut).
POST https://app.slaiky.xyz/api/methods/views.open · needs the bot token
Arguments
| Argument | Type | Required | What |
|---|---|---|---|
triggerId | string | yes | 1–100 characters. |
view | view | yes |
Answer
{ "ok": true, … } with: view: View. A refusal is { "ok": false, "error": { "code", "message" } } (errors).
Example
Recorded on a real server (ids replaced).
curl -s https://app.slaiky.xyz/api/methods/views.open \
-H "authorization: Bearer $SLAIKY_BOT_TOKEN" \
-H 'content-type: application/json' \
-d '{"triggerId":"1731240000.trigger.docs","view":{"type":"modal","title":"Daily update","submit":"Post","close":"Not now","callbackId":"daily","blocks":[{"type":"input","blockId":"done","label":"What did you finish?","element":{"type":"plain_text_input","actionId":"v","multiline":true}},{"type":"input","blockId":"mood","label":"How is it going?","optional":true,"element":{"type":"static_select","actionId":"v","options":[{"text":"Smooth","value":"smooth"},{"text":"Blocked","value":"blocked"}]}}]}}'
{
"ok": true,
"view": {
"id": "7f3c0017-5a1e-4c2b-9d6f-1a2b3c4d5e10",
"appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01",
"botUserId": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03",
"type": "modal",
"title": "Daily update",
"submit": "Post",
"close": "Not now",
"blocks": [
{
"type": "input",
"label": "What did you finish?",
"blockId": "done",
"element": {
"type": "plain_text_input",
"actionId": "v",
"multiline": true
}
},
{
"type": "input",
"label": "How is it going?",
"blockId": "mood",
"element": {
"type": "static_select",
"options": [
{
"text": "Smooth",
"value": "smooth"
},
{
"text": "Blocked",
"value": "blocked"
}
],
"actionId": "v"
},
"optional": true
}
],
"callbackId": "daily",
"previousId": null,
"hash": "1731240000.docs"
}
}
Updated . Every method, scope, event and limit here is generated from the server’s own code.