# Build on Slaiky > Bring a bot, a script or an AI into a team’s conversation. Slaiky tells your code what happened; your code answers. Source: https://slaiky.xyz/docs Socket Mode in one exchange: Slaiky sends your app an envelope; your app acknowledges it, then answers with a Web API call. 1. Slaiky → your app: `{ "t": "app.envelope", "d": { "envelopeId": "…", "type": "events_api", "payload": { "type": "event_callback", "event": { "type": "app_mention", … } }, "retryAttempt": 0 } }` 2. Your app → Slaiky: `{ "t": "app.ack", "d": { "envelopeId": "…" } }` 3. Your app → Slaiky: `POST /api/methods/chat.postMessage { "channel": "…", "threadId": "…", "text": "On it." }` Without the ack, Slaiky sends the same envelope again with `retryAttempt: 1`. ## Three ways in - **Connect your AI** (MCP, one sign-in): Claude, ChatGPT, Cursor or VS Code read and answer in your workspace as you. [Connect your AI](/docs/mcp). - **Your first bot** (Socket Mode, one file, no packages): a bot that answers when someone mentions it. [Your first bot](/docs/quickstart). - **Call the Web API** (curl and a bot token): a script that posts in a channel. [Calling the Web API](/docs/web-api). ## The phrasebook Everything an app and Slaiky say to each other, from the server’s own code and from what a real server sent: what Slaiky says to your app, and what your app can say back. **Slaiky says:** [events](/docs/reference/events), [payloads](/docs/reference/payloads), [socket-mode](/docs/reference/socket-mode) **You say:** [methods](/docs/reference/methods), [blocks](/docs/reference/blocks), [manifest](/docs/reference/manifest), [scopes](/docs/reference/scopes), [mcp](/docs/reference/mcp) ## For your AI Every page here is also Markdown: add `.md` to its address. [`/docs/llms.txt`](/docs/llms.txt) lists them all and [`/docs/llms-full.txt`](/docs/llms-full.txt) holds them in one file. Give your coding agent this and a goal: *you run* ```text Read https://slaiky.xyz/docs/llms.txt, then build me a Slaiky bot that answers questions about our deploys in #launch. Use Socket Mode and no SDK. ``` --- # Your first bot > A bot that answers every mention in its thread. One file, Node, no packages. Source: https://slaiky.xyz/docs/quickstart You will make an app in a workspace, give it a token, and run one file that listens over Socket Mode and answers when someone mentions it. Nothing to host: your computer opens the connection to Slaiky. ## 1. Make the app In Slaiky, open **Agents and integrations** in the sidebar, then **Apps & bots → Create app**. Give it a name (say *Deploy bot*). Slaiky shows its bot token once: copy it now (step 2). Then, on the app’s page, turn on **Socket Mode** under **Events**. A new app already holds the permissions this bot needs: read where it is (`channels:history`), hear mentions (`app_mentions:read`) and post (`chat:write`). In the same place, under **Events it hears**, add `app_mention`. > **Tip:** Prefer one document over clicks? Paste a [manifest](/docs/manifests) with **Apps & bots → From a manifest**. This one makes the same bot: > > *your app → Slaiky · `manifest.json`* > > ```json > { > "display_information": { "name": "Deploy bot" }, > "features": { "bot_user": { "display_name": "deploybot" } }, > "oauth_config": { "scopes": { "bot": ["chat:write", "channels:history", "app_mentions:read"] } }, > "settings": { "event_subscriptions": { "bot_events": ["app_mention"] }, "socket_mode_enabled": true } > } > ``` ## 2. Copy its token The bot token starts with `slk-bot-`. It acts as the bot, with the app’s permissions, wherever the bot is a member. Slaiky shows it only once; lost it? **Token and secret → New token** on the app’s page makes another (the old one stops at once). Keep it out of your code: *you run* ```sh export SLAIKY_BOT_TOKEN=slk-bot-… ``` ## 3. Run the bot Save this as `bot.mjs` and run it with Node 22 or later (it uses the built-in `fetch` and `WebSocket`). *your app → Slaiky · `bot.mjs`* ```js // A Slaiky bot in one file: it answers every mention in the thread. Node 22+, no packages. // SLAIKY_BOT_TOKEN=slk-bot-… node bot.mjs const API = process.env.SLAIKY_API ?? 'https://app.slaiky.xyz/api/methods'; const TOKEN = process.env.SLAIKY_BOT_TOKEN; async function call(method, body = {}) { const res = await fetch(`${API}/${method}`, { method: 'POST', headers: { authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' }, body: JSON.stringify(body), }); const data = await res.json(); if (!data.ok) throw new Error(`${method}: ${data.error.code} ${data.error.message}`); return data; } async function connect() { const { url } = await call('apps.connections.open'); // a one-time WebSocket URL const socket = new WebSocket(url); socket.onmessage = async ({ data }) => { const frame = JSON.parse(data); if (frame.t !== 'app.envelope') return; // 1. Say "got it" first, or Slaiky sends the same envelope again. socket.send(JSON.stringify({ t: 'app.ack', d: { envelopeId: frame.d.envelopeId } })); // 2. Then do the work. const event = frame.d.payload.event; if (frame.d.type === 'events_api' && event?.type === 'app_mention') { await call('chat.postMessage', { channel: event.channelId, threadId: event.message.parentId ?? event.message.id, text: `Hi ${event.message.author?.name ?? 'there'}! You said: ${event.message.body}`, }); } }; // Settings changes and Slaiky's releases close the socket: connect again. socket.onclose = () => setTimeout(connect, 1000); socket.onopen = () => console.log('Connected. Mention the bot in a channel it is in.'); } connect(); ``` *you run* ```sh node bot.mjs ``` It asks for a one-time WebSocket address (`apps.connections.open`), connects, and then for each envelope Slaiky sends it does two things, in this order: 1. **Acknowledges it** with `app.ack` and the envelope’s id. Without that, Slaiky sends the same envelope again after 30 seconds. 2. **Answers** with `chat.postMessage`, in the thread of the message that mentioned it. ## 4. Mention it Add the bot to a channel (type `/invite @deploybot` there), then write `@deploybot hello`. The answer shows up in the thread a moment later. *Slaiky → your app · `app.envelope`* ```json { "t": "app.envelope", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "type": "events_api", "payload": { "type": "event_callback", "event": { "type": "app_mention", "channelId": "…", "message": { "id": "…", "body": "@deploybot hello" } } }, "acceptsResponsePayload": false, "retryAttempt": 0 } } ``` *your app → Slaiky · `app.ack`* ```json { "t": "app.ack", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05" } } ``` The full envelope, field by field, is on [Socket Mode frames](/docs/reference/socket-mode); every event is on [Events](/docs/reference/events). ## Where to next - Handle more than mentions: [Socket Mode](/docs/socket-mode) covers reconnecting, retries and what you missed while away. - Add a slash command, a button or a modal: [Commands, shortcuts and buttons](/docs/interactivity). - Receive events on your own server instead: [Events over HTTP](/docs/events). --- # Connect your AI > Let Claude, ChatGPT, Cursor, VS Code, Claude Code or Antigravity work in your workspace as you, after one sign-in. Or connect a bot with its token. Source: https://slaiky.xyz/docs/mcp Slaiky runs an MCP server at `https://app.slaiky.xyz/api/mcp`. Give that address to your AI client, sign in to Slaiky, pick the workspaces, and press **Allow**. There is no token to copy: the client finds the sign-in on its own. ## From Slaiky The quickest way is **Bring your AI**: a card in the sidebar (until you connect an app or press **Not now**), and a button in **Settings → Security → Connected apps**. Each app gets its one action: | App | Press | Then | | --- | --- | --- | | Claude (web, desktop app or phone) | **Connect Claude** | Claude opens with Slaiky filled in. Add it, then connect. | | ChatGPT (if your plan allows custom apps) | **Connect** | The address is copied. In ChatGPT, press **+**, add a custom MCP server and paste it. | | Cursor, VS Code | **Add** | The editor asks to install Slaiky. Install it. | | Claude Code | **Copy command** | Paste it in your terminal, then type `/mcp` in Claude Code to sign in. | Slaiky then asks which workspaces it may use ([below](#what-slaiky-asks-you)). The moment you press **Allow**, the dialog says the app is connected. > **Tip:** On a phone, **Bring your AI** shows Claude and ChatGPT. For Cursor, VS Code and Claude Code, open Slaiky on your computer. ## By hand Any MCP client that speaks Streamable HTTP takes the same address. In Claude Code: *you run* ```sh claude mcp add --transport http slaiky https://app.slaiky.xyz/api/mcp ``` In Cursor (`~/.cursor/mcp.json`): *your app → Slaiky · `~/.cursor/mcp.json`* ```json { "mcpServers": { "slaiky": { "url": "https://app.slaiky.xyz/api/mcp" } } } ``` In VS Code (`.vscode/mcp.json`): *your app → Slaiky · `.vscode/mcp.json`* ```json { "servers": { "slaiky": { "type": "http", "url": "https://app.slaiky.xyz/api/mcp" } } } ``` In Claude, add it as a custom connector; in ChatGPT, as a custom MCP server. The client opens Slaiky’s sign-in the first time it connects. ## In Antigravity Slaiky’s plugin for Antigravity brings the server and four skills: catching you up, finding what your team already said about the work in front of you, sharing an update about what changed, and a first look around. It also brings a rule: the agent posts, reacts or changes something only when you ask, and shows you the text before it posts, even when tools run without asking you. Download [the plugin](/download/slaiky-antigravity.zip), unzip it, and install the folder: *you run* ```sh unzip slaiky-antigravity.zip -d slaiky-antigravity agy plugin install ./slaiky-antigravity ``` Then sign in once. In Antigravity’s CLI, type `/plugin`, choose Slaiky, then **Sign in**. Open the address it shows, sign in to Slaiky, pick the workspaces and press **Allow**. Antigravity then asks for the code on the page you land on: paste it. What the agent writes shows “via Google Antigravity”. ## What Slaiky asks you Before anything is connected, Slaiky shows “Claude wants to use Slaiky as you” (with the app’s name) and two choices: - **Where it can act:** the workspaces you pick. It sees and acts in those only. Guests can’t connect apps, and a workspace that requires two-factor sign-in needs yours turned on first. - **What it can do:** seeing is always on. Sending messages and files, changing canvases, lists and channels, starting or building workflows, and setting people’s titles are yours to allow or not. Apps name themselves, so the screen also shows the address the app sends you back to. Allow it only if you trust that address. If you haven’t signed in or entered your password in the last 10 minutes, Slaiky asks you to confirm it’s you. ## What your AI can do It acts as you: it sees what you can see, and what it writes shows under your name, marked “via Claude” (or the app’s name). | You allowed | Your AI can | Tools | | --- | --- | --- | | See (always) | Search messages and files, list and read channels and threads, read files and see pictures, download files, find people, read canvases and their pages, list workflows, see a channel’s tabs and members, preview a template | `search_messages`, `search_files`, `list_channels`, `read_channel`, `read_thread`, `get_message`, `read_file`, `download_file`, `find_people`, `get_person`, `list_canvases`, `read_canvas`, `list_canvas_pages`, `list_workflows`, `find_workflows`, `list_my_conversations`, `list_channel_tabs`, `list_channel_members`, `find_templates`, `preview_template` | | Send messages, files and reactions as you, edit or delete your messages, and write your drafts | Post, reply in threads, send direct messages and files, share a message, react, edit and delete what you wrote, read and leave drafts for you to send | `post_message`, `reply_in_thread`, `send_direct_message`, `upload_file`, `get_upload_url`, `share_message`, `add_reaction`, `edit_message`, `delete_message`, `read_draft`, `save_draft` | | Create, edit, archive and delete canvases as you | Make a canvas or a page inside one, add to it or replace its text, rename, archive or delete it | `create_canvas`, `create_canvas_page`, `update_canvas`, `rename_canvas`, `archive_canvas`, `delete_canvas` | | Read lists you can open | Find lists, read their items, saved views and comments | `find_lists`, `read_list`, `read_list_views`, `read_item_comments` | | Make and change lists, their fields, views and items as you | Make a list, add and change items, comment, rename, archive or delete a list, add, change or delete its fields and views | `create_list`, `add_list_items`, `update_list_items`, `comment_on_item`, `update_list`, `archive_list`, `delete_list`, `add_list_field`, `update_list_field`, `delete_list_field`, `create_list_view`, `update_list_view`, `delete_list_view` | | Start workflows as you | Run a workflow you may start | `run_workflow` | | Create, change and publish workflows as you | Read a workflow’s steps, save a new one or a change as a draft, publish it | `read_workflow`, `save_workflow_draft`, `publish_workflow` | | Create and change channels as you: their name, topic, tabs and who is in them | Make a channel, join or leave one, add or remove people, set its topic, rename or archive it, make it public or private, add, change and remove its tabs, add, save or delete templates | `create_channel`, `join_channel`, `leave_channel`, `add_to_channel`, `remove_from_channel`, `set_channel_topic`, `rename_channel`, `archive_channel`, `set_channel_visibility`, `add_channel_tab`, `update_channel_tab`, `remove_channel_tab`, `set_channel_tabs_policy`, `apply_template`, `save_channel_as_template`, `delete_template` | | Set people’s titles as you (owners and admins) | Set the title under someone’s name, and lock it | `set_member_title` | A tool you didn’t allow isn’t offered at all. With several workspaces, every tool takes a `workspace` argument, and `list_workspaces` lists them. Inputs and resources: [MCP tools](/docs/reference/mcp). ## Files Your AI works with files the way you do: - **Send them.** `upload_file` posts PDFs, pictures, Word files, sheets, audio or anything else in a channel, a thread or someone’s DM, with a message if you want one. Each file is text it writes, bytes it sends (base64, up to 4 MB), an address Slaiky downloads it from, or a bigger upload: `get_upload_url` gives a one-time address to `POST` the bytes to (handy in Claude Code), then `upload_file` sends it. - **Find and read them.** `search_files` finds files by name, place, type or who sent them. `read_file` gives the text of documents and sheets, and pictures come back as pictures, so your AI sees them. - **Take the original.** `download_file` gives a link to the file itself that works for 15 minutes, for clients that save or open files (Claude Code, a script). Anyone with the link can download the file until then, so your AI keeps it to itself. - **Pass things on.** `share_message` shares a message somewhere else as a card, and `edit_message` and `delete_message` change or remove what it wrote. ## The conversation, in the chat In apps that show interactive results (Claude on the web, the desktop app and the phone), ask about a channel or a thread and it appears right in the chat: the messages with everyone's faces, live, and reactions you add with a click. Ask your AI to answer someone and it writes a draft under the conversation. Nothing is posted until you press **Send**, and you can edit the draft first. This is the `open_conversation` tool. Apps that only show text get the same messages as text. ChatGPT gets it with the next version of the plugin. ## What it asks before doing Every tool tells your AI whether it only reads or changes something. Posting a message, starting a workflow, replacing a canvas’s text, and deleting, archiving or removing anything are marked as changes, so your AI client can ask you before it runs one. Every tool follows the same rules as the app: your AI can rename a channel only if you could, and a list you can’t open doesn’t exist for it. Slaiky also tells your AI, when it connects, who it acts as and that everyone in the conversation sees what it writes: it should post, react or edit only when you ask. ## Take it back **Settings → Security → Connected apps** lists each app: where it acts, what it may do, and when it was last used. **Remove** takes its access away at once. To change its workspaces or permissions, connect it again. The screen starts from what you allowed before. ## Every tool, at one address `https://app.slaiky.xyz/api/mcp` offers every tool to every client: Claude, Claude Code, Cursor, VS Code, Antigravity, a bot. The list is [MCP tools](/docs/reference/mcp). ChatGPT’s plugin gets the tools its review covered until its next version; `https://app.slaiky.xyz/api/mcp?tools=full` gives it the rest. ## Its own agent in Slaiky An app connected as you can also have its own agent here: a ChatGPT dot or a Grok Bot with its own name, face and direct message, that only you talk to. - **It hears you** through MCP Events: it subscribes to `message.received` and gets what you write to its agent. ChatGPT’s plugin does it at `https://app.slaiky.xyz/api/mcp?tools=full`. - **An app that can’t subscribe** (a Grok Bot) is started instead: in the agent’s settings, **Wake it up** takes the address and key of one of its routines with a webhook trigger. Each message you write to the agent is POSTed there, with what to do. - **It answers** with `reply_as_agent`, and **speaks first** with `post_as_agent`: a finished task, something that needs you. Its first `post_as_agent` makes the agent. **Agents → From another app** shows the steps for each one. ## A bot instead of you For a server or a script with nobody behind it, connect with an app’s bot token instead ([Apps, bots and tokens](/docs/apps)). The AI then acts as the bot: in the bot’s one workspace, in public channels and the private ones the bot was added to, with the app’s permissions. A tool the app has no permission for answers with the one it needs (the **A bot token needs** column of [MCP tools](/docs/reference/mcp)). On the app’s page, **Token and secret** shows the setup for Claude Code, Cursor, VS Code, Claude Desktop and the OpenAI API, with the token filled in right after **New token**. In Claude Code: *you run* ```sh claude mcp add --transport http slaiky https://app.slaiky.xyz/api/mcp \ --header "Authorization: Bearer $SLAIKY_BOT_TOKEN" ``` In Cursor: *your app → Slaiky · `~/.cursor/mcp.json`* ```json { "mcpServers": { "slaiky": { "url": "https://app.slaiky.xyz/api/mcp", "headers": { "Authorization": "Bearer slk-bot-…" } } } } ``` ## If you are writing the client The server is MCP over Streamable HTTP, stateless, with JSON answers: send every request with `POST`. Without a token it answers `401` and points to the sign-in: *your app → Slaiky · `POST /api/mcp`* ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/list" } ``` *Slaiky → your app · `401`* ```http www-authenticate: Bearer resource_metadata="https://app.slaiky.xyz/.well-known/oauth-protected-resource/api/mcp", scope="read messages:write canvases:write workflows:run channels:write" { "jsonrpc": "2.0", "id": null, "error": { "code": -32001, "message": "Unauthorized: sign in with OAuth (see WWW-Authenticate) or send an app bot token as \"Authorization: Bearer slk-bot-…\"." } } ``` From there it is standard OAuth 2.1 for MCP: the authorization server is described at `https://app.slaiky.xyz/.well-known/oauth-authorization-server`, PKCE uses `S256`, and a client identifies itself with a client ID metadata document (an https `client_id`) or registers itself first. Requests are limited to 120 per 10 seconds per person (or per bot token), and a tool that posts, reacts, searches, starts a workflow or writes a canvas also counts against that action’s own limit. Over a limit, the answer is `429` with `Retry-After`, and the JSON-RPC error’s `data` is the `error` of a [Web API refusal](/docs/web-api#the-answer). --- # Docs for your AI > Hand these docs to a coding agent: every page as Markdown, one index, one file with everything, and the server’s own description of itself. Source: https://slaiky.xyz/docs/ai These docs have two readers: you, and the coding agent working for you. Everything here is also plain Markdown, so the agent reads the same words, samples and field names you do. ## Every page is Markdown Add `.md` to a page’s address: [`/docs/web-api`](/docs/web-api) becomes [`/docs/web-api.md`](/docs/web-api.md). The home is [`/docs.md`](/docs.md). Each twin has the page’s title, a one-line summary, its address, and the body. Code keeps who speaks: a line in italics above each block says *Slaiky → your app*, *your app → Slaiky* or *you run*, with the file name when there is one. The interactive parts become text. ## One index, one file | Address | What it holds | Use it when | | --- | --- | --- | | [`https://slaiky.xyz/docs/llms.txt`](/docs/llms.txt) | One line per page: its title, its `.md` address and what it is for, grouped like the sidebar, then every Web API method. | The agent can fetch pages and should pick the ones it needs. | | [`https://slaiky.xyz/docs/llms-full.txt`](/docs/llms-full.txt) | Every page, in reading order, in one file. | The agent can’t fetch, or you paste the docs into a chat. | ## From any page Each page has four buttons: - **Copy page for AI** copies the page’s Markdown, ready to paste. - **Markdown** opens the `.md` twin. - **Ask Claude** and **Ask ChatGPT** open a new chat that asks it to read this page and help you build with it. ## A prompt to paste Give your coding agent the index and a goal. This one keeps it to what the docs say: *you run* ```text Read https://slaiky.xyz/docs/llms.txt, then the pages you need for this task. Build me a Slaiky bot that posts our deploy status in #launch and answers questions about it in the thread. - Use only the methods, events, scopes and fields the docs name. The reference pages come from the server's own code. - No SDK: plain HTTP and WebSocket (Socket Mode). - Read the token from SLAIKY_BOT_TOKEN; never write it in code. - Acknowledge every envelope before doing the work. - When an answer has "ok": false, report error.code and error.message. ``` ## The server describes itself The app also serves its own catalog, always for the version it runs: | Address | What it holds | | --- | --- | | `https://app.slaiky.xyz/llms.txt` | How a model connects to this server: the MCP address and sign-in, every tool, every Web API method, Socket Mode in short. | | `https://app.slaiky.xyz/llms-full.txt` | The same, plus the apps platform, each method’s and each MCP tool’s input as JSON Schema, and the main REST routes. | | `https://app.slaiky.xyz/api/openapi.json` | OpenAPI 3.1: every REST route, the bot Web API and webhooks, with request schemas. For code generators and API explorers. | | `https://app.slaiky.xyz/api/ai` | The addresses above as JSON, for a client that looks them up. | The docs teach, with tested samples. The server’s files list what it accepts right now. ## Let it see your workspace too Connect the same agent to Slaiky’s MCP server and it can read your channels while it builds. In Claude Code: *you run* ```sh claude mcp add --transport http slaiky https://app.slaiky.xyz/api/mcp ``` Every client, and what it may do once connected: [Connect your AI](/docs/mcp). --- # Apps, bots and tokens > What an app is, who makes and manages one, its tokens and secret, its permissions, and where its bot may act. Source: https://slaiky.xyz/docs/apps An app is how your code takes part in a workspace. It speaks through its own bot, holds a set of permissions, and proves who it is with a token. ## What an app is An app lives in one workspace. It has a name, a description, a color, settings, permissions and a **bot user**: the member profile everything it does shows up under (`@deploybot`). A bot is not a person of the workspace. It is never a seat, and channels count their people without it: `conversations.members` answers `members` and `apps` apart. Installing the app in another workspace makes a copy there, with its own bot and token ([Other workspaces](/docs/distribution)). ## Who makes and manages it Any member can make an app; guests can’t. In the sidebar, open **Agents and integrations → Apps & bots**, then **Create app**, or **From a manifest** to paste one JSON document ([Manifests](/docs/manifests)). The person who made it, and the workspace’s owners and admins, manage it: its settings, tokens and secret, and removing it. ## Tokens and secret | | What it does | Where you get it | | --- | --- | --- | | Bot token, `slk-bot-…` | Acts as the bot, with the app’s permissions, where the bot is a member. Only one works at a time. | Shown once, when the app is made. On the app’s page, **Token and secret → New token** makes another; the old one stops at once, and Socket Mode connections made with it close. | | Configuration token, `slk-cfg-…` | Acts as you, to make and change the apps you manage with `apps.manifest.*`. Works for 12 hours. | **Apps & bots → Configuration tokens → New token**. It comes with a refresh token (`slk-cfr-…`) that `tooling.tokens.rotate` trades, once and within 30 days, for a new pair. | | Signing secret | Signs everything Slaiky sends the app over HTTP, so your server can check it came from Slaiky ([Events over HTTP](/docs/events)). | **Token and secret → Show secret**. **New secret** replaces it; the old one stops verifying at once. | **New token**, **Show secret**, **New secret** and a new configuration token ask for your password or a two-factor code first, if you haven’t entered one in the last 10 minutes. > **Careful:** Each of these is a password. Keep it in an environment variable or a secret store, never in your code or a repository. ## Permissions An app holds permissions (scopes): 36 of them, each in plain words on [Scopes](/docs/reference/scopes). An app made with **Create app** starts with what a bot needs to read and answer where it is: post (`chat:write`), read its conversations (`channels:history` and the others), hear mentions (`app_mentions:read`), react, share files and canvases, run workflows and add slash commands. One made from a manifest holds what its manifest names. Change them on the app’s page under **Permissions**, or in the manifest’s `oauth_config.scopes.bot`. A call without the permission it needs is refused, and the answer names the one that would do: *Slaiky → your app · `refusal`* ```json { "ok": false, "error": { "code": "missing_scope", "message": "This app needs the pins:write permission for that", "needed": "pins:write" } } ``` Events follow the same rule: Slaiky sends one only when the app holds its scope. Changing permissions closes the app’s Socket Mode connections, so it reconnects with the new ones ([when the socket closes](/docs/reference/socket-mode#when-the-socket-closes)). ## Where the bot can act In the conversations it is a member of. A public channel it can also read and react in without joining, and join on its own. To the bot, a private channel or a DM it isn’t in doesn’t exist: calls about it answer `not_found`. - **A channel:** someone adds it (`/invite @deploybot`). For a public channel the app can do it alone: with `channels:join` (new apps have it) it joins on its first post or with `conversations.join`; without it, `chat:write.public` lets it post there. - **A direct message:** it starts one with `conversations.open` (`im:write`), or answers the DMs people send it. - **Reading** needs the history permission of the conversation’s kind: `channels:history` (public channels), `groups:history` (private channels), `im:history` (DMs), `mpim:history` (group DMs). A bot edits and deletes only its own messages, and renames or archives only the channels it made. ## Agents have apps too Each agent in **Agents and integrations → Agents** speaks through an app made with it. That app follows the agent’s rules: - It holds every permission, has no manifest, and can’t be installed in other workspaces. - A workspace’s agent is managed by its owners and admins. A personal agent belongs to the person who made it. - A personal agent is never wired outward: no bot token, request URLs, Socket Mode, slash commands, incoming webhooks or other workspaces. It talks to its owner only. The apps you make in **Apps & bots** are the ones you connect to your code. ## Where to next - Make one and run it: [Your first bot](/docs/quickstart). - Call the Web API with its token: [Calling the Web API](/docs/web-api). - Let an AI client act as the bot: [Connect your AI](/docs/mcp#a-bot-instead-of-you). --- # Socket Mode > Your app opens a WebSocket to Slaiky and gets its events, commands and clicks there. No public URL, nothing to host. Source: https://slaiky.xyz/docs/socket-mode In Socket Mode your code calls Slaiky, not the other way round. It opens a WebSocket, Slaiky sends each event, command and click down it as an envelope, and your app says "got it" for each one. Nothing has to be reachable from the internet: it runs on a laptop, behind a firewall, or on a server with no public address. ## When to use it Use Socket Mode when your app runs as a process that stays up: a bot on your computer, a service inside your company network, a script you start by hand. Use [Events over HTTP](/docs/events) when you already have a public server that answers requests, or code that only wakes up when called. It is one or the other. With Socket Mode on, Slaiky sends nothing to your request URLs. Turn it on in the app’s page: **Events → Socket Mode**. In a [manifest](/docs/manifests), it is `"socket_mode_enabled": true`. The app’s page says **Connected** while a socket is open. ## Connect Ask for an address with `apps.connections.open`, then open a WebSocket to it. The address works once, within 30 seconds: ask for a new one every time you connect. With Socket Mode off, the call answers `socket_mode_off`. *your app → Slaiky · `apps.connections.open`* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.connections.open \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' -d '{}' ``` *Slaiky → your app* ```json { "ok": true, "url": "wss://app.slaiky.xyz/ws?ticket=docs-ticket" } ``` A client that can send headers on the handshake may skip the ticket: open the same `/ws` address with `Authorization: Bearer slk-bot-…`. The samples here use the ticket. Every frame is JSON, `{ "t": type, "d": data }`. Besides envelopes you will see `ready` once, when the socket is set up, and `error` when Slaiky refused a frame you sent. Ignore any other frame. ## What arrives Each envelope carries one thing that happened. Its `type` says which kind, and `payload` is the same body an app over HTTP would get. | `type` | What it carries | `payload` | | --- | --- | --- | | `events_api` | An event the app asked for | The event wrapper, [Events](/docs/reference/events) | | `slash_commands` | One of the app’s slash commands | The command, [payloads](/docs/reference/payloads#a-slash-command-slash-command) | | `interactive` | A click, a pick, a shortcut, a modal submitted or closed | The interaction, [payloads](/docs/reference/payloads) | *Slaiky → your app · `app.envelope`* ```json { "t": "app.envelope", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "type": "events_api", "payload": { "type": "event_callback", "eventId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "event": { "type": "app_mention", "channelId": "…", "channelType": "channel", "message": { "id": "…", "body": "@docsrecorder is the deploy green?" } } }, "acceptsResponsePayload": false, "retryAttempt": 0 } } ``` Every field is on [Socket Mode frames](/docs/reference/socket-mode#app-envelope). ## Acknowledge every envelope Send `app.ack` with the envelope’s id as soon as it arrives, before any slow work. An event without an ack comes again after 30 seconds. For a command or a click, `acceptsResponsePayload` is `true` and the ack can carry the answer in `payload`. The person is waiting: the ack must arrive within 3 seconds. What the answer may say is on [Commands, shortcuts and buttons](/docs/interactivity#answer-at-once). *Slaiky → your app · `app.envelope`* ```json { "t": "app.envelope", "d": { "envelopeId": "7f3c0020-5a1e-4c2b-9d6f-1a2b3c4d5e13", "type": "slash_commands", "payload": { "type": "command", "command": "/docsdemo", "text": "shipped the export", "userId": "…", "channelId": "…", "triggerId": "…", "responseUrl": "…" }, "acceptsResponsePayload": true, "retryAttempt": 0 } } ``` *your app → Slaiky · `app.ack`* ```json { "t": "app.ack", "d": { "envelopeId": "7f3c0020-5a1e-4c2b-9d6f-1a2b3c4d5e13", "payload": { "text": "Noted: shipped the export", "responseType": "in_channel" } } } ``` An ack that doesn’t fit (a bad `payload`, an id that isn’t one) is refused with an `error` frame, `"code": "invalid"` and `"for": "app.ack"`, and the envelope stays unacknowledged. A socket may send up to 40 frames a second: acks over that are refused with `"code": "rate_limited"` and their envelopes come again. ## Resends and `retryAttempt` An event you didn’t acknowledge is sent again after 30 seconds, up to 3 times while you are connected. Each resend has the same `envelopeId` and a higher `retryAttempt`. After the last one it is marked failed. *Slaiky → your app · `app.envelope`* ```json { "t": "app.envelope", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "type": "events_api", "payload": { "type": "event_callback", "eventId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "event": { "type": "app_mention", "message": { "id": "…" } } }, "acceptsResponsePayload": false, "retryAttempt": 1 } } ``` *your app → Slaiky · `app.ack`* ```json { "t": "app.ack", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05" } } ``` So keep the ids you handled and skip one that comes back. Acknowledge it again anyway: a second ack changes nothing. Commands and clicks are sent once. They are answered now or not at all. ## What you missed while away When your app connects, Slaiky sends the events it couldn’t deliver while you were away, oldest first, up to 1 hour old. Older ones are dropped. They arrive as normal envelopes: acknowledge them the same way. Commands and clicks are not kept for later. While your app is away, a person who runs its command is told it isn’t connected. Each delivery and how it went is on the app’s page, under **Deliveries**: see [the delivery log](/docs/events#the-delivery-log). ## Reconnect A socket closes for a few reasons. Connect again for all of them but two. | Close code | Why | What to do | | --- | --- | --- | | `1012` | The app’s settings changed (Socket Mode turned on or off, its permissions), or Slaiky is restarting for a release | Connect again now, with a new `apps.connections.open` | | `4401` | The token that opened the socket stopped working: someone made a new one | Stop. Start again with the new token | | `4403` | The app was removed, the bot was turned off, or its workspace deleted | Stop | | anything else | The network | Connect again, waiting a little longer each time | This bot does all of it: it acknowledges first, answers a command in the ack, skips what it already handled and reconnects. *your app → Slaiky · `socket-mode-bot.mjs`* ```js // A Socket Mode bot that keeps going: it acknowledges first, skips envelopes it already handled, // answers a slash command in its ack, and connects again when the socket closes. Node 22+, no packages. // SLAIKY_BOT_TOKEN=slk-bot-… node socket-mode-bot.mjs const API = process.env.SLAIKY_API ?? 'https://app.slaiky.xyz/api/methods'; const TOKEN = process.env.SLAIKY_BOT_TOKEN; async function call(method, body = {}) { const res = await fetch(`${API}/${method}`, { method: 'POST', headers: { authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' }, body: JSON.stringify(body), }); const data = await res.json(); if (!data.ok) throw Object.assign(new Error(`${method}: ${data.error.code} ${data.error.message}`), { code: data.error.code }); return data; } // What the ack says back: the answer to a command or a click, said at once (or nothing). function answerNow(d) { if (d.type === 'slash_commands') return { text: `Got it: ${d.payload.text || '(nothing)'}` }; return undefined; } // The slow work, after the ack. async function work(d) { const event = d.payload.event; if (d.type === 'events_api' && event?.type === 'app_mention') { await call('chat.postMessage', { channel: event.channelId, threadId: event.message.parentId ?? event.message.id, text: 'On it.' }); } } const seen = new Set(); // envelope ids already handled: a resend brings the same id again let wait = 1000; async function connect() { let url; try { ({ url } = await call('apps.connections.open')); // a one-time URL: ask for a new one every time } catch (err) { if (err.code === 'unauthorized' || err.code === 'socket_mode_off') return console.error(err.message); setTimeout(connect, wait); wait = Math.min(wait * 2, 60_000); return; } const socket = new WebSocket(url); socket.onopen = () => { wait = 1000; console.log('Connected.'); }; socket.onmessage = ({ data }) => { const frame = JSON.parse(data); if (frame.t === 'error') return console.error('Slaiky refused a frame:', frame.d.code, frame.d.message); if (frame.t !== 'app.envelope') return; const d = frame.d; const again = seen.has(d.envelopeId); const payload = d.acceptsResponsePayload && !again ? answerNow(d) : undefined; // 1. Say "got it" first (again for a resend: a second ack changes nothing). socket.send(JSON.stringify({ t: 'app.ack', d: { envelopeId: d.envelopeId, ...(payload ? { payload } : {}) } })); if (again) return; seen.add(d.envelopeId); if (seen.size > 5000) seen.delete(seen.values().next().value); // 2. Then do the work. work(d).catch((err) => console.error('envelope failed:', err.message)); }; socket.onclose = ({ code }) => { // 4401: the token behind this socket was replaced. 4403: the app was removed or the bot turned off. if (code === 4401 || code === 4403) return console.error(`Closed (${code}). Check the app and its token.`); // 1012: the app's settings changed or Slaiky is restarting: connect again now. Anything else: wait a little longer each time. setTimeout(connect, code === 1012 ? Math.random() * 1000 : wait); if (code !== 1012) wait = Math.min(wait * 2, 60_000); }; } connect(); ``` ## One connection or several Slaiky sends every envelope to every socket your app has open. The first ack counts; for a command, the first ack’s `payload` is the answer and later ones are ignored. So two processes on one app both see each event. Run one connection per app. While you switch to a new version, two can overlap for a moment: keep the handled ids where both can see them, so only one of them acts. A bot may hold up to 100 sockets open at once; more are refused with `429`. > **Tip:** Testing on your computer while the real bot runs elsewhere? Make a second app for it. Two sockets on one app split nothing: both get everything. ## Without Socket Mode: the older frames Apps written before Socket Mode open a socket with their bot token (the `Authorization` header) while Socket Mode is off. They still work. Such a socket gets `app.command` and `app.interaction`. When the app holds `app_mentions:read` and every `:history` permission, it also gets `app.mention` (the bot was mentioned where it is a member) and the workspace’s live frames such as `message.created`. Nothing on that socket is acknowledged, resent or replayed. A command there carries a `responseToken`: answer it with [`commands.respond`](/docs/reference/methods/commands.respond). New apps should use Socket Mode. --- # Events over HTTP > Slaiky posts each event your app asked for to your server, signed. Check the signature, answer fast, and the retries cover the rest. Source: https://slaiky.xyz/docs/events Without Socket Mode, Slaiky sends your app what it asked for as a signed POST to a URL of yours, one per event. Your server checks the request came from Slaiky, answers `200` within 5 seconds, and does the work after. ## The request URL On the app’s page, open **Events**, fill in **Request URL** and pick the **Events it hears**. Each event needs its permission: the page says which (**Needs** `app_mentions:read`…). In a [manifest](/docs/manifests), they are `settings.event_subscriptions.request_url` and `bot_events`. Before the URL is saved, Slaiky checks that your server answers it. It posts a challenge, and your server sends the same string back, with a `2xx` status, within 5 seconds: *Slaiky → your app · `url_verification`* ```json { "type": "url_verification", "challenge": "…" } ``` *your app → Slaiky* ```json { "challenge": "…" } ``` The challenge may also go back as plain text. It is signed like every other request. If it fails, the URL isn't saved. A saved URL that fails **Check again** shows **Not verified**, and nothing is sent to it until it passes. Fixed your server? **Check again** sends a new challenge. Commands and clicks have their own URLs: each slash command its **Request URL**, and everything else the **Interactivity URL** under **Buttons and shortcuts** ([Commands, shortcuts and buttons](/docs/interactivity)). Those get no challenge, but the same signature. With Socket Mode on, nothing goes to any of these URLs. ## Check the signature Everything Slaiky sends your app is signed with the app’s signing secret. Find it on the app’s page, **Token and secret → Signing secret → Show secret**. **New secret** makes another one, and the old one stops working at once. | Header | What it holds | | --- | --- | | `x-slaiky-request-timestamp` | When it was sent, in seconds (Unix time) | | `x-slaiky-signature` | `v1=` and the hex HMAC-SHA256 of `v1:{timestamp}:{body}`, keyed with the signing secret | | `x-slaiky-timestamp` | The same timestamp, for apps written before the header above | Compute the signature over the body exactly as it arrived, byte for byte, before you parse it. Compare in constant time. Refuse a timestamp that is too old, so a copied request can’t be sent again later. Both samples do all three and answer the challenge: *Node.js · your app → Slaiky · `verify.mjs`* ```js // Check that a request really comes from Slaiky before you trust it. Node 22+, no packages. import { createHmac, timingSafeEqual } from 'node:crypto'; import { createServer } from 'node:http'; const SECRET = process.env.SLAIKY_SIGNING_SECRET; // the app's signing secret (its settings page) const MAX_AGE = 5 * 60; // seconds: refuse old requests, so a copied one can't be sent again later export function verify(secret, timestamp, signature, rawBody) { if (!timestamp || !signature || Math.abs(Date.now() / 1000 - Number(timestamp)) > MAX_AGE) return false; const expected = `v1=${createHmac('sha256', secret).update(`v1:${timestamp}:${rawBody}`).digest('hex')}`; return expected.length === signature.length && timingSafeEqual(Buffer.from(expected), Buffer.from(signature)); } if (import.meta.main) { createServer((req, res) => { let raw = ''; req.on('data', (chunk) => (raw += chunk)); req.on('end', () => { // Sign the body exactly as it arrived: parse it only after the check. if (!verify(SECRET, req.headers['x-slaiky-request-timestamp'], req.headers['x-slaiky-signature'], raw)) { res.writeHead(401).end(); return; } const body = JSON.parse(raw); if (body.type === 'url_verification') { res.writeHead(200, { 'content-type': 'application/json' }).end(JSON.stringify({ challenge: body.challenge })); return; } res.writeHead(200).end(); // answer fast; do slow work after if (body.type === 'event_callback') console.log('event', body.event.type); }); }).listen(3000, () => console.log('Listening on :3000')); } ``` *Python · your app → Slaiky · `verify.py`* ```python # Check that a request really comes from Slaiky before you trust it. Python 3, no packages. import hashlib, hmac, json, os, time from http.server import BaseHTTPRequestHandler, HTTPServer SECRET = os.environ.get("SLAIKY_SIGNING_SECRET", "") # the app's signing secret (its settings page) MAX_AGE = 5 * 60 # seconds: refuse old requests, so a copied one can't be sent again later def verify(secret, timestamp, signature, raw_body): if not timestamp or not signature or abs(time.time() - int(timestamp)) > MAX_AGE: return False digest = hmac.new(secret.encode(), f"v1:{timestamp}:{raw_body}".encode(), hashlib.sha256).hexdigest() return hmac.compare_digest(f"v1={digest}", signature) class Events(BaseHTTPRequestHandler): def do_POST(self): raw = self.rfile.read(int(self.headers.get("content-length", 0))).decode() # Sign the body exactly as it arrived: parse it only after the check. if not verify(SECRET, self.headers.get("x-slaiky-request-timestamp"), self.headers.get("x-slaiky-signature"), raw): self.send_response(401) self.end_headers() return body = json.loads(raw) self.send_response(200) self.send_header("content-type", "application/json") self.end_headers() if body.get("type") == "url_verification": self.wfile.write(json.dumps({"challenge": body["challenge"]}).encode()) elif body.get("type") == "event_callback": print("event", body["event"]["type"]) if __name__ == "__main__": HTTPServer(("", 3000), Events).serve_forever() ``` ## Answer fast Answer with a `2xx` status within 5 seconds. For an event, Slaiky reads only the status; the body is ignored. Put the slow work after the answer: a queue, a background task. *Slaiky → your app · `POST /slaiky/events`* ```http content-type: application/json user-agent: Slaiky-Events/1.0 x-slaiky-request-timestamp: 1794312000 x-slaiky-signature: v1=… {"type":"event_callback","eventId":"7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05","eventTime":1794312000,"appId":"…","workspaceId":"…","event":{"type":"app_mention","channelId":"…","channelType":"channel","threadId":null,"message":{"…":"…"}}} ``` *your app → Slaiky* ```http HTTP/1.1 200 OK ``` A redirect counts as a failure: Slaiky doesn’t follow it. Answer at the URL itself. The body around each event is on [Events](/docs/reference/events#the-wrapper). ## Retries A try fails when your server doesn’t answer in time, answers with a status that isn’t `2xx`, or can’t be reached. Then Slaiky tries again: 1. at once; 2. 1 minute after the first try; 3. a last time, 5 minutes after the first try. After that the delivery is marked failed. Deliveries are stored before the first try, so a Slaiky restart loses none. Every try carries the same `eventId`: if one comes twice, it is one event, so handle it once. A retry says why with two headers. `x-slaiky-retry-num` counts the tries before it, and `x-slaiky-retry-reason` names what went wrong with the last one: | `x-slaiky-retry-reason` | The try before | | --- | --- | | `http_timeout` | had no answer within 5 seconds | | `http_error` | was answered with a status that isn’t `2xx` | | `connection_failed` | couldn’t reach your server | | `too_many_redirects` | was answered with a redirect | *your app → Slaiky* ```http HTTP/1.1 503 Service Unavailable ``` *Slaiky → your app · `POST /slaiky/events (again, at once)`* ```http x-slaiky-request-timestamp: 1794312001 x-slaiky-signature: v1=… x-slaiky-retry-num: 1 x-slaiky-retry-reason: http_error {"type":"event_callback","eventId":"7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05","…":"…"} ``` Only events are tried again. A command or a click is tried once, because a person is waiting for it. ## Stop the retries If trying again can’t help, say so: answer with the header `x-slaiky-no-retry: 1`. The delivery is marked failed and not sent again. *your app → Slaiky* ```http HTTP/1.1 400 Bad Request x-slaiky-no-retry: 1 ``` ## The delivery log The app’s page lists the last 50 things sent to it under **Deliveries**: each one’s type, how many tries, the last error, and how it went (**Delivered**, **Failed** or **Waiting**). Commands, clicks and Socket Mode envelopes are there too. Deliveries are kept 3 days, then deleted. When a message is deleted, the deliveries about it keep only their type. | Last error | What happened | | --- | --- | | `http_timeout`, `http_error`, `connection_failed`, `too_many_redirects` | As in [Retries](#retries) | | `no_url` | There was no URL to send it to | | `not_connected` | Socket Mode, and the app wasn’t connected. A command, click or submission fails then; an event waits for the app to connect | | `not_acknowledged` | Socket Mode: sent, never acknowledged | | `expired` | Socket Mode: an event waited 1 hour and the app never took it | | `message_deleted` | The message was deleted before the delivery got through | | `app_removed` | The app was removed | ## Private addresses are refused Request URLs must be on the public internet. Slaiky checks the address it actually connects to, so a name that leads to `localhost`, `10.…`, `192.168.…` or another private network fails as `connection_failed`, and an events URL fails its challenge. To run an app on your own computer, use [Socket Mode](/docs/socket-mode). --- # Calling the Web API > One POST per method, with your bot token and a JSON body. How to post, reply in a thread, upload a file and read every answer. Source: https://slaiky.xyz/docs/web-api The Web API is how your app speaks first: posting, reacting, opening a DM, uploading a file. There are 61 methods, and every one is called the same way. You need a bot token (`slk-bot-…`, see [Apps, bots and tokens](/docs/apps)). ## The request Every call is a `POST` to `https://app.slaiky.xyz/api/methods/`, with two headers and a JSON object: - `Authorization: Bearer slk-bot-…`: the bot token. It also names the workspace, so there is no workspace header. - `Content-Type: application/json`, and a JSON body with the method’s arguments (`{}` when it takes none). Check your token with `auth.test`. It answers with the bot, its app and the permissions it holds: *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/auth.test \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` *Slaiky → your app · `answer (shortened)`* ```json { "ok": true, "bot": { "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "handle": "deploybot", "name": "Deploy bot", "isBot": true }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "scopes": ["chat:write", "channels:read", "channels:history", "channels:join", "app_mentions:read"] } ``` A few methods take something else: `apps.manifest.*` take a configuration token, and `tooling.tokens.rotate` and `oauth.v2.access` take no token at all ([Manifests](/docs/manifests), [Other workspaces](/docs/distribution)). ## The answer Every answer is JSON with `ok`. When it worked, `ok` is `true` and the method’s own keys sit next to it (`message`, `channel`, `files`…). When it did not, the HTTP status says what kind of no it is, and `error` says why: *Slaiky → your app · `refusal`* ```json { "ok": false, "error": { "code": "missing_scope", "message": "This app needs the pins:write permission for that", "needed": "pins:write" } } ``` Program against `code`: it never changes. `message` is for people, in the language your `Accept-Language` header asks for. Some refusals add a key: `needed` (the permission that would do), `fields` (each argument that is wrong, on `422 invalid`), `retryAfter` (on `429`). Every code is on [Errors](/docs/errors). ## Post a message `chat.postMessage` takes a `channel` and a `text` in Markdown. The same call in three languages, each file tested against a real server: *curl · your app → Slaiky · `post-message.sh`* ```sh curl -s "${SLAIKY_API:-https://app.slaiky.xyz/api/methods}/chat.postMessage" \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d "{\"channel\": \"${SLAIKY_CHANNEL:-#general}\", \"text\": \"Deploy finished. *All green.*\"}" ``` *Node.js · your app → Slaiky · `post-message.mjs`* ```js // Post a message as your bot. Node 22+, no packages. const API = process.env.SLAIKY_API ?? 'https://app.slaiky.xyz/api/methods'; const res = await fetch(`${API}/chat.postMessage`, { method: 'POST', headers: { authorization: `Bearer ${process.env.SLAIKY_BOT_TOKEN}`, 'content-type': 'application/json' }, body: JSON.stringify({ channel: process.env.SLAIKY_CHANNEL ?? '#general', text: 'Deploy finished. *All green.*' }), }); const answer = await res.json(); console.log(JSON.stringify(answer)); if (!answer.ok) process.exit(1); ``` *Python · your app → Slaiky · `post_message.py`* ```python # Post a message as your bot. Python 3, no packages. import json, os, urllib.request API = os.environ.get("SLAIKY_API", "https://app.slaiky.xyz/api/methods") TOKEN = os.environ["SLAIKY_BOT_TOKEN"] def call(method, body): req = urllib.request.Request( f"{API}/{method}", data=json.dumps(body).encode(), headers={"authorization": f"Bearer {TOKEN}", "content-type": "application/json"}, ) try: with urllib.request.urlopen(req) as res: return json.load(res) except urllib.error.HTTPError as err: # a refusal still answers JSON return json.load(err) answer = call("chat.postMessage", {"channel": os.environ.get("SLAIKY_CHANNEL", "#general"), "text": "Deploy finished. *All green.*"}) print(json.dumps(answer)) if not answer["ok"]: raise SystemExit(f"{answer['error']['code']}: {answer['error']['message']}") ``` *you run* ```sh export SLAIKY_BOT_TOKEN=slk-bot-… SLAIKY_CHANNEL='#deploys' node post-message.mjs ``` A new app may join public channels (`channels:join`), so its first post to one joins it. Messages can also carry buttons and layout: [Messages](/docs/messages). ## Channels by id or by name `channel` takes a conversation’s id, or `#name` for a channel (public or private). Direct messages and group DMs have no name: use the id an event gives you (`channelId`) or the one `conversations.open` answers. Names change when someone renames a channel. Ids never do, so store ids. A private channel or a DM the bot is not in doesn’t exist for it: the answer is `404 not_found`. To post in a public channel it is not in, the app needs `channels:join` (it joins) or `chat:write.public` (it posts without joining); with neither, the answer is `missing_scope`. More on this in [Where the bot can act](/docs/apps#where-the-bot-can-act). ## Reply in a thread Add `threadId`: the id of the thread’s first message. Add `alsoInChannel: true` to show the reply in the channel too. *your app → Slaiky · `chat.postMessage`* ```json { "channel": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "threadId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "text": "Deploy is green." } ``` *Slaiky → your app · `answer (shortened)`* ```json { "ok": true, "message": { "id": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14", "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "parentId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "Deploy is green.", "createdAt": "2026-11-10T12:00:02.000Z" } } ``` When you answer an event, the thread is `event.message.parentId ?? event.message.id`: a message written inside a thread already has a `parentId`. The id of a reply is refused, and so is a message from another conversation. ## Upload a file A file takes three calls. Both methods need `files:write`, which a new app holds; sharing the file in a conversation also needs `chat:write`. 1. `files.getUploadURL` with `filename`, `length` (its exact size in bytes, up to 50 MB) and, if you know it, `mime`. It answers `uploadUrl` and `fileId`. 2. A `POST` of the raw bytes to `uploadUrl`, within 5 minutes. The URL works once, and only for exactly `length` bytes. 3. `files.completeUpload` with `files: [{ "id": fileId }]` and a `channel` (with `text` and `threadId` if you like). It answers the `files` and the `message` that shares them. Without `channel`, the file is kept but not shared, and `message` is `null`. Every file is checked for viruses before anyone can open it. A harmful one is refused at step 2 with `422 file_harmful`, and nothing is kept. If the check can't finish yet, the file comes back with `"scan": "checking"` and step 3 answers `409 file_checking` until it is done: try again in a minute. A file shown with `"scan": "blocked"` was found harmful later and can't be opened. > **Careful:** Send the bytes without your token. The upload URL is the secret, and a request that carries a bot token can be refused. *your app → Slaiky · `upload.mjs`* ```js // Upload a file and share it in a channel as your bot. Node 22+, no packages. const API = process.env.SLAIKY_API ?? 'https://app.slaiky.xyz/api/methods'; const TOKEN = process.env.SLAIKY_BOT_TOKEN; async function call(method, body) { const res = await fetch(`${API}/${method}`, { method: 'POST', headers: { authorization: `Bearer ${TOKEN}`, 'content-type': 'application/json' }, body: JSON.stringify(body), }); const data = await res.json(); if (!data.ok) throw new Error(`${method}: ${data.error.code} ${data.error.message}`); return data; } const bytes = new TextEncoder().encode('Deploy 412: all checks green.\n'); // 1. Ask where to send the bytes, saying exactly how many there are. const { uploadUrl, fileId } = await call('files.getUploadURL', { filename: 'deploy.log', length: bytes.length, mime: 'text/plain' }); // 2. Send them there, raw. No token: the URL is the secret, and it works once. const sent = await fetch(uploadUrl, { method: 'POST', headers: { 'content-type': 'text/plain' }, body: bytes }); if (!sent.ok) throw new Error(`upload: ${sent.status} ${await sent.text()}`); // 3. Share the file in a channel, with a message. const answer = await call('files.completeUpload', { files: [{ id: fileId }], channel: process.env.SLAIKY_CHANNEL ?? '#general', text: 'The deploy log.', }); console.log(JSON.stringify(answer)); ``` ## Rate limits Calls are limited per bot: 120 per 10 seconds, across all methods. Calls that do what a person does (post, edit, react, upload, change a channel) also count against the limit a person has for that action. Over a limit, the answer is `429` with a `Retry-After` header in seconds. The body says the same, and `scope` names the limit you hit: *Slaiky → your app · `429`* ```json { "ok": false, "error": { "code": "rate_limited", "message": "Too many attempts. Try again in 4 seconds.", "retryAfter": 4, "scope": "botApi" } } ``` Wait that long, then send the same call again. ## Where to next - Every method, its arguments and what it needs: [Web API methods](/docs/reference/methods), such as [`chat.postMessage`](/docs/reference/methods/chat.postMessage). - Why a call said no: [Errors](/docs/errors). - Hear what happens in the workspace: [Socket Mode](/docs/socket-mode) or [Events over HTTP](/docs/events). --- # Messages and blocks > Post as your bot in Markdown, mention people, add blocks, then edit, delete, show a message to one person, react and pin. Source: https://slaiky.xyz/docs/messages Your bot speaks with `chat.postMessage`, in the conversations it is a member of. A message is text in Markdown, and it may carry blocks: a header, fields, buttons, a menu, an image. ## Post a message `chat.postMessage` needs `chat:write` and takes a `channel` (its id, or `"#name"` for a channel) and the `text`. Add `threadId` to reply in a thread, and `alsoInChannel` to show that reply in the channel too. *curl · your app → Slaiky · `post-message.sh`* ```sh curl -s "${SLAIKY_API:-https://app.slaiky.xyz/api/methods}/chat.postMessage" \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d "{\"channel\": \"${SLAIKY_CHANNEL:-#general}\", \"text\": \"Deploy finished. *All green.*\"}" ``` *Node.js · your app → Slaiky · `post-message.mjs`* ```js // Post a message as your bot. Node 22+, no packages. const API = process.env.SLAIKY_API ?? 'https://app.slaiky.xyz/api/methods'; const res = await fetch(`${API}/chat.postMessage`, { method: 'POST', headers: { authorization: `Bearer ${process.env.SLAIKY_BOT_TOKEN}`, 'content-type': 'application/json' }, body: JSON.stringify({ channel: process.env.SLAIKY_CHANNEL ?? '#general', text: 'Deploy finished. *All green.*' }), }); const answer = await res.json(); console.log(JSON.stringify(answer)); if (!answer.ok) process.exit(1); ``` *Python · your app → Slaiky · `post_message.py`* ```python # Post a message as your bot. Python 3, no packages. import json, os, urllib.request API = os.environ.get("SLAIKY_API", "https://app.slaiky.xyz/api/methods") TOKEN = os.environ["SLAIKY_BOT_TOKEN"] def call(method, body): req = urllib.request.Request( f"{API}/{method}", data=json.dumps(body).encode(), headers={"authorization": f"Bearer {TOKEN}", "content-type": "application/json"}, ) try: with urllib.request.urlopen(req) as res: return json.load(res) except urllib.error.HTTPError as err: # a refusal still answers JSON return json.load(err) answer = call("chat.postMessage", {"channel": os.environ.get("SLAIKY_CHANNEL", "#general"), "text": "Deploy finished. *All green.*"}) print(json.dumps(answer)) if not answer["ok"]: raise SystemExit(f"{answer['error']['code']}: {answer['error']['message']}") ``` In a public channel the bot isn’t in, it joins on first use with `channels:join` (new apps have it); without it, `chat:write.public` lets it post there. A private channel, a DM or a group DM needs the bot in it first: add it to the channel, or open the DM with [`conversations.open`](/docs/reference/methods/conversations.open). A thread reply names the thread’s first message. In an event, that is `message.parentId`, or the message’s own `id` when it has no parent: *your app → Slaiky · `chat.postMessage`* ```json { "channel": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "threadId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "text": "Deploy is green." } ``` *Slaiky → your app* ```json { "ok": true, "message": { "id": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14", "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "parentId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "Deploy is green.", "blocks": null, "…": "…" } } ``` ## Write in Markdown `text` is Markdown, up to 40000 characters: *your app → Slaiky · `text`* ```text **bold** _italic_ ++underline++ ~~strike~~ `code` > a quote - a list 1. a numbered list - [ ] a task # A heading ## Smaller ### Smaller still --- [a link](https://example.com) @alex #launch :tada: ``` Three backticks on a line of their own start a block of code, and three more end it. Links in a bot’s message show no preview card. ## Mention people `@handle` mentions a person, and they are notified if they can read the conversation. Every payload gives you handles (`user.handle`, `message.author.handle`); [`users.info`](/docs/reference/methods/users.info) finds a person by id or `@handle`. `#name` links a channel. In a channel, `@channel` and `@everyone` notify every member, and `@here` whoever is online. Inside code or a quote, nobody is notified: the mention still shows, it just doesn’t ping. Mentions in the blocks’ text count too. ## Text and blocks Blocks lay out what text can’t: fields side by side, buttons, a menu, an image. Send a short `text` with them: it shows above the blocks, and it is what a notification and a search result say. Leave it empty and Slaiky fills those with the blocks’ own words, and the message shows only the blocks. A `chat.update` with new blocks and no `text` keeps those words in step. *your app → Slaiky · `chat.postMessage`* ```json { "channel": "#launch", "text": "Deploy **v42** finished.", "blocks": [ { "type": "section", "fields": ["**Branch**\nmain", "**Commit**\na1b2c3d"] }, { "type": "context", "elements": ["From the deploy pipeline"] } ] } ``` ## The blocks A message holds up to 50 blocks, from a closed catalog. Anything else is refused, so every screen can show every message. | Block | What it shows | | --- | --- | | `header` | A title line, plain text, up to 150 characters | | `section` | Markdown `text`, up to 10 `fields` in two columns, and one `accessory` at its side: a button or a menu | | `actions` | A row of up to 5 buttons and menus | | `context` | Small text: up to 10 short parts on one line | | `divider` | A line across | | `image` | An image from an `http(s)` `url`, with its `alt` text | Every field and limit is on [Blocks](/docs/reference/blocks). What happens when someone clicks a button or picks from a menu is on [Commands, shortcuts and buttons](/docs/interactivity#buttons-and-menus). ## Edit and delete Your bot changes only its own messages. Another’s answers `forbidden`. `chat.update` takes the `messageId` and what changes: `text`, `blocks`, or both. `"blocks": null` takes the blocks away. The message is marked edited, and apps in the conversation hear `message_changed`. *your app → Slaiky · `chat.update`* ```sh curl -s https://app.slaiky.xyz/api/methods/chat.update \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" -H 'content-type: application/json' \ -d '{"messageId": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14", "text": "Deploy is green. Checked twice."}' ``` `chat.delete` takes the `messageId`. The message is gone for everyone, and apps hear `message_deleted` with its id only, never what it said. ## Show a message to one person `chat.postEphemeral` shows a message to one `user` in a conversation they can see, with `text`, maybe `blocks` and a `threadId`. They see it marked as for them only. It is not kept: it is not in the conversation’s history. Answers to commands and clicks are this kind by default. ## React and pin `reactions.add` and `reactions.remove` take a `messageId` and an `emoji`: the emoji itself, or `:name:` for one of the workspace’s own. They need `reactions:write`, which new apps have. Each answers with the message’s `reactions`: *your app → Slaiky · `reactions.add`* ```json { "messageId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "emoji": "👀" } ``` *Slaiky → your app* ```json { "ok": true, "reactions": [{ "emoji": "👍", "count": 1, "userIds": ["7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07"] }, { "emoji": "👀", "count": 1, "userIds": ["7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03"] }] } ``` `pins.add` and `pins.remove` take a `messageId` and need `pins:write`. New apps don’t have it: add it under **Permissions** on the app’s page. `pins.list` takes a `channel` and needs `pins:read`, and the conversation’s `:history` permission. Every method, with what it takes and answers: [Methods](/docs/reference/methods#messages). --- # Commands, shortcuts and buttons > Slash commands, shortcuts, buttons and menus. What reaches your app when someone uses one, and the three ways to answer. Source: https://slaiky.xyz/docs/interactivity Someone types your command, runs your shortcut or clicks your button. Slaiky tells your app who did it and where, and waits a moment for an answer. You can answer at once, answer later, or open a modal. ## Slash commands On the app’s page, open **Slash commands** and add a **Command** (`/deploy`), **What it does**, a **Usage hint** and a **Request URL**. In Socket Mode, commands arrive on the app’s connection and need no URL. Adding a command gives the app the `commands` permission. In a [manifest](/docs/manifests), commands are `features.slash_commands`. A command name is used once per workspace: it can’t be another app’s, or one Slaiky has built in. When someone runs it, the command goes to its own Request URL as a signed POST of JSON, or arrives as a `slash_commands` envelope in [Socket Mode](/docs/socket-mode). Its `text` is what they typed after the command. ## Shortcuts A global shortcut is in the composer’s **Shortcuts** menu. A message shortcut is in a message’s menu, and comes with that message. On the app’s page, open **Buttons and shortcuts** and add one under **Shortcuts**: a **Name**, **Where** (**Composer** or **Message menu**) and a **Callback ID**, which comes back to you so you know which one ran. In a manifest, they are `features.shortcuts`, with `type` `"global"` or `"message"` and a `callback_id`. An app has up to 10. Shortcuts need the `commands` permission, and somewhere to go: the **Interactivity URL**, or Socket Mode. In a manifest, interactivity must be on too (`settings.interactivity.is_enabled`). One arrives as `shortcut`, or as `message_action` with the `message` and its `messageId`, both with the `callbackId`. ## Buttons and menus Put them in your message’s blocks, in an `actions` block or as a section’s `accessory`. A `button` has its `text`, an `actionId` you choose, a `value`, and a `style` if you like (`primary` or `danger`). A `static_select` has an `actionId`, a `placeholder` and its `options`, each `{ "text", "value" }`. *your app → Slaiky · `chat.postMessage`* ```json { "channel": "#launch", "text": "Ship it?", "blocks": [ { "type": "actions", "elements": [ { "type": "button", "text": "Ship", "actionId": "ship", "value": "v42", "style": "primary" }, { "type": "static_select", "actionId": "region", "placeholder": "Where", "options": [{ "text": "Europe", "value": "eu" }, { "text": "Americas", "value": "us" }] } ] } ] } ``` A click or a pick reaches your app as `block_actions`, at the **Interactivity URL** or as an `interactive` envelope. `actions[0]` says what happened: its `actionId`, `type` and `value`, and for a pick `selectedOption`, the option chosen, as `{ "text", "value" }`. A pick is always one of the menu’s own options. Only messages your app posted send it clicks. A button with a `url` opens that link instead, and your app hears nothing. *Slaiky → your app · `block_actions`* ```json { "type": "block_actions", "actions": [{ "type": "button", "value": "v42", "actionId": "ship" }], "messageId": "7f3c0018-5a1e-4c2b-9d6f-1a2b3c4d5e11", "message": { "id": "7f3c0018-5a1e-4c2b-9d6f-1a2b3c4d5e11", "body": "Ship it?", "…": "…" }, "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "triggerId": "1731240000.trigger.docs", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token" } ``` *your app → Slaiky* ```json { "text": "Shipping **v42**…", "replaceOriginal": true } ``` The full message and the person come with it: see [a click or a pick](/docs/reference/payloads#a-click-or-a-pick-block-actions). ## What arrives Every command, shortcut and click tells you who and where, and how to answer: | Field | What it is | | --- | --- | | `userId`, `user` | The person who acted, and their profile | | `channelId`, `parentId` | Where: the conversation, and the thread (or `null`) | | `responseUrl`, `responseToken` | How to [answer later](#answer-later) | | `triggerId` | How to [open a modal](#open-a-modal) for them | | `appId`, `workspaceId` | Your app, and the workspace it is in | Each kind, field by field and recorded on a real server: [Interaction payloads](/docs/reference/payloads). ## Answer at once Answer the request itself: the body of your HTTP answer, or the `payload` of your ack in [Socket Mode](/docs/socket-mode#acknowledge-every-envelope). It must arrive within 3 seconds. | Field | What it does | | --- | --- | | `text` | The answer, in [Markdown](/docs/messages#write-in-markdown) | | `blocks` | [Blocks](/docs/reference/blocks), as in messages | | `responseType` | `ephemeral` (the default): only that person sees it. `in_channel`: your bot posts it in the conversation, in the thread if there is one | | `replaceOriginal` | The answer takes the place of the message that was clicked | | `deleteOriginal` | The message that was clicked is deleted | `replaceOriginal` and `deleteOriginal` work only on a message your app posted. The snake_case spellings (`response_type`…) work too. *Slaiky → your app · `POST /slaiky/commands`* ```json { "type": "command", "command": "/deploy", "text": "main", "userId": "…", "channelId": "…", "parentId": null, "triggerId": "…", "responseUrl": "…" } ``` *your app → Slaiky* ```http HTTP/1.1 200 OK content-type: application/json { "text": "Deploying **main**…", "responseType": "in_channel" } ``` An empty `2xx` answers nothing. Plain text answers as `text`. An answer over 256 KB counts as none. Blocks that don’t fit the catalog are dropped from an HTTP answer, and refuse the whole ack in Socket Mode. ## Answer later Slow work? Answer at once with a word (or nothing), then post to `responseUrl` with the same fields when you are done. It needs no token: the URL is the secret, so keep it to yourself. It works for 30 minutes, for up to 5 answers. *your app → Slaiky · `responseUrl`* ```sh curl -s "$RESPONSE_URL" -H 'content-type: application/json' \ -d '{"text": "Deployed **main**.", "responseType": "in_channel"}' ``` It answers `{ "ok": true }` with the `message` it posted, the `ephemeral` it showed, or `"deleted": true`. Holding the bot token instead of the URL? [`commands.respond`](/docs/reference/methods/commands.respond) does the same with the `responseToken`. ## Open a modal `triggerId` lets your app open a [modal](/docs/modals#open-a-modal) for the person who just acted, with `views.open`. It works for 30 seconds, and opens one modal. Answer or acknowledge the request first, then open it. ## When the app doesn’t answer If your app says nothing within 3 seconds (no `2xx` over HTTP, no ack in Socket Mode), the person who ran the command or the shortcut, or who clicked or picked, is told that it didn’t answer. Only they see it. If your app isn’t connected (Socket Mode on, or no URL and no socket open), they are told it isn’t connected. A late ack is ignored. The `responseUrl` still works. > **Careful:** Commands and clicks are tried once. Nothing is sent again later, so answer fast, then do the slow work. --- # Modals and App Home > Open a modal for one person and read what they fill in. Draw your app’s Home tab for each person who opens it. Source: https://slaiky.xyz/docs/modals A modal is a window your app opens for one person, right after they did something: ran a command, clicked a button, used a shortcut. The Home tab is a page your app draws for each person, in its conversation with them. Both are views: blocks your app sends, shown to one person only. ## Open a modal Call `views.open` with the `triggerId` of what the person just did, within 30 seconds. A trigger opens one modal. A used or expired one answers `invalid_trigger`. Opening a modal closes any modal the person had open, from any app. *your app → Slaiky · `views.open`* ```json { "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" }] } } ] } } ``` *Slaiky → your app* ```json { "ok": true, "view": { "id": "7f3c0017-5a1e-4c2b-9d6f-1a2b3c4d5e10", "type": "modal", "title": "Daily update", "callbackId": "daily", "previousId": null, "hash": "1731240000.docs", "…": "…" } } ``` ## The view | Field | What it is | | --- | --- | | `type` | `"modal"` or `"home"` | | `title` | The modal’s title, up to 24 characters. A modal needs one | | `submit`, `close` | The labels of its two buttons, up to 24 characters. A modal with inputs needs `submit` | | `blocks` | What it shows: the message blocks, plus inputs. Up to 50 | | `callbackId` | Your name for it. It comes back with everything that happens to it | | `privateMetadata` | A string for your app, [kept with the view](#keep-your-own-data-with-it) | | `notifyOnClose` | `true` to hear when the person [closes it](#when-the-person-closes-it) | The whole schema is on [Views](/docs/reference/blocks#views). ## Inputs An `input` block has a `blockId`, a `label`, maybe a `hint`, `optional` when it may stay empty, and one `element`. Each `blockId` is used once per view. | `element.type` | The person gives | It comes back as | | --- | --- | --- | | `plain_text_input` | Text (`multiline`, `minLength`, `maxLength`, `placeholder`, `initialValue`) | `value` | | `static_select` | One of the `options` | `selectedOption` | | `checkboxes` | Any of the `options` (`initialValues`) | `selectedOptions` | | `datepicker` | A date (`initialDate`) | `selectedDate`, as `YYYY-MM-DD` | Buttons and menus in a modal work as in messages: a click sends `block_actions` with the `view`, and a new `triggerId`. ## Stack and change `views.push` puts a modal on top of the one your app has open. It takes a fresh `triggerId`: a click in the modal brings one. The person goes back with the arrow. Up to 3 can be open at once. `views.update` changes an open view in place, by its `viewId`. Send its `hash` too: if the view changed since you read it, the call answers `hash_conflict` and changes nothing. Each change gives the view a new `hash`. ## When the person submits Slaiky checks the inputs first: what isn’t optional is filled in, picks are among the options, dates are dates, text fits its lengths. The person fixes those before your app hears anything. Then it gets `view_submission`, with what they gave under `view.state.values`, by `blockId` and then `actionId`: *Slaiky → your app · `view_submission`* ```json { "type": "view_submission", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "view": { "id": "7f3c0017-5a1e-4c2b-9d6f-1a2b3c4d5e10", "callbackId": "daily", "privateMetadata": null, "hash": "1731240000.docs", "state": { "values": { "done": { "v": { "type": "plain_text_input", "value": "Shipped the export to CSV" } }, "mood": { "v": { "type": "static_select", "selectedOption": { "text": "Smooth", "value": "smooth" } } } } } }, "triggerId": "1731240000.trigger.docs", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token" } ``` *your app → Slaiky* ```json { "responseAction": "errors", "errors": { "done": "A few more words, please." } } ``` Answer within 3 seconds, in the body of your HTTP answer or the `payload` of your ack: | You answer | The person sees | | --- | --- | | Nothing (an empty `2xx`, an ack without `payload`) | The modal closes | | `responseAction: "errors"` with `errors`, text by `blockId` | Your words under each input. The modal stays open | | `responseAction: "update"` with a `view` | This modal, changed | | `responseAction: "push"` with a `view` | A new modal on top | | `responseAction: "clear"` | Every modal closes | An `update` or `push` needs a modal `view` that fits the schema; anything else is shown to the person as a view that can’t be shown. If your app doesn’t answer in time, the modal stays open and the person is told it didn’t answer. To post something after a submission, use its `responseUrl` ([Answer later](/docs/interactivity#answer-later)) or `chat.postMessage`. ## When the person closes it With `notifyOnClose: true`, closing the modal sends your app `view_closed`, with the `view` and `isCleared`: `true` when every open modal closed at once. Field by field: [a modal closed](/docs/reference/payloads#a-modal-closed-view-closed). Nobody waits on `view_closed`, so your app needn’t answer it: the person who closed the modal is never told it didn’t. In Socket Mode, acknowledge it like any envelope all the same. ## Keep your own data with it `privateMetadata` is a string of up to 3000 characters that stays with the view: an id, a little JSON. It comes back in `view_submission`, `view_closed` and the clicks inside the view, and never reaches the person’s screen. ## App Home Turn it on in the app’s page, **App Home → Home tab**, or with `features.app_home.home_tab_enabled` in a [manifest](/docs/manifests). Your app’s conversation with each person then has two tabs: **Home** and **Messages**. When someone opens Home, your app gets `app_home_opened`, if it hears that event (**Events → Events it hears**). Draw their Home with `views.publish`: *Slaiky → your app · `app_home_opened`* ```json { "type": "event_callback", "event": { "type": "app_home_opened", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "channelId": "7f3c0016-5a1e-4c2b-9d6f-1a2b3c4d5e0f", "tab": "home" }, "…": "…" } ``` *your app → Slaiky · `views.publish`* ```json { "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "view": { "type": "home", "blocks": [{ "type": "header", "text": "Hi there" }, { "type": "section", "text": "Your week, at a glance." }] } } ``` Each person has their own Home. `views.publish` draws it for one `userId`, at any time, with no trigger; send the `hash` to avoid overwriting a newer one. A Home has no inputs, but its buttons and menus send `block_actions` with the `view` and a `triggerId`, so a click there can open a modal. With the Home tab off, `views.publish` is refused. ## The Messages tab **Messages tab** (`messages_tab_enabled`, on unless you turn it off) is where people and your app talk. Turn on **Only the app writes** (`messages_tab_read_only_enabled`) and people read your app’s messages there but can’t reply. --- # Manifests and configuration tokens > Describe an app in one JSON file, then make, check, change and remove it from that file, in Slaiky or from a script. Source: https://slaiky.xyz/docs/manifests A manifest is one JSON document that says what an app is: its name, its bot, the permissions it holds, the events it hears, its commands and shortcuts, and where Slaiky sends things. Keep it next to the code it describes. Every field is on [Manifest](/docs/reference/manifest). *your app → Slaiky · `manifest.json`* ```json { "_metadata": { "major_version": 1 }, "display_information": { "name": "Deploy bot", "description": "Posts deploys", "background_color": "#2c2d30" }, "features": { "bot_user": { "display_name": "deploybot", "always_online": true }, "app_home": { "home_tab_enabled": true, "messages_tab_enabled": true, "messages_tab_read_only_enabled": false }, "slash_commands": [{ "command": "/deploy", "description": "Deploy a branch", "usage_hint": "[branch]" }], "shortcuts": [{ "name": "Create ticket", "type": "message", "callback_id": "create_ticket", "description": "From this message" }] }, "oauth_config": { "scopes": { "bot": ["chat:write", "channels:history", "app_mentions:read", "commands"] } }, "settings": { "event_subscriptions": { "bot_events": ["app_mention", "message.channels"] }, "interactivity": { "is_enabled": true }, "socket_mode_enabled": true } } ``` | Part | What it says | | --- | --- | | `display_information` | The name, descriptions and color people see. | | `features.bot_user` | The bot. Its @handle comes from `display_name` when the app is made. | | `features.app_home` | The Home and Messages tabs of the app’s DM. | | `features.slash_commands`, `features.shortcuts` | What people type or pick to reach the app. | | `oauth_config.scopes.bot` | The permissions the app holds: exactly these. | | `oauth_config.redirect_urls` | Where installs from other workspaces come back to ([Add to Slaiky](/docs/distribution)). | | `settings` | Where events and clicks go: a `request_url`, or `socket_mode_enabled`. | ## In Slaiky To make an app from a manifest, open **Agents and integrations** in the sidebar, then **Apps & bots → From a manifest**. Paste the JSON and press **Create app**. If its events URL doesn't answer the challenge, no app is made. Slaiky then shows the bot token once, as for any new app. To change an app, open its page, then **Manifest**. It holds the app as it is now. Edit it and press **Save manifest**, or **Download** it to keep in your repository. Problems show under the editor, each with where it is. Agents have no manifest: only apps do. > **Careful:** A manifest describes the whole app. What it leaves out goes back to the default: no `slash_commands` removes the commands, no `socket_mode_enabled` turns Socket Mode off, no `oauth_config` leaves the app without permissions. Start from the app’s own manifest (**Manifest**, or `apps.manifest.export`) and edit that. ## The rules it is checked against Slaiky checks each field first (its type and length, on [Manifest](/docs/reference/manifest)), then how the fields fit together: - Events need somewhere to go: `settings.event_subscriptions.request_url`, or `socket_mode_enabled`. - Each event needs its permission: `app_mention` needs `app_mentions:read`, `message.channels` needs `channels:history` ([Events](/docs/reference/events) lists them all). `member_joined_channel`, `member_left_channel` and the `channel_*` events need `channels:read`. - Interactivity turned on (`settings.interactivity.is_enabled`) needs a `request_url`, or Socket Mode. - Shortcuts need interactivity turned on. - Slash commands need the `commands` permission. - Each command is listed once, and is not already another app’s or one of Slaiky’s own. - An events `request_url` must answer the challenge before it is saved ([Events over HTTP](/docs/events)). - Sent as text, the manifest is at most 64000 bytes. When a check fails after the app was made (its URL didn’t answer, a command was taken), nothing is left behind: its @handle is free again. ### When it says no The answer is `invalid_manifest`, with one message per problem in `fields`: *your app → Slaiky · `apps.manifest.validate`* ```json { "manifest": { "display_information": { "name": "Deploy bot" }, "features": { "slash_commands": [{ "command": "/deploy" }] }, "oauth_config": { "scopes": { "bot": ["chat:write"] } }, "settings": { "event_subscriptions": { "bot_events": ["app_mention"] }, "socket_mode_enabled": true } } } ``` *Slaiky → your app · `422`* ```json { "ok": false, "error": { "code": "invalid_manifest", "message": "The manifest has problems", "fields": { "/settings/event_subscriptions/bot_events/0": "This event needs the app_mentions:read permission", "/features/slash_commands": "Slash commands need the commands permission" } } } ``` Each key of `fields` is a JSON pointer into your manifest; `/` is the document itself (not JSON, or too big). The status is `422`, or `409` when a command name is taken. The messages are in the language your request asks for ([Errors and rate limits](/docs/errors)). ## Configuration tokens A bot token acts as the bot. A configuration token (`slk-cfg-…`) acts as you: it calls `apps.manifest.*` and manages the apps you manage (the ones you made, or any of them if you are an owner or admin) in the workspace where you made it. It is for scripts and CI. Make one in **Apps & bots → Configuration tokens → New token**. If you haven’t signed in or confirmed your password in the last 10 minutes, Slaiky asks for it (or your 2FA code) first. Then it shows two values once: the **Configuration token** and its **Refresh token** (`slk-cfr-…`). A configuration token works for 12 hours. Then trade its refresh token for a new pair with `tooling.tokens.rotate`, with no Authorization header. A refresh token works for 30 days from when the pair was made, even after its token expired: the list then says *expired, can be refreshed*. Each refresh token works once, and the old configuration token stops at once, so keep the new pair. **Revoke** stops a token right away. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/tooling.tokens.rotate \ -H 'content-type: application/json' \ -d "{\"refreshToken\": \"$SLAIKY_CONFIG_REFRESH_TOKEN\"}" ``` *Slaiky → your app* ```json { "ok": true, "token": "slk-cfg-…", "refreshToken": "slk-cfr-…", "expiresAt": "2026-11-11T00:00:00.000Z" } ``` A token that is wrong, expired or already used answers `401` with `invalid_auth`. ## From a script The five `apps.manifest.*` methods take the configuration token in `Authorization` and a JSON body. `manifest` is the document as an object, or the same JSON as a string. They are listed with the [Web API methods](/docs/reference/methods#manifests-configuration-token). Making, changing and removing apps is limited to 30 per 1 hour for each member, from a script and on app pages alike. This is the whole life of an app, from your `manifest.json`: *you run* ```sh export SLAIKY_CONFIG_TOKEN=slk-cfg-… ``` ### 1. Check it *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.validate \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d "{\"manifest\": $(cat manifest.json)}" ``` *Slaiky → your app* ```json { "ok": true } ``` ### 2. Make the app *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.create \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d "{\"manifest\": $(cat manifest.json)}" ``` *Slaiky → your app · `answer (shortened)`* ```json { "ok": true, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "app": { "id": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "name": "Deploy bot" }, "credentials": { "botToken": "slk-bot-…", "signingSecret": "…", "clientId": null, "clientSecret": null } } ``` The bot token comes only in this answer: store it now. The signing secret too, though **Show secret** on the app’s page shows it again. `clientId` and `clientSecret` stay empty until you let [other workspaces](/docs/distribution) install the app. *you run* ```sh export SLAIKY_APP_ID=7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01 ``` ### 3. Change it Start from the app as it is now. `apps.manifest.export` answers `{ "ok": true, "manifest": … }`, the same document the **Manifest** page shows; here `jq` keeps the manifest part: *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.export \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d "{\"appId\": \"$SLAIKY_APP_ID\"}" | jq .manifest > manifest.json ``` Edit it, then send it back whole: *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.update \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d "{\"appId\": \"$SLAIKY_APP_ID\", \"manifest\": $(cat manifest.json)}" ``` *Slaiky → your app* ```json { "ok": true, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "permissionsUpdated": true } ``` `permissionsUpdated` says whether the permissions changed. When they change, or Socket Mode is turned on or off, the bot’s open sockets close with `1012`: connect again ([Socket Mode](/docs/socket-mode)). Installs in other workspaces follow at once. ### 4. Remove it *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.delete \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d "{\"appId\": \"$SLAIKY_APP_ID\"}" ``` *Slaiky → your app* ```json { "ok": true } ``` Its bot leaves every conversation, its token, commands and webhooks stop, and its installs in other workspaces go with it. --- # Add to Slaiky > Let people in other workspaces install your app with one link. Each install gets its own bot and token; one server answers them all. Source: https://slaiky.xyz/docs/distribution An app lives in the workspace where it was made. Let other workspaces install it, and anyone allowed to make apps there can add it with one link. Each install is a copy of your app in that workspace, with its own bot and its own token. Your server gets the token through a short exchange and keeps one per workspace. ## Let other workspaces in On the app’s page, open **Other workspaces** and turn it on. Add your **Redirect URLs** (up to 20), where people come back after installing, and press **Save**. A manifest can list them too, in `oauth_config.redirect_urls`. The section then shows the app’s **Client ID**, **Show client secret** (Slaiky asks for your password or 2FA code if you haven’t given it in the last 10 minutes) and an **Install link**. Keep the client secret on your server, never in a page. Only apps can be installed elsewhere, not agents. ## The install link ```text https://app.slaiky.xyz/oauth/v2/authorize?client_id=…&scope=…&redirect_uri=…&state=… ``` | Parameter | What it is | | --- | --- | | `client_id` | The app’s **Client ID**. | | `scope` | The permissions to ask for, separated by commas or spaces. Only ones the app holds count. Left out: all of them. Naming only permissions the app doesn’t hold asks for, and grants, none. | | `redirect_uri` | Required. One of the app’s redirect URLs, as saved or with a query added. | | `state` | Your own value, sent back as is. Make a fresh one for each link and check it when the person comes back. | The **Install link** on the app’s page asks for every permission the app holds and comes back to the first redirect URL, without `state`. Build your own link to add one. ## What the person sees 1. If they are signed out, they sign in first and come back to the same page. 2. They pick one of their workspaces under **Where**, and read **What it may do**: the permissions, in plain words. 3. They press **Install**, or **Cancel**. They can’t install it in the workspace where it was made, or in one where they can’t make apps. Installing it again where it already is adds what the link asks for now to what it had. Then the browser goes back to your redirect URL with `?code=…&state=…`, or with `?error=access_denied&state=…` after **Cancel**. ## Trade the code for a token Call `oauth.v2.access` from your server within 10 minutes. It takes no Authorization header; the client id and secret say who you are. Like every method, the body is JSON, not a form. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/oauth.v2.access \ -H 'content-type: application/json' \ -d "{\"clientId\": \"$SLAIKY_CLIENT_ID\", \"clientSecret\": \"$SLAIKY_CLIENT_SECRET\", \"code\": \"$CODE\", \"redirectUri\": \"https://example.com/slaiky/oauth\"}" ``` *Slaiky → your app* ```json { "ok": true, "accessToken": "slk-bot-…", "tokenType": "bot", "scope": "chat:write,channels:history,app_mentions:read", "botUserId": "…", "appId": "…", "team": { "id": "…", "name": "Lumen", "slug": "lumen" } } ``` Keep `accessToken` under `team.id`: it is that workspace’s bot token, acting with the permissions it was granted. `appId` is the install’s own id there, and `botUserId` its bot. A new exchange for the same install (after installing it again) gives a new token and stops the old one. `redirectUri` is optional; when you send it, it must be the one the link used. A code works once: the first try spends it, even one that fails. A wrong, expired or spent code answers `400` with `invalid_code`; a wrong client secret, `401` with `invalid_client`. This server does the whole round trip: `/install` makes a link with a fresh `state`, and the redirect URL checks it and trades the code. *your app → Slaiky · `server.mjs`* ```js // Add to Slaiky: the two pages an installable app serves. Node 22+, no packages. // /install sends the person to Slaiky's install page, with a fresh `state` // the redirect URL checks `state`, then trades the code for that workspace's bot token import { randomUUID } from 'node:crypto'; import { createServer } from 'node:http'; const APP = process.env.SLAIKY_APP ?? 'https://app.slaiky.xyz'; // One of the app's redirect URLs, exactly as saved on its page. const REDIRECT = new URL(process.env.SLAIKY_REDIRECT_URL ?? 'http://localhost:3000/slaiky/oauth'); const CLIENT_ID = process.env.SLAIKY_CLIENT_ID; const SCOPES = 'chat:write,channels:history,app_mentions:read'; const states = new Set(); // install links handed out and not used yet const tokens = new Map(); // workspace id → its bot token (keep yours in a database) createServer(async (req, res) => { const url = new URL(req.url, REDIRECT); if (url.pathname === '/install') { const state = randomUUID(); states.add(state); const link = new URL('/oauth/v2/authorize', APP); link.search = new URLSearchParams({ client_id: CLIENT_ID, scope: SCOPES, redirect_uri: REDIRECT.href, state }); return res.writeHead(302, { location: link.href }).end(); } if (url.pathname !== REDIRECT.pathname) return res.writeHead(404).end(); // Back from Slaiky: ?code=…&state=…, or ?error=access_denied when the person said no. const code = url.searchParams.get('code'); if (!code || !states.delete(url.searchParams.get('state'))) return res.writeHead(400).end('Not installed.'); const answer = await fetch(`${APP}/api/methods/oauth.v2.access`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ clientId: CLIENT_ID, clientSecret: process.env.SLAIKY_CLIENT_SECRET, code, redirectUri: REDIRECT.href }), }).then((r) => r.json()); if (!answer.ok) return res.writeHead(400).end(answer.error.message); tokens.set(answer.team.id, answer.accessToken); res.writeHead(200, { 'content-type': 'text/plain; charset=utf-8' }).end(`Installed in ${answer.team.name}.`); }).listen(Number(REDIRECT.port) || 3000); ``` ## One server for every install Over HTTP, every install sends to your app’s request URLs, signed with your app’s one signing secret. Each event, command and click names where it comes from: `workspaceId`, and the install’s `appId`. Answer with the token you kept for that workspace. *Slaiky → your app · `event_callback`* ```json { "type": "event_callback", "eventId": "…", "eventTime": 1794312000, "appId": "…", "workspaceId": "…", "event": { "type": "app_mention", "channelId": "…", "channelType": "channel", "threadId": null, "message": { "id": "…", "body": "@deploybot hello" } } } ``` Over Socket Mode, each install’s bot has its own connection: open one with each workspace’s token (`apps.connections.open`). See [Socket Mode](/docs/socket-mode). ## What an install copies | What | In the install | | --- | --- | | Bot, token and permissions | Its own. The permissions are the ones granted there, within the app’s. | | Name, descriptions, color, request URLs, events, Socket Mode, App Home, shortcuts, signing secret | Follow your app. A change on your app’s page or manifest reaches every install at once. | | Permissions you take away | Taken away from every install too. Permissions you add are not: people install again to grant them. | | Slash commands | Copied when it is installed, where the name is free in that workspace. Commands added later don’t reach existing installs. | | Incoming webhooks, redirect URLs, client id and secret | Not copied. An install can’t be installed elsewhere in turn. | An install’s settings are changed only where the app was made; its page in the other workspace says so. There, its token, its slash commands and new webhooks can’t be changed either: those calls answer `403`. Your server gets a new token when the app is installed again. ## Uninstalls Whoever installed it, or an owner or admin of that workspace, can press **Uninstall** on its page there. Its bot is turned off, its commands go, and its token stops: calls with it answer `401` with `unauthorized`. Your app gets `app_uninstalled`, whether it asked for that event or not: *Slaiky → your app · `event_callback`* ```json { "type": "event_callback", "eventId": "…", "eventTime": 1794312000, "appId": "…", "workspaceId": "…", "event": { "type": "app_uninstalled", "workspaceId": "…", "byUserId": "…" } } ``` Removing your app itself removes every install; each one sends `app_uninstalled` with `byUserId: null`. > **Careful:** `app_uninstalled` is sent once, as the install goes; nothing is sent again after it. If your server missed it, a token that starts answering `unauthorized` tells you the same thing: forget that workspace. --- # Incoming webhooks > A secret URL that posts into one channel as your app’s bot. No token and no server: one POST from any system. Source: https://slaiky.xyz/docs/webhooks An incoming webhook is the simplest way in: a URL that posts into one channel as your app’s bot. Anything that can send an HTTP POST can use it, like a deploy script, a monitor or a form. There is nothing to host and no token to keep, only the URL. ## Make one On the app’s page, open **Incoming webhooks**, pick a **Channel** and press **Create URL**. Copy it now: it isn’t shown again. Make as many as you need, say one per channel or one per system. - The channel is one you are in, public or private. Direct messages can’t have one. - The app’s bot joins that channel. - The app gets the `incoming-webhook` permission (*Post through incoming webhooks*), shown under **Permissions**. - Whoever manages the app makes and removes its webhooks. The URL looks like `https://app.slaiky.xyz/api/hooks/…`. ## Post Send JSON with a `text`. No Authorization header: the URL is enough. *curl · you run* ```sh curl -s "$SLAIKY_WEBHOOK_URL" \ -H 'content-type: application/json' \ -d '{"text": "Deploy finished. *All green.*"}' ``` *Node.js · your app → Slaiky · `post.mjs`* ```js // Post into the webhook's channel as the app's bot. Node 22+, no packages. const res = await fetch(process.env.SLAIKY_WEBHOOK_URL, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ text: 'Deploy finished. *All green.*' }), }); const answer = await res.json(); console.log(JSON.stringify(answer)); if (!answer.ok) process.exit(1); ``` *Python · your app → Slaiky · `post.py`* ```python # Post into the webhook's channel as the app's bot. Python 3, no packages. import json, os, urllib.error, urllib.request req = urllib.request.Request( os.environ["SLAIKY_WEBHOOK_URL"], data=json.dumps({"text": "Deploy finished. *All green.*"}).encode(), headers={"content-type": "application/json"}, ) try: with urllib.request.urlopen(req) as res: answer = json.load(res) except urllib.error.HTTPError as err: # a refusal still answers JSON answer = json.load(err) print(json.dumps(answer)) if not answer["ok"]: raise SystemExit(f"{answer['error']['code']}: {answer['error']['message']}") ``` *Slaiky → your app* ```json { "ok": true, "messageId": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14" } ``` The message shows up in the channel at once, from the app’s bot, with its APP badge. ## The body | Field | What it is | | --- | --- | | `text` | The message, in Markdown, up to 40000 characters. Notifications and search show it. | | `blocks` | Optional. Up to 50 layout blocks from the [closed catalog](/docs/reference/blocks). | Send `text`, `blocks` or both. A body with neither is refused with `400` and `bad_request`; a wrong field, with `422` and `invalid`, naming it in `fields`. Other fields are ignored. With blocks, keep a `text` too: it is what people read where blocks don’t show. *your app → Slaiky · `body`* ```json { "text": "Deploy finished: api on main", "blocks": [ { "type": "header", "text": "Deploy finished" }, { "type": "section", "text": "*api* is live.", "fields": ["*Branch*\nmain", "*Commit*\n4f2c9e1"] }, { "type": "context", "elements": ["Sent by CI"] } ] } ``` A button in a webhook’s message reaches your app like a button in any of its messages ([Commands, shortcuts and buttons](/docs/interactivity)). ## The URL is the secret Whoever has the URL can post as your bot in that channel. Keep it where you keep passwords: a secret store, or an environment variable on the machine that sends. > **Careful:** Never put a webhook URL in a repository, a page or a chat. If it leaks, remove it on the app’s page (the bin next to its channel) and make another. The old URL stops at once and answers `404` with `not_found`. Removing the app, or turning its bot off, stops all its webhooks too. So does taking away its `incoming-webhook` permission: its URLs then answer `403` with `missing_scope`. Posts to one URL are limited to 60 per 1 minute, and calls from one address to any webhook URL to 600 per 1 minute. Over a limit, the answer is `429` with `Retry-After` ([Errors and rate limits](/docs/errors)). ## When to use a bot token instead A webhook only posts new messages, in its one channel. Use the bot token with the [Web API](/docs/web-api) when your code needs to: - post in several channels, in a thread, or to one person; - edit or delete what it posted; - read messages, react, or look people up; - hear events, commands and clicks ([Socket Mode](/docs/socket-mode), or [events over HTTP](/docs/events)). Both can live in one app. A webhook’s messages are its bot’s, so `chat.update` with the bot token can edit one later, by the `messageId` the webhook answered. --- # Errors and rate limits > What a refusal looks like, the codes your app will meet, and how to wait when Slaiky says you sent too many. Source: https://slaiky.xyz/docs/errors Every answer says `ok`. When Slaiky refuses a call, the body is `{ "ok": false, "error": { … } }` and the HTTP status says the same. Write your code against `code`; show `message` to people. ## The refusal *your app → Slaiky · `reactions.add`* ```json { "messageId": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14", "emoji": "✅" } ``` *Slaiky → your app · `403`* ```json { "ok": false, "error": { "code": "missing_scope", "message": "This app needs the reactions:write permission for that", "needed": "reactions:write" } } ``` | Field | What it is | | --- | --- | | `code` | What went wrong, for your code. It never changes with the language. | | `message` | The same, in one sentence, for a person. | | `fields` | Which inputs are wrong, each with its own message. | | `needed` | With `missing_scope`: the permission the call needs. | | `retryAfter`, `scope` | With `429`: the seconds to wait, and which limit it was. | | `max` | With `413`: the largest body accepted, in bytes. | A wrong argument is named in `fields` by its path in your body (`channel`, `blocks.0.text`), and `message` repeats the first one: *Slaiky → your app · `422`* ```json { "ok": false, "error": { "code": "invalid", "message": "This field is required", "fields": { "channel": "This field is required", "threadId": "Invalid format" } } } ``` A manifest’s problems are named by JSON pointer instead ([Manifests](/docs/manifests)). When a call to the [MCP server](/docs/mcp) is refused before a tool runs (a wrong token, too many calls), the same `error` object comes in the JSON-RPC `error.data`. A tool that refuses (a missing permission, say) answers with its result instead: `isError: true` and one sentence in English, with no `code`. ## In the reader’s language `message` and `fields` follow the request’s `Accept-Language` header, in any language Slaiky speaks; without one, English. `code` stays the same, so your code never needs to read the words. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/reactions.add \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'accept-language: pt-BR' \ -H 'content-type: application/json' \ -d '{"messageId": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14", "emoji": "✅"}' ``` *Slaiky → your app · `403`* ```json { "ok": false, "error": { "code": "missing_scope", "message": "Este app precisa da permissão reactions:write para isso", "needed": "reactions:write" } } ``` If your app shows Slaiky’s message to someone, ask in their language. ## The codes | `code` | Status | When | What to do | | --- | --- | --- | --- | | `unauthorized` | 401 | No bot token, a wrong one, or one that stopped: a new one was made, or the app was removed or uninstalled. | Check the token. **Token and secret → New token** makes another. | | `invalid_auth` | 401 | A configuration token or refresh token that is wrong, expired or already used. | Refresh it, or make a new one ([Manifests](/docs/manifests)). | | `missing_scope` | 403 | The app lacks the permission the call needs. `needed` names it. A post to a public channel the bot isn’t in, without `channels:join` or `chat:write.public`, answers this too, and so does an incoming webhook whose app lost `incoming-webhook`. | Add it under **Permissions**, or in the manifest. | | `forbidden` | 403 | Allowed in general, not here: the message isn’t the bot’s, the channel is archived, the app isn’t yours to change, or it was installed from another workspace. | Read `message`. | | `not_found` | 404 | The channel, message, person, file, view or webhook isn’t there, or the bot can’t see it: a private channel or DM the bot isn’t in looks like this. Also an address that isn’t part of the API. | Check the id or the `#name`; add the bot to the conversation. | | `unknown_method` | 404 | No method has that name. | See [Web API methods](/docs/reference/methods). | | `invalid` | 422 | An argument is missing or wrong. | Fix what `fields` names. | | `bad_request` | 400 | The arguments are fine, but the call can’t be done: an empty message, a reply to a reply, a response URL used too many times. | Read `message`. | | `socket_mode_off` | 400 | `apps.connections.open` while Socket Mode is off. | Turn it on under **Events**. | | `invalid_trigger` | 400 | `views.open` or `views.push` with a trigger id that expired or was used. | Open the modal right after the click: a trigger id lasts 30 seconds. | | `hash_conflict` | 409 | `views.update` or `views.publish` with a `hash` that changed since. | Load the view again, then update it. | | `invalid_manifest` | 422 or 409 | The manifest has problems, by JSON pointer in `fields`. 409: a command name is taken. | See [Manifests](/docs/manifests). | | `invalid_code`, `invalid_client` | 400, 401 | `oauth.v2.access` with a code that is wrong, expired or spent, or with a wrong client secret. | See [Add to Slaiky](/docs/distribution). | | `plan_required` | 402 | The workspace is read-only until it has a plan: only a few reads answer. | Tell the workspace’s owner. | | `payload_too_large` | 413 | The body is too big. `max` is the limit, in bytes. | Send less, or upload files instead. | | `rate_limited`, `quota_exceeded` | 429 | Too many calls, or too many bytes uploaded, for now. | Wait `Retry-After` seconds ([Rate limits](/docs/errors#rate-limits)). | | `internal` | 500 | Something failed on Slaiky’s side. | Try again later. | ## Rate limits A bot’s Web API calls are limited to 120 per 10 seconds. Calls that do what a person does (post, edit, react, change a channel, upload) also count against the limit a person has for that action, per bot. Calls made without a bot token (configuration tokens, `oauth.v2.access`) count by the address they come from. `apps.manifest.create`, `update` and `delete` also count as app changes, limited to 30 per 1 hour for each member (`scope`: `apps`). Each install in another workspace is its own bot, with its own count. Over a limit, the answer is `429` with a `Retry-After` header, in whole seconds, and the same number in `retryAfter`. `scope` says which limit it was: `botApi` for the Web API, or the action’s own (`messages`, `reactions`…). *your app → Slaiky · `chat.postMessage`* ```json { "channel": "#general", "text": "Deploy finished." } ``` *Slaiky → your app · `429`* ```json { "ok": false, "error": { "code": "rate_limited", "message": "Too many attempts. Try again in 7 seconds.", "retryAfter": 7, "scope": "botApi" } } ``` ### Back off Wait `Retry-After` seconds, then send the same call again. Limits count in fixed windows, so trying sooner only gets another `429`. Give up after a few tries, and spread steady work out instead of sending it in bursts. *Node.js · your app → Slaiky · `call.mjs`* ```js // Call a Web API method; on 429, wait as long as Slaiky says, then try again. Node 22+, no packages. const API = process.env.SLAIKY_API ?? 'https://app.slaiky.xyz/api/methods'; async function call(method, body, tries = 3) { for (let attempt = 1; ; attempt++) { const res = await fetch(`${API}/${method}`, { method: 'POST', headers: { authorization: `Bearer ${process.env.SLAIKY_BOT_TOKEN}`, 'content-type': 'application/json' }, body: JSON.stringify(body), }); const answer = await res.json(); if (res.status !== 429 || attempt === tries) return answer; // Whole seconds, the same number as answer.error.retryAfter. await new Promise((done) => setTimeout(done, Number(res.headers.get('retry-after')) * 1000)); } } const answer = await call('chat.postMessage', { channel: process.env.SLAIKY_CHANNEL ?? '#general', text: 'Deploy finished.' }); console.log(JSON.stringify(answer)); if (!answer.ok) process.exit(1); ``` *Python · your app → Slaiky · `call.py`* ```python # Call a Web API method; on 429, wait as long as Slaiky says, then try again. Python 3, no packages. import json, os, time, urllib.error, urllib.request API = os.environ.get("SLAIKY_API", "https://app.slaiky.xyz/api/methods") TOKEN = os.environ["SLAIKY_BOT_TOKEN"] def call(method, body, tries=3): for attempt in range(1, tries + 1): req = urllib.request.Request( f"{API}/{method}", data=json.dumps(body).encode(), headers={"authorization": f"Bearer {TOKEN}", "content-type": "application/json"}, ) try: with urllib.request.urlopen(req) as res: return json.load(res) except urllib.error.HTTPError as err: # a refusal still answers JSON if err.code != 429 or attempt == tries: return json.load(err) # Whole seconds, the same number as error.retryAfter. time.sleep(int(err.headers["retry-after"])) answer = call("chat.postMessage", {"channel": os.environ.get("SLAIKY_CHANNEL", "#general"), "text": "Deploy finished."}) print(json.dumps(answer)) if not answer["ok"]: raise SystemExit(f"{answer['error']['code']}: {answer['error']['message']}") ``` --- # Events > Every event an app can ask for, when Slaiky sends it, and the scope it needs. Source: https://slaiky.xyz/docs/reference/events Ask for events in the app’s settings or its manifest (`settings.event_subscriptions.bot_events`). An event goes out only when the app holds its scope. Over HTTP each one is a signed POST ([events guide](/docs/events)); over Socket Mode an `events_api` envelope ([guide](/docs/socket-mode)). Both carry the same body. | Event | Sent when | Needs | | --- | --- | --- | | `message.channels` | A message in a public channel the bot is in (not its own, not system lines). Edits and deletions too. | `channels:history` | | `message.groups` | The same, in a private channel the bot is in. | `groups:history` | | `message.im` | The same, in a direct message with the bot. | `im:history` | | `message.mpim` | The same, in a group DM the bot is in. | `mpim:history` | | `app_mention` | Someone mentions the bot where it is a member. | `app_mentions:read` | | `reaction_added` | A reaction is added to a message where the bot is. | `reactions:read` | | `reaction_removed` | A reaction is removed, where the bot is. | `reactions:read` | | `member_joined_channel` | Someone (the bot too) joins a channel the bot is in. | the conversation’s `:read` (`channels:read`, `groups:read`…) | | `member_left_channel` | Someone (the bot too) leaves a channel the bot is in. | the conversation’s `:read` (`channels:read`, `groups:read`…) | | `channel_created` | A public channel is made. | `channels:read` | | `channel_rename` | A channel is renamed: public ones to every app that may list channels, private ones to apps in them. | the conversation’s `:read` (`channels:read`, `groups:read`…) | | `channel_archive` | A channel is archived (same audience as renames). | the conversation’s `:read` (`channels:read`, `groups:read`…) | | `channel_unarchive` | A channel is brought back (same audience as renames). | the conversation’s `:read` (`channels:read`, `groups:read`…) | | `pin_added` | A message is pinned where the bot is. | `pins:read` | | `pin_removed` | A message is unpinned where the bot is. | `pins:read` | | `call_started` | A call starts in a conversation the bot is in: who started it and when. Never what is said. | `calls:read` | | `call_ended` | A call ends in a conversation the bot is in: when, and who was in it for how long. | `calls:read` | | `app_home_opened` | Someone opens the app’s Home tab. | none | | `app_uninstalled` | An install of the app is removed from a workspace. Always sent, subscribed or not. | none | ## The wrapper Every event comes in the same wrapper. `channelType` is `channel` (public), `group` (private), `im` or `mpim`. *Slaiky → your app · `event_callback`* ```json { "type": "event_callback", "eventId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "type": "app_mention", "message": { "id": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "@docsrecorder is the deploy green?", "meta": null, "files": [], "author": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "blocks": null, "pinned": false, "subtype": null, "editedAt": null, "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "createdAt": "2026-11-10T12:00:00.000Z", "reactions": [], "replyCount": 0, "replyUsers": [], "lastReplyAt": null, "alsoInChannel": false }, "threadId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "channelType": "channel" } } ``` ## Examples (recorded on a real server) ### `message` *Slaiky → your app* ```json { "type": "event_callback", "eventId": "7f3c0010-5a1e-4c2b-9d6f-1a2b3c4d5e09", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "type": "message", "message": { "id": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "@docsrecorder is the deploy green?", "meta": null, "files": [], "author": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "blocks": null, "pinned": false, "subtype": null, "editedAt": null, "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "createdAt": "2026-11-10T12:00:00.000Z", "reactions": [], "replyCount": 0, "replyUsers": [], "lastReplyAt": null, "alsoInChannel": false }, "threadId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "channelType": "channel" } } ``` ### `message_changed` *Slaiky → your app* ```json { "type": "event_callback", "eventId": "7f3c0011-5a1e-4c2b-9d6f-1a2b3c4d5e0a", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "type": "message", "message": { "id": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "@docsrecorder is the deploy green now?", "meta": null, "files": [], "author": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "blocks": null, "pinned": false, "subtype": null, "editedAt": "2026-11-10T12:00:01.000Z", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "createdAt": "2026-11-10T12:00:00.000Z", "reactions": [], "replyCount": 1, "replyUsers": [ { "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "look": null, "name": "Docs Recorder", "role": "member", "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "isBot": true, "title": "Records what Slaiky sends, for the developer docs", "handle": "docsrecorder", "status": null, "agentId": null, "timezone": null, "avatarUrl": null, "deactivated": false } ], "lastReplyAt": "2026-11-10T12:00:02.000Z", "alsoInChannel": false }, "subtype": "message_changed", "previous": { "body": "@docsrecorder is the deploy green?" }, "threadId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "channelType": "channel" } } ``` ### `message_deleted` *Slaiky → your app* ```json { "type": "event_callback", "eventId": "7f3c0013-5a1e-4c2b-9d6f-1a2b3c4d5e0c", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "type": "message", "subtype": "message_deleted", "threadId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "messageId": "7f3c0014-5a1e-4c2b-9d6f-1a2b3c4d5e0d", "channelType": "channel" } } ``` ### `reaction_added` *Slaiky → your app* ```json { "type": "event_callback", "eventId": "7f3c0012-5a1e-4c2b-9d6f-1a2b3c4d5e0b", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "item": { "type": "message", "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "messageId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06" }, "type": "reaction_added", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "reaction": "👍", "itemUserId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07" } } ``` ### `member_joined_channel` *Slaiky → your app* ```json { "type": "event_callback", "eventId": "7f3c0001-5a1e-4c2b-9d6f-1a2b3c4d5e00", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "type": "member_joined_channel", "userId": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "channelId": "7f3c0005-5a1e-4c2b-9d6f-1a2b3c4d5e04", "inviterId": null, "channelType": "channel" } } ``` ### `app_home_opened` *Slaiky → your app* ```json { "type": "event_callback", "eventId": "7f3c0015-5a1e-4c2b-9d6f-1a2b3c4d5e0e", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "tab": "home", "type": "app_home_opened", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "channelId": "7f3c0016-5a1e-4c2b-9d6f-1a2b3c4d5e0f" } } ``` --- # Interaction payloads > What Slaiky sends when someone runs a command, clicks, picks, uses a shortcut or submits a modal. Source: https://slaiky.xyz/docs/reference/payloads Commands and interactions come with who and where (`userId`, `user`, `channelId`), a `responseUrl` to answer later and, when a modal can open, a `triggerId` valid for 30 seconds ([guide](/docs/interactivity)). Over HTTP they are signed POSTs to the command’s URL or the interactivity URL; over Socket Mode, envelopes. ## A slash command (`slash_command`) Someone runs one of the app’s commands. Over HTTP it goes to the command’s URL; over Socket Mode it is a `slash_commands` envelope. *Slaiky → your app* ```json { "text": "shipped the export", "type": "command", "user": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "command": "/docsdemo", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "triggerId": "1731240000.trigger.docs", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "responseToken": "docs-response-token" } ``` ## A click or a pick (`block_actions`) Someone presses a button or picks an option in a message, a modal or the Home tab. *Slaiky → your app* ```json { "type": "block_actions", "user": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "value": "v42", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "actions": [ { "type": "button", "value": "v42", "actionId": "ship" } ], "message": { "id": "7f3c0018-5a1e-4c2b-9d6f-1a2b3c4d5e11", "body": "Ship it?", "meta": null, "files": [], "author": { "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "look": null, "name": "Docs Recorder", "role": "member", "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "isBot": true, "title": "Records what Slaiky sends, for the developer docs", "handle": "docsrecorder", "status": null, "agentId": null, "timezone": null, "avatarUrl": null, "deactivated": false }, "blocks": [ { "text": "Ship it?", "type": "section" }, { "type": "actions", "elements": [ { "text": "Ship", "type": "button", "style": "primary", "value": "v42", "actionId": "ship" } ] } ], "pinned": false, "subtype": null, "editedAt": null, "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "createdAt": "2026-11-10T12:00:03.000Z", "reactions": [], "replyCount": 0, "replyUsers": [], "lastReplyAt": null, "alsoInChannel": false }, "actionId": "ship", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "messageId": "7f3c0018-5a1e-4c2b-9d6f-1a2b3c4d5e11", "triggerId": "1731240000.trigger.docs", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "responseToken": "docs-response-token" } ``` ## A global shortcut (`shortcut`) Someone picks the app’s shortcut in the composer’s menu. *Slaiky → your app* ```json { "type": "shortcut", "user": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "triggerId": "1731240000.trigger.docs", "callbackId": "docs_global", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "responseToken": "docs-response-token" } ``` ## A message shortcut (`message_action`) Someone picks the app’s shortcut in a message’s menu. Carries the message. *Slaiky → your app* ```json { "type": "message_action", "user": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "message": { "id": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "@docsrecorder is the deploy green now?", "meta": null, "files": [], "author": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "blocks": null, "pinned": false, "subtype": null, "editedAt": "2026-11-10T12:00:01.000Z", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "createdAt": "2026-11-10T12:00:00.000Z", "reactions": [ { "count": 1, "emoji": "👍", "userIds": [ "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07" ] }, { "count": 1, "emoji": "👀", "userIds": [ "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03" ] } ], "replyCount": 1, "replyUsers": [ { "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "look": null, "name": "Docs Recorder", "role": "member", "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "isBot": true, "title": "Records what Slaiky sends, for the developer docs", "handle": "docsrecorder", "status": null, "agentId": null, "timezone": null, "avatarUrl": null, "deactivated": false } ], "lastReplyAt": "2026-11-10T12:00:02.000Z", "alsoInChannel": false }, "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "messageId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "triggerId": "1731240000.trigger.docs", "callbackId": "docs_message", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "responseToken": "docs-response-token" } ``` ## A modal submitted (`view_submission`) Someone presses the modal’s submit button. `view.state.values` holds every input by `blockId` and `actionId`. *Slaiky → your app* ```json { "type": "view_submission", "user": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "view": { "id": "7f3c0017-5a1e-4c2b-9d6f-1a2b3c4d5e10", "hash": "1731240000.docs", "type": "modal", "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "close": "Not now", "state": { "values": { "done": { "v": { "type": "plain_text_input", "value": "Shipped the export to CSV" } }, "mood": { "v": { "type": "static_select", "selectedOption": { "text": "Smooth", "value": "smooth" } } } } }, "title": "Daily update", "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 } ], "submit": "Post", "botUserId": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "callbackId": "daily", "previousId": null, "privateMetadata": null }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "triggerId": "1731240000.trigger.docs", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "responseToken": "docs-response-token" } ``` ## A modal closed (`view_closed`) Someone closes a modal that asked for it (`notifyOnClose`). *Slaiky → your app* ```json { "type": "view_closed", "user": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "view": { "id": "7f3c0019-5a1e-4c2b-9d6f-1a2b3c4d5e12", "hash": "1731240000.docs", "type": "modal", "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "close": "Not now", "title": "Daily update", "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 } ], "submit": "Post", "botUserId": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "callbackId": "closing", "previousId": null, "privateMetadata": null }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "userId": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "isCleared": false, "triggerId": "1731240000.trigger.docs", "responseUrl": "https://app.slaiky.xyz/api/apps/respond/docs-response-token", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "responseToken": "docs-response-token" } ``` --- # Socket Mode frames > The two frames of Socket Mode, field by field, and when the socket closes. Source: https://slaiky.xyz/docs/reference/socket-mode Every frame on the socket is JSON, `{ "t": type, "d": data }`. Slaiky sends `app.envelope`; your app sends `app.ack` ([guide](/docs/socket-mode)). ## `app.envelope` | Field | What | | --- | --- | | `envelopeId` | Id of this delivery. Acknowledge it with this id. | | `type` | `events_api` (an event), `slash_commands` (a command) or `interactive` (a click, a pick, a shortcut, a modal submission or close). | | `payload` | What happened: the event callback, the command or the interaction, the same body an HTTP app would get. | | `acceptsResponsePayload` | True for commands and interactions: the acknowledgement may carry the answer (`payload`). | | `retryAttempt` | 0 the first time; 1, 2… when it is sent again because no acknowledgement came. | *Slaiky → your app* ```json { "t": "app.envelope", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "type": "events_api", "payload": { "type": "event_callback", "eventId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05", "eventTime": 1794312000, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "event": { "type": "app_mention", "message": { "id": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "body": "@docsrecorder is the deploy green?", "meta": null, "files": [], "author": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "look": null, "name": "Alex Martins", "role": "owner", "appId": null, "isBot": false, "title": "Founder · Product", "handle": "alex", "status": null, "agentId": null, "timezone": "America/Sao_Paulo", "avatarUrl": null, "deactivated": false }, "blocks": null, "pinned": false, "subtype": null, "editedAt": null, "parentId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "createdAt": "2026-11-10T12:00:00.000Z", "reactions": [], "replyCount": 0, "replyUsers": [], "lastReplyAt": null, "alsoInChannel": false }, "threadId": null, "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "channelType": "channel" } }, "acceptsResponsePayload": false, "retryAttempt": 0 } } ``` ## `app.ack` Send it for every envelope, with its `envelopeId`, within 30 seconds. For a command or an interaction, `payload` may carry the answer: | Argument | Type | Required | What | | --- | --- | --- | --- | | `payload.text` | string | no | Up to 40,000 characters. | | `payload.blocks` | [blocks](/docs/reference/blocks) | no | Up to 50 items, may be `null`. | | `payload.responseType` | `"ephemeral"` / `"in_channel"` | no | | | `payload.replaceOriginal` | boolean | no | | | `payload.deleteOriginal` | boolean | no | | | `payload.responseAction` | `"errors"` / `"update"` / `"push"` / `"clear"` | no | | | `payload.errors` | map of string | no | | | `payload.view` | [view](/docs/reference/blocks#views) | no | | *your app → Slaiky* ```json { "t": "app.ack", "d": { "envelopeId": "7f3c0006-5a1e-4c2b-9d6f-1a2b3c4d5e05" } } ``` ## Timing | What | Value | | --- | --- | | The URL from `apps.connections.open` works once, for | 30 seconds | | An envelope without an ack is sent again after | 30 seconds | | …this many times while you are connected | 3 | | What you missed while away is sent when you connect, up to this old | 1 hour | | A command or a click waits this long for the ack to carry its answer | 3 seconds | ## When the socket closes Turning Socket Mode on or off, or changing the app’s scopes, closes its sockets with code `1012`: connect again (a new `apps.connections.open`) and you are on the new settings. Releases of Slaiky close sockets too. Always reconnect. --- # Web API methods > All 61 methods, what each one does and what it needs. Source: https://slaiky.xyz/docs/reference/methods `POST https://app.slaiky.xyz/api/methods/` with `Authorization: Bearer slk-bot-…` and a JSON body. Every answer is `{ "ok": true, … }` or `{ "ok": false, "error": { "code", "message" } }` ([guide](/docs/web-api)). The same catalog is the server’s OpenAPI: `https://app.slaiky.xyz/api/openapi.json`. ## Tokens | Method | What it does | Needs | | --- | --- | --- | | [`auth.test`](/docs/reference/methods/auth.test) | The bot user behind the token (checks that the token works), its app and the permissions it holds. | the bot token | ## Socket Mode | Method | What it does | Needs | | --- | --- | --- | | [`apps.connections.open`](/docs/reference/methods/apps.connections.open) | A one-time WebSocket URL for Socket Mode (valid a few seconds). | the bot token | ## Messages | Method | What it does | Needs | | --- | --- | --- | | [`chat.postMessage`](/docs/reference/methods/chat.postMessage) | Post a message (or a thread reply) as the bot, where it is a member. | `chat:write` | | [`chat.update`](/docs/reference/methods/chat.update) | Edit a message the bot posted. | `chat:write` | | [`chat.delete`](/docs/reference/methods/chat.delete) | Delete a message the bot posted (it disappears for everyone). | `chat:write` | | [`chat.postEphemeral`](/docs/reference/methods/chat.postEphemeral) | Show a message to one person only (not stored in history). | `chat:write` | | [`chat.getPermalink`](/docs/reference/methods/chat.getPermalink) | The link to a message, for people of the workspace. | the conversation's `:history` | ## Reactions | Method | What it does | Needs | | --- | --- | --- | | [`reactions.add`](/docs/reference/methods/reactions.add) | React to a message. | `reactions:write` | | [`reactions.remove`](/docs/reference/methods/reactions.remove) | Remove the bot’s reaction. | `reactions:write` | | [`reactions.get`](/docs/reference/methods/reactions.get) | The reactions on a message. | `reactions:read` | ## Pins | Method | What it does | Needs | | --- | --- | --- | | [`pins.add`](/docs/reference/methods/pins.add) | Pin a message in its conversation. | `pins:write` | | [`pins.remove`](/docs/reference/methods/pins.remove) | Unpin a message. | `pins:write` | | [`pins.list`](/docs/reference/methods/pins.list) | The pinned messages of a conversation. | `pins:read` | ## tabs | Method | What it does | Needs | | --- | --- | --- | | [`tabs.list`](/docs/reference/methods/tabs.list) | A conversation’s tabs (the row under its header): Messages first, then its canvas, files, pins, workflows and what people added (canvases, boards, lists, saved views, workflows, links, folders). | `tabs:read` | | [`tabs.add`](/docs/reference/methods/tabs.add) | Add a tab to a conversation the bot is in: an item by id (canvas, board, list, view, workflow; file inside a folder), a link or a folder. | `tabs:write` | | [`tabs.edit`](/docs/reference/methods/tabs.edit) | Rename, hide or show, move (after/before a tab, into or out of a folder) a tab, or change a link’s address. | `tabs:write` | | [`tabs.remove`](/docs/reference/methods/tabs.remove) | Remove a tab (a folder takes what’s in it along). | `tabs:write` | ## calls | Method | What it does | Needs | | --- | --- | --- | | [`calls.list`](/docs/reference/methods/calls.list) | Recent calls of a conversation the bot is in, newest first: when each started and ended, and who was in it for how long. | `calls:read` | | [`calls.info`](/docs/reference/methods/calls.info) | One call in a conversation the bot is in: when it started and ended, and who was in it for how long. | `calls:read` | ## Conversations | Method | What it does | Needs | | --- | --- | --- | | [`conversations.list`](/docs/reference/methods/conversations.list) | Conversations the bot is in, and the public channels it could join (with channels:read). | the bot token | | [`conversations.info`](/docs/reference/methods/conversations.info) | One conversation: name, topic, purpose, kind, people count. | the conversation's `:read` | | [`conversations.members`](/docs/reference/methods/conversations.members) | Who is in a conversation: people, and the apps apart. | the conversation's `:read` | | [`conversations.history`](/docs/reference/methods/conversations.history) | Messages of a conversation, newest page first (thread replies excluded unless also sent to the channel). | the conversation's `:history` | | [`conversations.replies`](/docs/reference/methods/conversations.replies) | A thread: the root message and its replies. | the conversation's `:history` | | [`conversations.join`](/docs/reference/methods/conversations.join) | Join a public channel. | `channels:join` | | [`conversations.leave`](/docs/reference/methods/conversations.leave) | Leave a channel (channels:join for a public one, groups:write for a private one). | `channels:join` or `groups:write` | | [`conversations.open`](/docs/reference/methods/conversations.open) | Open (or find) a DM or a group DM with up to 8 members. | `im:write` or `mpim:write` | | [`conversations.create`](/docs/reference/methods/conversations.create) | Make a channel (public with channels:manage, private with groups:write); the bot is in it. | `channels:manage` or `groups:write` | | [`conversations.invite`](/docs/reference/methods/conversations.invite) | Add people to a channel the bot is in. | the conversation's `channels:manage` / `groups:write` | | [`conversations.setTopic`](/docs/reference/methods/conversations.setTopic) | Set a channel’s topic. | the conversation's `channels:manage` / `groups:write` | | [`conversations.setPurpose`](/docs/reference/methods/conversations.setPurpose) | Set a channel’s purpose. | the conversation's `channels:manage` / `groups:write` | | [`conversations.rename`](/docs/reference/methods/conversations.rename) | Rename a channel the bot made. | the conversation's `channels:manage` / `groups:write` | | [`conversations.archive`](/docs/reference/methods/conversations.archive) | Archive a channel the bot made. | the conversation's `channels:manage` / `groups:write` | | [`conversations.unarchive`](/docs/reference/methods/conversations.unarchive) | Bring back a channel the bot archived. | the conversation's `channels:manage` / `groups:write` | ## Files | Method | What it does | Needs | | --- | --- | --- | | [`files.getUploadURL`](/docs/reference/methods/files.getUploadURL) | Where to send a file’s bytes: POST them (raw body) to `uploadUrl` within a few minutes, then call files.completeUpload. | `files:write` | | [`files.completeUpload`](/docs/reference/methods/files.completeUpload) | Finish uploads and share the files in a conversation, with an optional message. | `files:write` | | [`files.info`](/docs/reference/methods/files.info) | One file the bot can see. | `files:read` | | [`files.list`](/docs/reference/methods/files.list) | Files shared in a conversation the bot is in (newest first), or the bot’s own uploads. | `files:read` | ## People | Method | What it does | Needs | | --- | --- | --- | | [`users.list`](/docs/reference/methods/users.list) | Every member of the workspace (people and bots). | `users:read` | | [`users.info`](/docs/reference/methods/users.info) | One member, by id or @handle. | `users:read` | | [`users.lookupByEmail`](/docs/reference/methods/users.lookupByEmail) | The member with this e-mail address, if any (the address itself is never listed). | `users:read.email` | ## Workspace | Method | What it does | Needs | | --- | --- | --- | | [`team.info`](/docs/reference/methods/team.info) | The workspace: name, address, icon. | `team:read` | ## lists | Method | What it does | Needs | | --- | --- | --- | | [`lists.list`](/docs/reference/methods/lists.list) | Lists the bot can open (newest first): shared with it, with a channel it is in, or with everyone. | `lists:read` | | [`lists.info`](/docs/reference/methods/lists.info) | One list with its fields, views and every item (values by field key). | `lists:read` | | [`lists.create`](/docs/reference/methods/lists.create) | Make a list owned by the bot: given fields, views and items, or the default ones (Status, Assignee, Due date). | `lists:write` | | [`lists.items.add`](/docs/reference/methods/lists.items.add) | Add items to a list the bot can edit: a title and values by field key (select and status by option id, people by member id, dates YYYY-MM-DD). | `lists:write` | | [`lists.items.update`](/docs/reference/methods/lists.items.update) | Change items: only the values that change (null clears one), a title, archived, or a move (parentId, after, before). | `lists:write` | | [`lists.items.remove`](/docs/reference/methods/lists.items.remove) | Delete items for good (their subtasks too). | `lists:write` | | [`lists.comments.add`](/docs/reference/methods/lists.comments.add) | Comment on an item (Markdown; @handles of people who can open the list notify them). | `lists:write` | ## Commands | Method | What it does | Needs | | --- | --- | --- | | [`commands.respond`](/docs/reference/methods/commands.respond) | Answer a slash command or a click with its response token (the responseUrl does the same without a token). | the bot token | ## Modals and Home | Method | What it does | Needs | | --- | --- | --- | | [`views.open`](/docs/reference/methods/views.open) | Open a modal for the person who just acted (the triggerId of their command, click or shortcut). | the bot token | | [`views.push`](/docs/reference/methods/views.push) | Put a modal on top of the one the person has open (up to three). | the bot token | | [`views.update`](/docs/reference/methods/views.update) | Change an open modal (or a Home). | the bot token | | [`views.publish`](/docs/reference/methods/views.publish) | Draw a person’s Home tab of this app (the app has Home turned on). | the bot token | ## Manifests (configuration token) | Method | What it does | Needs | | --- | --- | --- | | [`apps.manifest.validate`](/docs/reference/methods/apps.manifest.validate) | Check a manifest. | a configuration token | | [`apps.manifest.create`](/docs/reference/methods/apps.manifest.create) | Make an app from a manifest, as the token’s member. | a configuration token | | [`apps.manifest.update`](/docs/reference/methods/apps.manifest.update) | Make an app what a manifest says. | a configuration token | | [`apps.manifest.export`](/docs/reference/methods/apps.manifest.export) | An app as a manifest. | a configuration token | | [`apps.manifest.delete`](/docs/reference/methods/apps.manifest.delete) | Remove an app (its bot leaves, its token stops). | a configuration token | ## Configuration tokens | Method | What it does | Needs | | --- | --- | --- | | [`tooling.tokens.rotate`](/docs/reference/methods/tooling.tokens.rotate) | Trade a configuration refresh token (slk-cfr-…, once) for a new token pair. | no token | ## Add to Slaiky | Method | What it does | Needs | | --- | --- | --- | | [`oauth.v2.access`](/docs/reference/methods/oauth.v2.access) | Add to Slaiky: trade the install code for that workspace’s bot token (client id and secret). | no token | --- # Blocks > The closed catalog of layout blocks a bot message, a modal or a Home tab is made of. Source: https://slaiky.xyz/docs/reference/blocks A message can carry up to 50 blocks next to its `text`. People who can’t see blocks (notifications, search, previews) read the `text`, so always send one. Blocks come from this catalog only; anything else is refused with the field that is wrong. ## Message blocks ### `header` | Argument | Type | Required | What | | --- | --- | --- | --- | | `text` | string | yes | 1–150 characters. | ### `section` | Argument | Type | Required | What | | --- | --- | --- | --- | | `text` | string | no | Up to 3,000 characters. | | `fields` | array of string | no | Up to 10 items. | | `accessory` | value | no | | ### `actions` | Argument | Type | Required | What | | --- | --- | --- | --- | | `elements` | array of value | yes | Up to 5 items. | ### `context` | Argument | Type | Required | What | | --- | --- | --- | --- | | `elements` | array of string | yes | Up to 10 items. | ### `divider` No arguments. ### `image` | Argument | Type | Required | What | | --- | --- | --- | --- | | `url` | URL | yes | Up to 3,000 characters. | | `alt` | string | no | Up to 2,000 characters. | ## Elements Buttons and menus go in an `actions` block or as a section’s `accessory`; input elements go in an `input` block (modals and Home only). ### `button` | Argument | Type | Required | What | | --- | --- | --- | --- | | `text` | string | yes | 1–75 characters. | | `actionId` | string | yes | 1–255 characters. | | `value` | string | no | Up to 2,000 characters. | | `style` | `"primary"` / `"danger"` | no | | | `url` | URL | no | Up to 3,000 characters. | ### `static_select` | Argument | Type | Required | What | | --- | --- | --- | --- | | `actionId` | string | yes | 1–255 characters. | | `options` | array of object | yes | Up to 100 items. | | `placeholder` | string | no | Up to 150 characters. | | `initialValue` | string | no | Up to 2,000 characters. | ### `plain_text_input` | Argument | Type | Required | What | | --- | --- | --- | --- | | `actionId` | string | yes | 1–255 characters. | | `placeholder` | string | no | Up to 150 characters. | | `initialValue` | string | no | Up to 3,000 characters. | | `multiline` | boolean | no | | | `minLength` | integer | no | 0–3,000. | | `maxLength` | integer | no | 1–3,000. | ### `checkboxes` | Argument | Type | Required | What | | --- | --- | --- | --- | | `actionId` | string | yes | 1–255 characters. | | `options` | array of object | yes | Up to 10 items. | | `initialValues` | array of string | no | Up to 10 items. | ### `datepicker` | Argument | Type | Required | What | | --- | --- | --- | --- | | `actionId` | string | yes | 1–255 characters. | | `placeholder` | string | no | Up to 150 characters. | | `initialDate` | string | no | | ## Views A modal or a Home tab: `views.open`, `views.push`, `views.update`, `views.publish`. Its blocks are the message blocks plus `input`. | Argument | Type | Required | What | | --- | --- | --- | --- | | `blocks` | [blocks](/docs/reference/blocks) | yes | Up to 50 items. | | `title` | string | no | 1–24 characters. | | `submit` | string | no | 1–24 characters. | | `close` | string | no | 1–24 characters. | | `callbackId` | string | no | Up to 255 characters. | | `privateMetadata` | string | no | Up to 3,000 characters. | | `notifyOnClose` | boolean | no | | ### `input` | Argument | Type | Required | What | | --- | --- | --- | --- | | `blockId` | string | yes | 1–255 characters. | | `label` | string | yes | 1–150 characters. | | `element` | value | yes | | | `hint` | string | no | Up to 300 characters. | | `optional` | boolean | no | | --- # Manifest > Every field of the JSON document that describes an app. Source: https://slaiky.xyz/docs/reference/manifest One JSON document describes an app. Create an app from it, export one to it, or update one with it: on the app’s settings page, or with `apps.manifest.*` and a configuration token ([manifests guide](/docs/manifests)). *your app → Slaiky · `manifest.json`* ```json { "_metadata": { "major_version": 1 }, "display_information": { "name": "Deploy bot", "description": "Posts deploys", "background_color": "#2c2d30" }, "features": { "bot_user": { "display_name": "deploybot", "always_online": true }, "app_home": { "home_tab_enabled": true, "messages_tab_enabled": true, "messages_tab_read_only_enabled": false }, "slash_commands": [{ "command": "/deploy", "description": "Deploy a branch", "usage_hint": "[branch]" }], "shortcuts": [{ "name": "Create ticket", "type": "message", "callback_id": "create_ticket", "description": "From this message" }] }, "oauth_config": { "scopes": { "bot": ["chat:write", "channels:history", "app_mentions:read", "commands"] } }, "settings": { "event_subscriptions": { "bot_events": ["app_mention", "message.channels"] }, "interactivity": { "is_enabled": true }, "socket_mode_enabled": true } } ``` ## Fields | Field | Type | Required | What | | --- | --- | --- | --- | | `_metadata` | object | no | | | `_metadata.major_version` | integer | no | 1–2. | | `_metadata.minor_version` | integer | no | 0–99. | | `display_information` | object | yes | | | `display_information.name` | string | yes | 2–40 characters. | | `display_information.description` | string | no | Up to 300 characters. | | `display_information.long_description` | string | no | Up to 4,000 characters. | | `display_information.background_color` | string | no | | | `features` | object | no | | | `features.bot_user` | object | no | | | `features.bot_user.display_name` | string | yes | 1–40 characters. | | `features.bot_user.always_online` | boolean | no | | | `features.app_home` | object | no | | | `features.app_home.home_tab_enabled` | boolean | no | | | `features.app_home.messages_tab_enabled` | boolean | no | | | `features.app_home.messages_tab_read_only_enabled` | boolean | no | | | `features.slash_commands[]` | array (Up to 50 items.) | no | Up to 50 items. | | `features.slash_commands[].command` | string | yes | Up to 33 characters. | | `features.slash_commands[].description` | string | no | Up to 200 characters. | | `features.slash_commands[].usage_hint` | string | no | Up to 100 characters. | | `features.slash_commands[].url` | URL | no | Up to 2,000 characters. | | `features.slash_commands[].should_escape` | boolean | no | | | `features.shortcuts[]` | array (Up to 10 items.) | no | Up to 10 items. | | `features.shortcuts[].name` | string | yes | 1–24 characters. | | `features.shortcuts[].type` | `"global"` / `"message"` | yes | | | `features.shortcuts[].description` | string | no | Up to 150 characters. | | `features.shortcuts[].callback_id` | string | yes | 1–255 characters. | | `oauth_config` | object | no | | | `oauth_config.scopes` | object | no | | | `oauth_config.scopes.bot` | array of `"chat:write"` / `"chat:write.public"` / `"chat:write.customize"` / `"channels:read"` / `"channels:history"` / `"channels:join"` / `"channels:manage"` / `"groups:read"` / `"groups:history"` / `"groups:write"` / `"im:read"` / `"im:history"` / `"im:write"` / `"mpim:read"` / `"mpim:history"` / `"mpim:write"` / `"users:read"` / `"users:read.email"` / `"reactions:read"` / `"reactions:write"` / `"pins:read"` / `"pins:write"` / `"files:read"` / `"files:write"` / `"canvases:read"` / `"canvases:write"` / `"tabs:read"` / `"tabs:write"` / `"lists:read"` / `"lists:write"` / `"calls:read"` / `"workflows:run"` / `"commands"` / `"app_mentions:read"` / `"incoming-webhook"` / `"team:read"` | no | Up to 36 items. | | `oauth_config.redirect_urls` | array of URL | no | Up to 20 items. | | `settings` | object | no | | | `settings.event_subscriptions` | object | no | | | `settings.event_subscriptions.request_url` | URL | no | Up to 2,000 characters. | | `settings.event_subscriptions.bot_events` | array of `"message.channels"` / `"message.groups"` / `"message.im"` / `"message.mpim"` / `"app_mention"` / `"reaction_added"` / `"reaction_removed"` / `"member_joined_channel"` / `"member_left_channel"` / `"channel_created"` / `"channel_rename"` / `"channel_archive"` / `"channel_unarchive"` / `"pin_added"` / `"pin_removed"` / `"call_started"` / `"call_ended"` / `"app_home_opened"` / `"app_uninstalled"` | no | Up to 19 items. | | `settings.interactivity` | object | no | | | `settings.interactivity.is_enabled` | boolean | yes | | | `settings.interactivity.request_url` | URL | no | Up to 2,000 characters. | | `settings.socket_mode_enabled` | boolean | no | | --- # Scopes > Every permission an app can hold, in plain words, and which ones a new app starts with. Source: https://slaiky.xyz/docs/reference/scopes A token without the scope a call needs gets `403` with `missing_scope` and `needed`: the scope to add (when several would do, the first of them). Reading a conversation needs the history scope of its kind: `channels:history` (public), `groups:history` (private), `im:history` (DMs), `mpim:history` (group DMs). A bot only ever acts where it is a member. | Scope | Lets the app | New apps start with it | | --- | --- | --- | | `chat:write` | Post messages where it is | yes | | `chat:write.public` | Post in public channels without joining | no | | `chat:write.customize` | Post with a different name and picture | no | | `channels:read` | See public channels and who is in them | yes | | `channels:history` | Read messages in public channels | yes | | `channels:join` | Join and leave public channels | yes | | `channels:manage` | Make public channels and change them | no | | `groups:read` | See private channels it was added to | yes | | `groups:history` | Read messages in private channels it is in | yes | | `groups:write` | Make private channels and change them | no | | `im:read` | See its direct messages | yes | | `im:history` | Read its direct messages | yes | | `im:write` | Start direct messages with people | yes | | `mpim:read` | See group messages it is in | yes | | `mpim:history` | Read group messages it is in | yes | | `mpim:write` | Start group messages | no | | `users:read` | See people in the workspace | yes | | `users:read.email` | Find people by e-mail address | no | | `reactions:read` | See reactions | yes | | `reactions:write` | Add and remove reactions | yes | | `pins:read` | See pinned messages | yes | | `pins:write` | Pin and unpin messages | no | | `files:read` | See files in public channels and where it is | yes | | `files:write` | Upload and share files | yes | | `canvases:read` | Read canvases it can open | yes | | `canvases:write` | Make and edit canvases | yes | | `tabs:read` | See a conversation's tabs | no | | `tabs:write` | Add, change and remove a conversation's tabs | no | | `lists:read` | Read lists it can open | no | | `lists:write` | Make lists and change their items | no | | `calls:read` | See calls where it is: who was in them, for how long | no | | `workflows:run` | Start workflows | yes | | `commands` | Add slash commands and shortcuts | yes | | `app_mentions:read` | Hear when someone mentions it | yes | | `incoming-webhook` | Post through incoming webhooks | no | | `team:read` | See the workspace's name and address | no | --- # MCP tools > Every tool and resource of Slaiky’s MCP server, for AI clients and for bots. Source: https://slaiky.xyz/docs/reference/mcp Slaiky’s MCP server is `https://app.slaiky.xyz/api/mcp` (Streamable HTTP). People connect with OAuth from their AI client ([guide](/docs/mcp)); an app connects with its bot token (`Authorization: Bearer slk-bot-…`) and sees the tools its scopes allow. ## Tools (81) | Tool | What it does | Kind | A bot token needs | | --- | --- | --- | --- | | `search_messages` | Full-text search over the messages you can read (accent-insensitive, prefix matching). | reads | `channels:history`, `groups:history`, `im:history`, `mpim:history` | | `list_channels` | Lists the public channels of the workspace and the private channels you were added to, with member counts and purposes. | reads | `channels:read` | | `read_channel` | Reads the most recent messages of a channel, oldest first. | reads | | | `read_thread` | Reads a message and every reply in its thread, oldest first. | reads | | | `find_people` | Finds members of the workspace by name, @handle or job title; shows whether they are online, their time zone and whether they are a bot. | reads | `users:read` | | `post_message` | Posts a message as you in a channel (public, or private when you are a member). | changes (asks first) | `chat:write` | | `add_reaction` | Adds an emoji reaction (a unicode emoji such as "👍" or "✅") to a message, as you. | writes | `reactions:write` | | `list_canvases` | Lists the canvases (collaborative documents) you can open: title, whether you can edit, last edit and the first words. | reads | `canvases:read` | | `read_canvas` | Reads a canvas as Markdown (people as @handle, channels as #name). | reads | `canvases:read` | | `create_canvas` | Creates a canvas owned by you from Markdown or a template. | writes | `canvases:write` | | `update_canvas` | Writes Markdown into a canvas you may edit: append (default), prepend, or replace its whole content. | changes (asks first) | `canvases:write` | | `create_canvas_page` | Adds a page (a subpage) inside a canvas you can edit, from Markdown, and links it at the end of that canvas. | writes | `canvases:write` | | `find_lists` | Lists you can open (trackers, to-do lists): title, items, whether you can edit, {id:…}. | reads | `lists:read` | | `read_list` | A list’s fields (key, kind, options) and live items with values and {id:…}. | reads | `lists:read` | | `create_list` | Makes a new list for the person who asked (default fields: Status, Assignee, Due date). | writes | `lists:write` | | `add_list_items` | Adds items (title + values by field key, as people type them: option names, @handles, YYYY-MM-DD). | writes | `lists:write` | | `update_list_items` | Changes items by id: title, values by field key (only what changes; "" clears), archived. | writes | `lists:write` | | `comment_on_item` | Comments on an item as you (Markdown; @handles notify). | changes (asks first) | `lists:write` | | `find_templates` | First step whenever someone wants a channel set up for something (bug reports, requests, a project), even before create_channel: find the template, then apply_template. | reads | `tabs:read` | | `apply_template` | Adds a channel template to a channel, for the asker. | writes | `tabs:write` | | `save_channel_as_template` | Saves a channel's tabs (canvases, lists, workflows, agent role) as a template for the asker. | writes | `tabs:read` | | `reply_in_thread` | Replies in the thread of a message (pass any message of the thread), as you. | changes (asks first) | `chat:write` | | `send_direct_message` | Sends a direct message to one person of the workspace, as you (opens the conversation if there is none yet). | changes (asks first) | `chat:write`, `im:write` | | `search_files` | Finds files sent in conversations you can read, newest first: by name words, channel, type or sender (nothing given: the latest). | reads | `files:read`, `channels:history`, `groups:history`, `im:history`, `mpim:history` | | `share_message` | Shares a message, as a card, in a channel or a person’s DM, with an optional comment ("send this to #sales"). | changes (asks first) | `chat:write` | | `edit_message` | Replaces the text of a message you wrote (people see it marked as edited). | changes (asks first) | `chat:write` | | `delete_message` | Deletes a message you wrote, for everyone (the first message of a thread takes its replies with it). | changes (asks first) | `chat:write` | | `remove_link_preview` | Takes the preview card of a link off a message you wrote, for everyone (the link stays in the text). | changes (asks first) | `chat:write` | | `create_channel` | Creates a channel (public by default) with a name in lower case (letters, digits, dashes) and an optional purpose; the person who asked joins it with you. | writes | | | `add_to_channel` | Adds people (by @handle) to a channel you are in. | writes | | | `set_channel_topic` | Sets the topic and/or the purpose of a channel you are in (an empty text clears it). | writes | | | `find_workflows` | Lists the workspace’s workflows the person you work for can change or start: name, id, what starts it, whether it is published and on, how many steps. | reads | people only | | `read_workflow` | Reads one workflow the person may change: what starts it, its steps as JSON (the same shape save_workflow takes), whether it is published, what is still missing (issues) and its link in the builder. | reads | people only | | `publish_workflow` | Makes a workflow’s draft live (it starts running on its trigger). | changes (asks first) | people only | | `get_message` | Reads one message by id: where it is, who wrote it and when, its text and files, whether it was edited, its thread (the root, or how many replies it has) and its reactions. | reads | | | `get_person` | Shows one member of the workspace by @handle or id: name, title, role, status, time zone with their local time now, whether they are online and whether they are a bot. | reads | `users:read` | | `list_workflows` | Lists the published workflows you may start by link (the ones people start from a channel’s Workflows menu): id, name, description. | reads | `workflows:run` | | `run_workflow` | Starts a workflow from list_workflows, as you, optionally in a channel (its steps can then use that channel). | changes (asks first) | `workflows:run` | | `reply_as_agent` | Answers a message the person wrote to you in Slaiky (from the message.received event), as your own agent there, not as them: in the thread when the message was in one or in a channel, otherwise in your direct message with them. | changes (asks first) | people only | | `post_as_agent` | Writes a new message as your own agent in Slaiky, not as the person: by default in your direct message with them, to tell them something first (a task you finished, something that needs them); or in a channel your agent is in (channel), optionally in a thread there (threadId). | changes (asks first) | people only | | `upload_file` | Posts files in a conversation, as you, with an optional message: in a channel, in a thread (messageId: any message of it) or in a person’s DM. | changes (asks first) | `files:write`, `chat:write` | | `get_upload_url` | For a big file when you can run a command or make HTTP requests (curl, a script): gives a one-time address; POST the file’s bytes there within a few minutes, then pass its uploadId to upload_file (or reply_as_agent). | writes | `files:write` | | `download_file` | Gives a link that downloads the original of a file you can read (any type), for when you need the file itself on your side: to save it, open it with a program or convert it. | reads | `files:read` | | `list_my_conversations` | Lists the conversations you are in (channels, direct and group messages), most recent activity first, with how many new messages you have not read in each. | reads | `channels:read` | | `get_workspace` | Shows the workspace you act in: its name, slug and address, who you are there (@handle and role) and how many people, bots and channels it has. | reads | | | `get_app_link` | Gives the Slaiky address that opens a channel, a message (in its thread when it has one) or a canvas, for the person to click. | reads | | | `find_tools` | Searches Slaiky’s tool catalog by what you want to do (e.g. | reads | | | `list_channel_tabs` | The tabs under a channel’s header, in order, folders with what is in them: each with its kind, title, the item it opens and its {tab:…} id. | reads | `tabs:read` | | `add_channel_tab` | Adds a tab to a channel you are in: a canvas, board, list, saved list view or workflow (item: its id), a link (url) or a folder (title). | writes | `tabs:write` | | `update_channel_tab` | Renames a tab, changes its emoji or a link’s address, hides or shows it, or moves it (after or before another tab, into a folder, or back to the row with folder ""). | writes | `tabs:write` | | `remove_channel_tab` | Removes a tab from a channel (a folder takes what is in it along); the canvas, list or workflow it opened stays. | changes (asks first) | `tabs:write` | | `set_channel_tabs_policy` | Sets who may add, rename, move and remove the tabs of a channel’s row: everyone in it, or only its managers (its creator, owners and admins). | writes | `tabs:write` | | `rename_channel` | Gives a channel a new name (lower case, digits, dashes); everyone in it sees a note about it. | writes | | | `set_channel_visibility` | Turns a public channel private (only its members see it from then on; everyone else loses it) or a private one public (everyone in the workspace can then find it and read its whole history). | changes (asks first) | | | `archive_channel` | Archives a channel (nobody can post; it stays readable and searchable) or brings it back with archived: false. | changes (asks first) | | | `list_channel_members` | Who is in a channel or conversation you can read: each person’s name, @handle, title and id; apps (bots) apart. | reads | | | `remove_from_channel` | Removes a person from a channel (they can join a public one again). | changes (asks first) | | | `join_channel` | Joins a public channel (you then get its messages and can post there). | writes | `channels:join` | | `leave_channel` | Leaves a channel: you stop getting its messages (a private one only lets you back if someone adds you). | changes (asks first) | | | `update_list` | Changes a list’s title, emoji or description (only what you pass). | writes | `lists:write` | | `archive_list` | Archives a list (read-only for everyone, out of the lists people browse) or brings it back with archived: false. | changes (asks first) | `lists:write` | | `delete_list` | Deletes a list with its items, fields, views and comments, for everyone; its tabs go too. | changes (asks first) | `lists:write` | | `add_list_field` | Adds a field (a column) to a list you can edit: its name, kind and, for select, multi_select and status, its choices in order. | writes | `lists:write` | | `update_list_field` | Renames a field, sets whether it is required, moves it (after or before another field), or replaces its choices (the full list, in order: a choice whose name stays keeps its color and the items that have it; a choice left out is removed). | writes | `lists:write` | | `delete_list_field` | Deletes a field from a list and its value in every item, for everyone (the title field stays). | changes (asks first) | `lists:write` | | `read_list_views` | The saved views of a list (shared ones and your own): name, layout, filter, sort, grouping, hidden fields, which one it opens in, and {view:…}. | reads | `lists:read` | | `create_list_view` | Saves a view of a list: a layout (table, board or calendar) with a filter, sort, grouping and hidden fields. | writes | `lists:write` | | `update_list_view` | Changes a saved view of a list (only what you pass): its name, layout, filter, sort, grouping, hidden fields, whether it is shared, or makes it the one the list opens in. | writes | `lists:write` | | `delete_list_view` | Deletes a saved view of a list (its items stay; a list keeps at least one shared view); its tabs go too. | changes (asks first) | `lists:write` | | `read_item_comments` | The comments on a list item, oldest first: who wrote each, when, and what (Markdown). | reads | `lists:read` | | `list_canvas_pages` | The page tree of a canvas (or of the canvas a page is in): its top canvas and every page inside it, nested, each with {id:…} for read_canvas and update_canvas. | reads | `canvases:read` | | `rename_canvas` | Changes a canvas’s or a page’s title or emoji (only what you pass) when you may edit it. | writes | `canvases:write` | | `archive_canvas` | Archives a canvas with its pages (read-only for everyone) or brings it back with archived: false. | changes (asks first) | `canvases:write` | | `delete_canvas` | Deletes a canvas with every page inside it, or one page with the pages inside it, for everyone; tabs that opened them go too. | changes (asks first) | `canvases:write` | | `set_member_title` | Sets the title under a person’s name (e.g. | writes | people only | | `read_draft` | Your unsent draft in a conversation or thread (what the composer holds for you there, on every device): its text and attached files. | reads | people only | | `save_draft` | Writes your draft in a conversation or thread without sending it: the composer shows it there, on every device, for you to review and send. | changes (asks first) | people only | | `preview_template` | What adding a channel template (find_templates) to a channel would do, part by part, without changing anything: what would be added, added as a draft, become a tab, or can’t be added and why. | reads | `tabs:read` | | `delete_template` | Deletes a template you manage (one saved from a channel or imported; find_templates shows its id), for everyone it was shared with. | changes (asks first) | people only | | `save_workflow_draft` | Writes a whole workflow (the JSON read_workflow gives, changed) as a draft: a new one without workflowId, or the working copy of one you may change. | writes | people only | | `read_file` | Reads a file attached to a message you can read: the text of text files and documents (PDF, Word, spreadsheets, slides), what was said in an audio file, or a picture (shown when your app sees pictures), from any point. | reads | `files:read` | Every client gets all of them at `https://app.slaiky.xyz/api/mcp`. ChatGPT’s plugin gets the first 11 (the ones its review covered) until its next version; `https://app.slaiky.xyz/api/mcp?tools=full` gives it the rest. ## Resources | URI | What | | --- | --- | | `slaiky://workspace` | The workspaces you may act in and who you act as (a bot: its workspace and the bot). | | `slaiky://channels` | Channels you can read, with purpose and member count (a bot: the kinds whose `:read` permission its app holds). | | `slaiky://channels/{channelId}/messages` | The 50 most recent messages of a channel (thread replies excluded), oldest first (a bot: with the channel’s `:history` permission). | ## Inputs ### `search_messages` Full-text search over the messages you can read (accent-insensitive, prefix matching). Filters: in:#channel, from:@person, has:file, has:link. Returns up to 15 hits as lines "#channel · [time] Name (@handle): text {id:…}". | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | yes | Search terms and optional filters, e.g. "deploy in:#eng from:@marina". 1–500 characters. | ### `list_channels` Lists the public channels of the workspace and the private channels you were added to, with member counts and purposes. Start here to discover where conversations happen. No arguments. ### `read_channel` Reads the most recent messages of a channel, oldest first. Each line ends with {id:…} (and the reply count when the message has a thread); pass that id to read_thread or add_reaction. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `limit` | integer | no | How many messages, 1–50 (default 20). 1–50. | ### `read_thread` Reads a message and every reply in its thread, oldest first. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | ### `find_people` Finds members of the workspace by name, @handle or job title; shows whether they are online, their time zone and whether they are a bot. Empty query lists people. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Name, @handle or title fragment. Up to 80 characters. | ### `post_message` Posts a message as you in a channel (public, or private when you are a member). Markdown is supported: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Only post when the user asked you to; each call posts a new message (a retry posts it again). | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `text` | string | yes | Message text (Markdown). 1–8,000 characters. | ### `add_reaction` Adds an emoji reaction (a unicode emoji such as "👍" or "✅") to a message, as you. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | | `emoji` | string | yes | A unicode emoji. 1–32 characters. | ### `list_canvases` Lists the canvases (collaborative documents) you can open: title, whether you can edit, last edit and the first words. Optional query searches titles and text (accent-insensitive). Lines end with {id:…}. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Words to find in titles and text. Up to 500 characters. | ### `read_canvas` Reads a canvas as Markdown (people as @handle, channels as #name). Refer to it by id, exact title, or "#channel" for that channel’s canvas. Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (| a | b | with a |---| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | Canvas id, exact title, or "#channel". 1–200 characters. | ### `create_canvas` Creates a canvas owned by you from Markdown or a template. With "channel", shares it there as a card (the channel gets view or edit access). Only when the user asked for it. Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (| a | b | with a |---| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). | Argument | Type | Required | What | | --- | --- | --- | --- | | `title` | string | no | Title. Up to 120 characters. | | `markdown` | string | no | Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (\| a \| b \| with a \|---\| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). Up to 200,000 characters. | | `template` | `"meeting"` / `"brief"` / `"onboarding"` / `"retro"` | no | Start from a template instead of Markdown. | | `channel` | string | no | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `access` | `"view"` / `"edit"` | no | What the channel may do with it (default view). | | `message` | string | no | Message posted with the card. Up to 4,000 characters. | ### `create_canvas_page` Adds a page (a subpage) inside a canvas you can edit, from Markdown, and links it at the end of that canvas. The page has that canvas’s access. Only when the user asked for it. Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (| a | b | with a |---| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | The canvas (or page) the new page goes in: id, exact title, or "#channel". 1–200 characters. | | `title` | string | no | Title. Up to 120 characters. | | `markdown` | string | no | Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (\| a \| b \| with a \|---\| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). Up to 200,000 characters. | ### `update_canvas` Writes Markdown into a canvas you may edit: append (default), prepend, or replace its whole content. People who have it open see the edit live; earlier versions stay in its history. Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (| a | b | with a |---| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | Canvas id, exact title, or "#channel". 1–200 characters. | | `markdown` | string | yes | Markdown, as in messages: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Canvases also take tables (\| a \| b \| with a \|---\| row) and callouts (> [!NOTE], [!TIP], [!WARNING], [!CAUTION]). Up to 200,000 characters. | | `mode` | `"append"` / `"prepend"` / `"replace"` | no | Where it goes (default append). | ### `find_lists` Lists you can open (trackers, to-do lists): title, items, whether you can edit, {id:…}. When asked to add something to a tracker or list, find it here, then add_list_items; don’t ask which one first. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Words in the title. Up to 500 characters. | ### `read_list` A list’s fields (key, kind, options) and live items with values and {id:…}. Read it before writing items. filter rules use field keys; values are option ids, person ids or "me", YYYY-MM-DD or today. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `query` | string | no | Words in items. Up to 200 characters. | | `filter` | object | no | | | `limit` | integer | no | 1–500. | ### `create_list` Makes a new list for the person who asked (default fields: Status, Assignee, Due date). With channel: shared there and in its tabs. Only when asked for a new list, never to add to one. | Argument | Type | Required | What | | --- | --- | --- | --- | | `title` | string | yes | 1–120 characters. | | `description` | string | no | Up to 1,000 characters. | | `fields` | array of object | no | Up to 49 items. | | `channel` | string | no | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | ### `add_list_items` Adds items (title + values by field key, as people type them: option names, @handles, YYYY-MM-DD). Values that don’t fit are reported. When asked to put something in a list, do it. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `items` | array of object | yes | Up to 50 items. | ### `update_list_items` Changes items by id: title, values by field key (only what changes; "" clears), archived. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `items` | array of object | yes | Up to 50 items. | ### `comment_on_item` Comments on an item as you (Markdown; @handles notify). Only when asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `item` | id | yes | | | `text` | string | yes | 1–4,000 characters. | ### `find_templates` First step whenever someone wants a channel set up for something (bug reports, requests, a project), even before create_channel: find the template, then apply_template. Templates bring a guide, a tracker list, forms, workflows and an agent. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Words to match. Up to 500 characters. | | `kind` | `"channel"` / `"canvas"` / `"list"` | no | | | `channel` | string | no | Suggest for this channel. 1–80 characters. | | `template` | string | no | Template id: its parts. 1–80 characters. | ### `apply_template` Adds a channel template to a channel, for the asker. Only when asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `template` | string | yes | Template id. 1–80 characters. | | `parts` | array of string | no | Part keys. Up to 20 items. | | `blanks` | map of string | no | @handle, YYYY-MM-DD or text. | ### `save_channel_as_template` Saves a channel's tabs (canvases, lists, workflows, agent role) as a template for the asker. Only when asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `name` | string | yes | 1–60 characters. | | `description` | string | no | Up to 200 characters. | | `emoji` | string | no | Up to 16 characters. | | `visibility` | `"private"` / `"workspace"` | no | workspace: everyone can use it (admins). | | `includeItems` | boolean | no | Keep the lists' items. | ### `reply_in_thread` Replies in the thread of a message (pass any message of the thread), as you. With alsoSendToChannel, the reply also shows in the channel. Markdown is supported: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Only reply when the user asked you to; each call posts a new reply. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | | `text` | string | yes | Reply text (Markdown). 1–8,000 characters. | | `alsoSendToChannel` | boolean | no | Also show the reply in the channel (default false). | ### `send_direct_message` Sends a direct message to one person of the workspace, as you (opens the conversation if there is none yet). Markdown is supported: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Only send when the user asked you to; each call sends a new message. | Argument | Type | Required | What | | --- | --- | --- | --- | | `person` | string | yes | @handle or person id. 1–80 characters. | | `text` | string | yes | Message text (Markdown). 1–8,000 characters. | ### `search_files` Finds files sent in conversations you can read, newest first: by name words, channel, type or sender (nothing given: the latest). Lines end with {file:…} (for read_file, send_file, download_file) and the message {id:…}. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Words in the file name. Up to 200 characters. | | `channel` | string | no | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `type` | `"pdf"` / `"image"` / `"audio"` / `"video"` / `"document"` / `"spreadsheet"` / `"presentation"` / `"text"` / `"archive"` | no | | | `from` | string | no | @handle of who sent it. Up to 80 characters. | | `limit` | integer | no | 1–50 (default 20). 1–50. | ### `share_message` Shares a message, as a card, in a channel or a person’s DM, with an optional comment ("send this to #sales"). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | The message to share. | | `channel` | string | no | Where: a channel. 1–80 characters. | | `person` | string | no | Or a person (@handle): your DM with them. 1–80 characters. | | `text` | string | no | A comment (Markdown). Up to 4,000 characters. | ### `edit_message` Replaces the text of a message you wrote (people see it marked as edited). Markdown is supported: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Only your own messages, and only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | | `text` | string | yes | The new text (Markdown). 1–8,000 characters. | ### `delete_message` Deletes a message you wrote, for everyone (the first message of a thread takes its replies with it). Only your own messages, and only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | ### `remove_link_preview` Takes the preview card of a link off a message you wrote, for everyone (the link stays in the text). Without url, every preview of the message goes. Only your own messages, and only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | | `url` | string | no | The link whose preview goes, as written in the message. 1–2,000 characters. | ### `create_channel` Creates a channel (public by default) with a name in lower case (letters, digits, dashes) and an optional purpose; the person who asked joins it with you. Only when the user asked for it. | Argument | Type | Required | What | | --- | --- | --- | --- | | `name` | string | yes | Channel name, e.g. "launch-v2". 1–80 characters. | | `purpose` | string | no | What the channel is for. Up to 250 characters. | | `private` | boolean | no | Private channel (default false). | ### `add_to_channel` Adds people (by @handle) to a channel you are in. Only when the user asked for it. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `people` | array of string | yes | @handles of the people to add. Up to 50 items. | ### `set_channel_topic` Sets the topic and/or the purpose of a channel you are in (an empty text clears it). Everyone in the channel sees a short note about the change. Only when the user asked for it. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `topic` | string | no | New topic. Up to 250 characters. | | `purpose` | string | no | New purpose. Up to 250 characters. | ### `find_workflows` Lists the workspace’s workflows the person you work for can change or start: name, id, what starts it, whether it is published and on, how many steps. Optional query filters by name. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Words in the name or description. Up to 120 characters. | ### `read_workflow` Reads one workflow the person may change: what starts it, its steps as JSON (the same shape save_workflow takes), whether it is published, what is still missing (issues) and its link in the builder. Keys and passwords in web requests read as "[hidden]": keep them as they are when you save. | Argument | Type | Required | What | | --- | --- | --- | --- | | `workflowId` | id | yes | Workflow id from find_workflows. | ### `publish_workflow` Makes a workflow’s draft live (it starts running on its trigger). The person you work for says yes first. If something is missing, says what. | Argument | Type | Required | What | | --- | --- | --- | --- | | `workflowId` | id | yes | Workflow id. | ### `get_message` Reads one message by id: where it is, who wrote it and when, its text and files, whether it was edited, its thread (the root, or how many replies it has) and its reactions. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id, as shown in {id:…} by the read and search tools. | ### `get_person` Shows one member of the workspace by @handle or id: name, title, role, status, time zone with their local time now, whether they are online and whether they are a bot. Use find_people first when you only know part of a name. | Argument | Type | Required | What | | --- | --- | --- | --- | | `person` | string | yes | @handle or person id. 1–80 characters. | ### `list_workflows` Lists the published workflows you may start by link (the ones people start from a channel’s Workflows menu): id, name, description. No arguments. ### `run_workflow` Starts a workflow from list_workflows, as you, optionally in a channel (its steps can then use that channel). Returns the run status: done, running, waiting (a person must click or fill a form) or error. Its steps may post messages, create channels or call web addresses its author set up, so only run one when the user asked you to. | Argument | Type | Required | What | | --- | --- | --- | --- | | `workflowId` | id | yes | Workflow id from list_workflows. | | `channel` | string | no | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | ### `reply_as_agent` Answers a message the person wrote to you in Slaiky (from the message.received event), as your own agent there, not as them: in the thread when the message was in one or in a channel, otherwise in your direct message with them. Markdown is supported: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Attach files (a PDF, a picture, a sheet…) with files, each from text, base64, url or an uploadId from get_upload_url. Each call posts a new message. | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | The message_id of the message.received event (or any message of that conversation). | | `text` | string | no | Your answer (Markdown). Optional when you send files. Up to 8,000 characters. | | `files` | array of object | no | Files that go with the answer. Up to 10 items. | ### `post_as_agent` Writes a new message as your own agent in Slaiky, not as the person: by default in your direct message with them, to tell them something first (a task you finished, something that needs them); or in a channel your agent is in (channel), optionally in a thread there (threadId). The first call gives you your agent in Slaiky, named after your app (they can rename it). To answer a message they wrote to you, use reply_as_agent. Markdown is supported: **bold**, _italic_, ++underline++, ~~strike~~, `code`, ``` code blocks, > quotes, - and 1. lists, - [ ] tasks, # / ## / ### headings, --- dividers, [text](https://link), @handle, #channel, :emoji:. Attach files with files, each from text, base64, url or an uploadId from get_upload_url. Each call posts a new message. | Argument | Type | Required | What | | --- | --- | --- | --- | | `text` | string | no | What to say (Markdown). Optional when you send files. Up to 8,000 characters. | | `channel` | string | no | A channel your agent is in ("#name" or id). Leave empty for your direct message with the person. 1–80 characters. | | `threadId` | id | no | Post in the thread of this message (in that channel). | | `files` | array of object | no | Files that go with the message. Up to 10 items. | ### `upload_file` Posts files in a conversation, as you, with an optional message: in a channel, in a thread (messageId: any message of it) or in a person’s DM. Any kind of file: PDF, pictures, Word, spreadsheets, slides, audio, video, archives. Each file comes from exactly one of: text (a text file you write), base64 (the bytes of any file, up to a few MB), url (a public https address Slaiky downloads it from) or uploadId (a bigger file you sent through get_upload_url). Only when the user asked; each call posts a new message. | Argument | Type | Required | What | | --- | --- | --- | --- | | `files` | array of object | yes | The files, 1–10. Up to 10 items. | | `channel` | string | no | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `messageId` | id | no | Post in the thread of this message (any message of the thread). | | `person` | string | no | @handle or person id: post in your DM with them. 1–80 characters. | | `text` | string | no | A message that goes with them (Markdown). Up to 8,000 characters. | | `alsoSendToChannel` | boolean | no | In a thread: also show it in the channel (default false). | ### `get_upload_url` For a big file when you can run a command or make HTTP requests (curl, a script): gives a one-time address; POST the file’s bytes there within a few minutes, then pass its uploadId to upload_file (or reply_as_agent). Small files are simpler with upload_file’s text or base64. | Argument | Type | Required | What | | --- | --- | --- | --- | | `filename` | string | yes | The file name people see, with its extension. 1–200 characters. | | `length` | integer | yes | The file’s exact size in bytes. 1–10,737,418,240. | | `mime` | string | no | Its type, e.g. "application/pdf" (checked against the bytes). Up to 120 characters. | ### `download_file` Gives a link that downloads the original of a file you can read (any type), for when you need the file itself on your side: to save it, open it with a program or convert it. It works for a few minutes and anyone holding it can download the file, so use it yourself and don’t post it. To read a document or see a picture, read_file is enough. | Argument | Type | Required | What | | --- | --- | --- | --- | | `file` | id | yes | The file’s id ({file:…}). | ### `list_my_conversations` Lists the conversations you are in (channels, direct and group messages), most recent activity first, with how many new messages you have not read in each. Lines end with {channel:…}: pass that id where a tool takes a channel. | Argument | Type | Required | What | | --- | --- | --- | --- | | `limit` | integer | no | How many, 1–100 (default 30). 1–100. | ### `get_workspace` Shows the workspace you act in: its name, slug and address, who you are there (@handle and role) and how many people, bots and channels it has. No arguments. ### `get_app_link` Gives the Slaiky address that opens a channel, a message (in its thread when it has one) or a canvas, for the person to click. Only things you can see get a link. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | no | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `messageId` | id | no | Message id, as shown in {id:…} by the read and search tools. | | `canvasId` | id | no | Canvas id, as shown by list_canvases. | ### `find_tools` Searches Slaiky’s tool catalog by what you want to do (e.g. "send a direct message", "who is online") and returns the matching tools with what each needs: its name, what it does, its inputs and the permission (scope) your connection must grant. Use it when the tool you need is not listed. | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | yes | What you want to do, in a few words. 1–200 characters. | ### `list_channel_tabs` The tabs under a channel’s header, in order, folders with what is in them: each with its kind, title, the item it opens and its {tab:…} id. Says who may change the row. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | ### `add_channel_tab` Adds a tab to a channel you are in: a canvas, board, list, saved list view or workflow (item: its id), a link (url) or a folder (title). With folder, it goes inside that folder tab. A canvas or list the channel can’t open yet needs share (view or edit) to share it too. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `kind` | `"canvas"` / `"board"` / `"list"` / `"view"` / `"workflow"` / `"link"` / `"folder"` | yes | | | `item` | id | no | For canvas, board, list, view, workflow: the item’s id (list_canvases, find_lists, read_list_views, find_workflows). | | `url` | string | no | For link: the https address. Up to 2,000 characters. | | `title` | string | no | The tab’s name (a folder needs one). Up to 80 characters. | | `emoji` | string | no | Up to 16 characters. | | `folder` | id | no | Inside this folder (its tab id). | | `after` | string | no | Put it right after this tab (its id; "messages": first). Up to 60 characters. | | `before` | string | no | Or right before this tab (its id). Up to 60 characters. | | `share` | `"view"` / `"edit"` | no | Also share the canvas or list with the channel. | ### `update_channel_tab` Renames a tab, changes its emoji or a link’s address, hides or shows it, or moves it (after or before another tab, into a folder, or back to the row with folder ""). Only what you pass changes. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `tab` | string | yes | Tab id ({tab:…} from list_channel_tabs; built-in tabs are system:canvas, system:files, system:pins, system:workflows). 1–60 characters. | | `title` | string | no | New name ("" goes back to the item’s own name). Up to 80 characters. | | `emoji` | string | no | Up to 16 characters. | | `url` | string | no | A link tab’s new address. Up to 2,000 characters. | | `hidden` | boolean | no | Hide (true) or show (false) it. | | `folder` | string | no | Move it into this folder (its tab id); "" moves it back to the row. Up to 60 characters. | | `after` | string | no | Put it right after this tab (its id; "messages": first). Up to 60 characters. | | `before` | string | no | Or right before this tab (its id). Up to 60 characters. | ### `remove_channel_tab` Removes a tab from a channel (a folder takes what is in it along); the canvas, list or workflow it opened stays. Built-in tabs can only be hidden (update_channel_tab with hidden). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `tab` | string | yes | Tab id ({tab:…} from list_channel_tabs; built-in tabs are system:canvas, system:files, system:pins, system:workflows). 1–60 characters. | ### `set_channel_tabs_policy` Sets who may add, rename, move and remove the tabs of a channel’s row: everyone in it, or only its managers (its creator, owners and admins). Only managers decide. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `policy` | `"everyone"` / `"managers"` | yes | | ### `rename_channel` Gives a channel a new name (lower case, digits, dashes); everyone in it sees a note about it. Its managers only (its creator, owners and admins). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `name` | string | yes | The new name, e.g. "launch-v2". 1–80 characters. | ### `set_channel_visibility` Turns a public channel private (only its members see it from then on; everyone else loses it) or a private one public (everyone in the workspace can then find it and read its whole history). Its managers only (its creator, owners and admins); the general channel stays public. Everyone in it sees a note about it. Only when the user asked for exactly this. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `private` | boolean | yes | true makes it private, false makes it public. | ### `archive_channel` Archives a channel (nobody can post; it stays readable and searchable) or brings it back with archived: false. Its managers only; the general channel can’t be archived. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `archived` | boolean | no | false brings it back (default true). | ### `list_channel_members` Who is in a channel or conversation you can read: each person’s name, @handle, title and id; apps (bots) apart. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | ### `remove_from_channel` Removes a person from a channel (they can join a public one again). Its managers only. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `person` | string | yes | @handle or person id. 1–80 characters. | ### `join_channel` Joins a public channel (you then get its messages and can post there). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | ### `leave_channel` Leaves a channel: you stop getting its messages (a private one only lets you back if someone adds you). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | ### `update_list` Changes a list’s title, emoji or description (only what you pass). Its items stay as they are. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `title` | string | no | Up to 120 characters. | | `emoji` | string | no | "" removes it. Up to 16 characters. | | `description` | string | no | Up to 1,000 characters. | ### `archive_list` Archives a list (read-only for everyone, out of the lists people browse) or brings it back with archived: false. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `archived` | boolean | no | false brings it back (default true). | ### `delete_list` Deletes a list with its items, fields, views and comments, for everyone; its tabs go too. Only its managers. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | ### `add_list_field` Adds a field (a column) to a list you can edit: its name, kind and, for select, multi_select and status, its choices in order. At the end unless after or before another field. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `name` | string | yes | 1–60 characters. | | `kind` | `"text"` / `"long_text"` / `"number"` / `"select"` / `"multi_select"` / `"status"` / `"person"` / `"date"` / `"checkbox"` / `"url"` / `"email"` / `"channel"` / `"message"` / `"file"` / `"created_by"` / `"created_at"` / `"updated_at"` | yes | | | `options` | array of string | no | Choices, in order (select, multi_select, status). Up to 100 items. | | `multiple` | boolean | no | person: several people. | | `required` | boolean | no | | | `after` | string | no | Field key (read_list), id or exact name. 1–60 characters. | | `before` | string | no | Field key (read_list), id or exact name. 1–60 characters. | ### `update_list_field` Renames a field, sets whether it is required, moves it (after or before another field), or replaces its choices (the full list, in order: a choice whose name stays keeps its color and the items that have it; a choice left out is removed). | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `field` | string | yes | Field key (read_list), id or exact name. 1–60 characters. | | `name` | string | no | 1–60 characters. | | `options` | array of string | no | Every choice, in order (select, multi_select, status). Up to 100 items. | | `required` | boolean | no | | | `after` | string | no | Field key (read_list), id or exact name. 1–60 characters. | | `before` | string | no | Field key (read_list), id or exact name. 1–60 characters. | ### `delete_list_field` Deletes a field from a list and its value in every item, for everyone (the title field stays). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `field` | string | yes | Field key (read_list), id or exact name. 1–60 characters. | ### `read_list_views` The saved views of a list (shared ones and your own): name, layout, filter, sort, grouping, hidden fields, which one it opens in, and {view:…}. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | ### `create_list_view` Saves a view of a list: a layout (table, board or calendar) with a filter, sort, grouping and hidden fields. Shared with everyone who opens the list unless shared is false. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `name` | string | yes | 1–60 characters. | | `layout` | `"table"` / `"board"` / `"calendar"` | yes | table, board (grouped columns) or calendar. | | `filter` | object | no | Which items it shows: { match: "all"\|"any", rules: [{ field: , op, value }] } (as in read_list). | | `sort` | array of object | no | [{ field: , dir: "asc"\|"desc" }]. Up to 3 items. | | `groupBy` | string | no | A field key to group by (a board groups by it); "" for none. Up to 60 characters. | | `hiddenFields` | array of string | no | Field keys it hides. Up to 50 items. | | `shared` | boolean | no | false: only you see it. | | `default` | boolean | no | Make it the view the list opens in. | ### `update_list_view` Changes a saved view of a list (only what you pass): its name, layout, filter, sort, grouping, hidden fields, whether it is shared, or makes it the one the list opens in. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `view` | [view](/docs/reference/blocks#views) | yes | View id ({view:…} from read_list_views) or exact name. 1–60 characters. | | `name` | string | no | 1–60 characters. | | `layout` | `"table"` / `"board"` / `"calendar"` | no | table, board (grouped columns) or calendar. | | `filter` | object | no | Which items it shows: { match: "all"\|"any", rules: [{ field: , op, value }] } (as in read_list). | | `sort` | array of object | no | [{ field: , dir: "asc"\|"desc" }]. Up to 3 items. | | `groupBy` | string | no | A field key to group by (a board groups by it); "" for none. Up to 60 characters. | | `hiddenFields` | array of string | no | Field keys it hides. Up to 50 items. | | `shared` | boolean | no | false: only you see it. | | `default` | boolean | no | Make it the view the list opens in. | ### `delete_list_view` Deletes a saved view of a list (its items stay; a list keeps at least one shared view); its tabs go too. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `view` | [view](/docs/reference/blocks#views) | yes | View id ({view:…} from read_list_views) or exact name. 1–60 characters. | ### `read_item_comments` The comments on a list item, oldest first: who wrote each, when, and what (Markdown). | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | string | yes | List id or exact title. 1–200 characters. | | `item` | id | yes | The item id from read_list. | ### `list_canvas_pages` The page tree of a canvas (or of the canvas a page is in): its top canvas and every page inside it, nested, each with {id:…} for read_canvas and update_canvas. | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | Canvas id, exact title, or "#channel". 1–200 characters. | ### `rename_canvas` Changes a canvas’s or a page’s title or emoji (only what you pass) when you may edit it. Its content stays. | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | Canvas id, exact title, or "#channel". 1–200 characters. | | `title` | string | no | Up to 120 characters. | | `emoji` | string | no | "" removes it. Up to 16 characters. | ### `archive_canvas` Archives a canvas with its pages (read-only for everyone) or brings it back with archived: false. Only its managers (its owner, admins). Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | Canvas id, exact title, or "#channel". 1–200 characters. | | `archived` | boolean | no | false brings it back (default true). | ### `delete_canvas` Deletes a canvas with every page inside it, or one page with the pages inside it, for everyone; tabs that opened them go too. Its managers, or the author of a page. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `canvas` | string | yes | Canvas id, exact title, or "#channel". 1–200 characters. | ### `set_member_title` Sets the title under a person’s name (e.g. "Designer"; "" clears it), and with locked, whether only admins may change it from then on. Owners and admins only; an admin’s title only by the owner. | Argument | Type | Required | What | | --- | --- | --- | --- | | `person` | string | yes | @handle or person id. 1–80 characters. | | `title` | string | yes | The title ("" clears it). Up to 80 characters. | | `locked` | boolean | no | true: only admins change it from now on; false: they can again. | ### `read_draft` Your unsent draft in a conversation or thread (what the composer holds for you there, on every device): its text and attached files. Empty when there is none. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `messageId` | id | no | For a thread’s draft: any message of the thread. | ### `save_draft` Writes your draft in a conversation or thread without sending it: the composer shows it there, on every device, for you to review and send. It replaces the draft there; empty text (and no files) removes it. fileIds: files you uploaded and haven’t sent (left out: the draft keeps its files). | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `text` | string | yes | The draft (Markdown). Up to 40,000 characters. | | `messageId` | id | no | For a thread’s draft: any message of the thread. | | `fileIds` | array of id | no | Up to 10 items. | ### `preview_template` What adding a channel template (find_templates) to a channel would do, part by part, without changing anything: what would be added, added as a draft, become a tab, or can’t be added and why. Then apply_template. | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel name with or without "#" (e.g. "#general"), or the channel id. 1–80 characters. | | `template` | string | yes | Template id. 1–80 characters. | | `parts` | array of string | no | Part keys (left out: the ones on by default). Up to 20 items. | ### `delete_template` Deletes a template you manage (one saved from a channel or imported; find_templates shows its id), for everyone it was shared with. Channels it was added to keep what it made. Only when the user asked. | Argument | Type | Required | What | | --- | --- | --- | --- | | `template` | id | yes | Template id. | ### `save_workflow_draft` Writes a whole workflow (the JSON read_workflow gives, changed) as a draft: a new one without workflowId, or the working copy of one you may change. Says what is still missing. A published workflow keeps running as it was until publish_workflow. | Argument | Type | Required | What | | --- | --- | --- | --- | | `workflow` | string | yes | The whole workflow as JSON text: name, trigger, steps… as read_workflow returns it. 2–1,000,000 characters. | | `workflowId` | id | no | The workflow to change; leave out to create one. | ### `read_file` Reads a file attached to a message you can read: the text of text files and documents (PDF, Word, spreadsheets, slides), what was said in an audio file, or a picture (shown when your app sees pictures), from any point. Use it for the rest of a long attachment that was cut ("truncated") or for a file from earlier in the conversation. file: the id on the or shown as {file:…}; offset: the character to start from (as the previous call or the cut note says). | Argument | Type | Required | What | | --- | --- | --- | --- | | `file` | id | yes | The file’s id ({file:…} or ). | | `offset` | integer | no | Character to start from (0: the start). 0–1,000,000,000. | --- # auth.test > The bot user behind the token (checks that the token works), its app and the permissions it holds. Source: https://slaiky.xyz/docs/reference/methods/auth.test `POST https://app.slaiky.xyz/api/methods/auth.test` · needs the bot token ## Arguments No arguments. ## Answer `{ "ok": true, … }` with: bot: User, appId: string, workspaceId: string, scopes: string[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/auth.test \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "bot": { "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "handle": "docsrecorder", "name": "Docs Recorder", "title": "Records what Slaiky sends, for the developer docs", "avatarUrl": null, "timezone": null, "role": "member", "status": null, "isBot": true, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "agentId": null, "look": null, "deactivated": false }, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "workspaceId": "7f3c0003-5a1e-4c2b-9d6f-1a2b3c4d5e02", "scopes": [ "chat:write", "channels:read", "channels:history", "channels:join", "app_mentions:read", "commands", "users:read", "im:write", "im:read", "im:history", "reactions:read", "reactions:write", "files:write" ] } ``` --- # apps.connections.open > A one-time WebSocket URL for Socket Mode (valid a few seconds). Source: https://slaiky.xyz/docs/reference/methods/apps.connections.open Connect to it, then acknowledge each envelope with `{ "t": "app.ack", "d": { "envelopeId" } }`. `POST https://app.slaiky.xyz/api/methods/apps.connections.open` · needs the bot token ## Arguments No arguments. ## Answer `{ "ok": true, … }` with: url: string. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.connections.open \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "url": "wss://app.slaiky.xyz/ws?ticket=docs-ticket" } ``` --- # chat.postMessage > Post a message (or a thread reply) as the bot, where it is a member. Source: https://slaiky.xyz/docs/reference/methods/chat.postMessage Public channels are joined on first use with channels:join (or posted to as is with chat:write.public). `POST https://app.slaiky.xyz/api/methods/chat.postMessage` · needs `chat:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `text` | string | no | Message text (Markdown). May be empty when blocks are sent. Up to 40,000 characters. | | `blocks` | [blocks](/docs/reference/blocks) | no | Layout blocks from the closed catalog (header, section, context, actions with buttons and selects, divider, image). Up to 50 items, may be `null`. | | `threadId` | id | no | Reply in the thread of this message. | | `alsoInChannel` | boolean | no | Thread reply also shown in the channel. | ## Answer `{ "ok": true, … }` with: message: Message. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/chat.postMessage \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08","threadId":"7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06","text":"Deploy is green."}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "message": { "id": "7f3c0021-5a1e-4c2b-9d6f-1a2b3c4d5e14", "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "parentId": "7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06", "author": { "id": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "handle": "docsrecorder", "name": "Docs Recorder", "title": "Records what Slaiky sends, for the developer docs", "avatarUrl": null, "timezone": null, "role": "member", "status": null, "isBot": true, "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "agentId": null, "look": null, "deactivated": false }, "body": "Deploy is green.", "blocks": null, "files": [], "createdAt": "2026-11-10T12:00:02.000Z", "editedAt": null, "replyCount": 0, "lastReplyAt": null, "replyUsers": [], "reactions": [], "pinned": false, "alsoInChannel": false, "subtype": null, "meta": null } } ``` --- # chat.update > Edit a message the bot posted. Source: https://slaiky.xyz/docs/reference/methods/chat.update `POST https://app.slaiky.xyz/api/methods/chat.update` · needs `chat:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | | `text` | string | no | Up to 40,000 characters. | | `blocks` | [blocks](/docs/reference/blocks) | no | Layout blocks from the closed catalog (header, section, context, actions with buttons and selects, divider, image). Up to 50 items, may be `null`. | ## Answer `{ "ok": true, … }` with: message: Message. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/chat.update \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # chat.delete > Delete a message the bot posted (it disappears for everyone). Source: https://slaiky.xyz/docs/reference/methods/chat.delete `POST https://app.slaiky.xyz/api/methods/chat.delete` · needs `chat:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | ## Answer `{ "ok": true, … }` with: (nothing). A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/chat.delete \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # chat.postEphemeral > Show a message to one person only (not stored in history). Source: https://slaiky.xyz/docs/reference/methods/chat.postEphemeral `POST https://app.slaiky.xyz/api/methods/chat.postEphemeral` · needs `chat:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `user` | id | yes | Member id. | | `text` | string | no | Message text (Markdown). May be empty when blocks are sent. Up to 40,000 characters. | | `blocks` | [blocks](/docs/reference/blocks) | no | Layout blocks from the closed catalog (header, section, context, actions with buttons and selects, divider, image). Up to 50 items, may be `null`. | | `threadId` | id | no | | ## Answer `{ "ok": true, … }` with: ephemeral: Ephemeral. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/chat.postEphemeral \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","user":""}' ``` --- # chat.getPermalink > The link to a message, for people of the workspace. Source: https://slaiky.xyz/docs/reference/methods/chat.getPermalink `POST https://app.slaiky.xyz/api/methods/chat.getPermalink` · needs the conversation's `:history` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | ## Answer `{ "ok": true, … }` with: permalink: string. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/chat.getPermalink \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # reactions.add > React to a message. Source: https://slaiky.xyz/docs/reference/methods/reactions.add `POST https://app.slaiky.xyz/api/methods/reactions.add` · needs `reactions:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | | `emoji` | string | yes | Unicode emoji or :custom_name:. 1–64 characters. | ## Answer `{ "ok": true, … }` with: reactions: Reaction[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/reactions.add \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":"7f3c0007-5a1e-4c2b-9d6f-1a2b3c4d5e06","emoji":"👀"}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "reactions": [ { "emoji": "👍", "count": 1, "userIds": [ "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07" ] }, { "emoji": "👀", "count": 1, "userIds": [ "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03" ] } ] } ``` --- # reactions.remove > Remove the bot’s reaction. Source: https://slaiky.xyz/docs/reference/methods/reactions.remove `POST https://app.slaiky.xyz/api/methods/reactions.remove` · needs `reactions:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | | `emoji` | string | yes | 1–64 characters. | ## Answer `{ "ok": true, … }` with: reactions: Reaction[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/reactions.remove \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":"","emoji":""}' ``` --- # reactions.get > The reactions on a message. Source: https://slaiky.xyz/docs/reference/methods/reactions.get `POST https://app.slaiky.xyz/api/methods/reactions.get` · needs `reactions:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | ## Answer `{ "ok": true, … }` with: reactions: Reaction[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/reactions.get \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # pins.add > Pin a message in its conversation. Source: https://slaiky.xyz/docs/reference/methods/pins.add `POST https://app.slaiky.xyz/api/methods/pins.add` · needs `pins:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | ## Answer `{ "ok": true, … }` with: (nothing). A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/pins.add \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # pins.remove > Unpin a message. Source: https://slaiky.xyz/docs/reference/methods/pins.remove `POST https://app.slaiky.xyz/api/methods/pins.remove` · needs `pins:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | ## Answer `{ "ok": true, … }` with: (nothing). A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/pins.remove \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # pins.list > The pinned messages of a conversation. Source: https://slaiky.xyz/docs/reference/methods/pins.list `POST https://app.slaiky.xyz/api/methods/pins.list` · needs `pins:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: messages: Message[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/pins.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # tabs.list > A conversation’s tabs (the row under its header): Messages first, then its canvas, files, pins, workflows and what people added (canvases, boards, lists, saved views, workflows, links, folders). Source: https://slaiky.xyz/docs/reference/methods/tabs.list `refs` says what each item is for the bot (absent: it can’t open it); `has` which built-in tabs have something to show. `POST https://app.slaiky.xyz/api/methods/tabs.list` · needs `tabs:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: tabs: ChannelTabs. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/tabs.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # tabs.add > Add a tab to a conversation the bot is in: an item by id (canvas, board, list, view, workflow; file inside a folder), a link or a folder. Source: https://slaiky.xyz/docs/reference/methods/tabs.add `after`/`before` place it next to a tab, `parentId` puts it in a folder. A canvas or list the conversation can’t open answers `needs_share`; send `share` (view or edit) to share it as well. `POST https://app.slaiky.xyz/api/methods/tabs.add` · needs `tabs:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `tab` | value | yes | | ## Answer `{ "ok": true, … }` with: tabs: ChannelTabs. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/tabs.add \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","tab":""}' ``` --- # tabs.edit > Rename, hide or show, move (after/before a tab, into or out of a folder) a tab, or change a link’s address. Source: https://slaiky.xyz/docs/reference/methods/tabs.edit Built-in tabs are `system:canvas`, `system:files`, `system:pins`, `system:workflows` until first changed. `POST https://app.slaiky.xyz/api/methods/tabs.edit` · needs `tabs:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `tab` | string | yes | Tab id (or system:). 1–60 characters. | | `title` | string | no | Up to 80 characters, may be `null`. | | `emoji` | string | no | Up to 16 characters, may be `null`. | | `url` | string | no | Up to 2,000 characters. | | `hidden` | boolean | no | | | `after` | string | no | Up to 60 characters. | | `before` | string | no | Up to 60 characters. | | `parentId` | id | no | May be `null`. | ## Answer `{ "ok": true, … }` with: tabs: ChannelTabs. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/tabs.edit \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","tab":""}' ``` --- # tabs.remove > Remove a tab (a folder takes what’s in it along). Source: https://slaiky.xyz/docs/reference/methods/tabs.remove Built-in tabs can only be hidden (tabs.edit with hidden). `POST https://app.slaiky.xyz/api/methods/tabs.remove` · needs `tabs:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `tab` | string | yes | Tab id. 1–60 characters. | ## Answer `{ "ok": true, … }` with: tabs: ChannelTabs. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/tabs.remove \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","tab":""}' ``` --- # calls.list > Recent calls of a conversation the bot is in, newest first: when each started and ended, and who was in it for how long. Source: https://slaiky.xyz/docs/reference/methods/calls.list `POST https://app.slaiky.xyz/api/methods/calls.list` · needs `calls:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `limit` | integer | no | 1–50, default `20`. | ## Answer `{ "ok": true, … }` with: calls: Call[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/calls.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # calls.info > One call in a conversation the bot is in: when it started and ended, and who was in it for how long. Source: https://slaiky.xyz/docs/reference/methods/calls.info `POST https://app.slaiky.xyz/api/methods/calls.info` · needs `calls:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `call` | id | yes | | ## Answer `{ "ok": true, … }` with: call: Call. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/calls.info \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"call":""}' ``` --- # conversations.list > Conversations the bot is in, and the public channels it could join (with channels:read). Source: https://slaiky.xyz/docs/reference/methods/conversations.list `POST https://app.slaiky.xyz/api/methods/conversations.list` · needs the bot token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `types` | array of `"channel"` / `"group"` / `"im"` / `"mpim"` | no | Kinds to list: channel (public), group (private), im (DM), mpim (group DM). Default: all the app may read. Up to 4 items. | | `excludeArchived` | boolean | no | Default `false`. | ## Answer `{ "ok": true, … }` with: member: MyChannel[], public: Channel[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` --- # conversations.info > One conversation: name, topic, purpose, kind, people count. Source: https://slaiky.xyz/docs/reference/methods/conversations.info `POST https://app.slaiky.xyz/api/methods/conversations.info` · needs the conversation's `:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.info \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # conversations.members > Who is in a conversation: people, and the apps apart. Source: https://slaiky.xyz/docs/reference/methods/conversations.members `POST https://app.slaiky.xyz/api/methods/conversations.members` · needs the conversation's `:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: members: string[], apps: string[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.members \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # conversations.history > Messages of a conversation, newest page first (thread replies excluded unless also sent to the channel). Source: https://slaiky.xyz/docs/reference/methods/conversations.history `POST https://app.slaiky.xyz/api/methods/conversations.history` · needs the conversation's `:history` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `limit` | integer | no | 1–200, default `50`. | | `before` | id | no | Page before this message id. | ## Answer `{ "ok": true, … }` with: messages: Message[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.history \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08","limit":1}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "messages": [ { "id": "7f3c0022-5a1e-4c2b-9d6f-1a2b3c4d5e15", "channelId": "7f3c0009-5a1e-4c2b-9d6f-1a2b3c4d5e08", "parentId": null, "author": { "id": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "handle": "alex", "name": "Alex Martins", "title": "Founder · Product", "avatarUrl": null, "timezone": "America/Sao_Paulo", "role": "owner", "status": null, "isBot": false, "appId": null, "agentId": null, "look": null, "deactivated": false }, "body": "Shipping the export today.", "blocks": null, "files": [], "createdAt": "2026-11-10T12:00:07.000Z", "editedAt": null, "replyCount": 0, "lastReplyAt": null, "replyUsers": [], "reactions": [], "pinned": false, "alsoInChannel": false, "subtype": null, "meta": null } ] } ``` --- # conversations.replies > A thread: the root message and its replies. Source: https://slaiky.xyz/docs/reference/methods/conversations.replies `POST https://app.slaiky.xyz/api/methods/conversations.replies` · needs the conversation's `:history` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `messageId` | id | yes | Message id. | ## Answer `{ "ok": true, … }` with: root: Message, replies: Message[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.replies \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"messageId":""}' ``` --- # conversations.join > Join a public channel. Source: https://slaiky.xyz/docs/reference/methods/conversations.join `POST https://app.slaiky.xyz/api/methods/conversations.join` · needs `channels:join` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: channel: MyChannel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.join \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"7f3c0005-5a1e-4c2b-9d6f-1a2b3c4d5e04"}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "channel": { "id": "7f3c0005-5a1e-4c2b-9d6f-1a2b3c4d5e04", "kind": "channel", "name": "docs-lab", "topic": "", "purpose": "", "isPrivate": false, "isGeneral": false, "createdBy": "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "createdAt": "2026-11-10T12:00:04.000Z", "archivedAt": null, "lastMessageAt": null, "memberCount": 1, "lastReadAt": "2026-11-10T12:00:05.000Z", "unread": 0, "mentions": 0, "countedAt": "2026-11-10T12:00:06.000Z", "muted": false, "starred": false, "sectionId": null, "notify": "default" } } ``` --- # conversations.leave > Leave a channel (channels:join for a public one, groups:write for a private one). Source: https://slaiky.xyz/docs/reference/methods/conversations.leave `POST https://app.slaiky.xyz/api/methods/conversations.leave` · needs `channels:join` or `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: (nothing). A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.leave \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # conversations.open > Open (or find) a DM or a group DM with up to 8 members. Source: https://slaiky.xyz/docs/reference/methods/conversations.open `POST https://app.slaiky.xyz/api/methods/conversations.open` · needs `im:write` or `mpim:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `users` | array of id | yes | Up to 8 items. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.open \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"users":["7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07"]}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "channel": { "id": "7f3c0016-5a1e-4c2b-9d6f-1a2b3c4d5e0f", "kind": "dm", "name": null, "topic": "", "purpose": "", "isPrivate": true, "isGeneral": false, "createdBy": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "createdAt": "2026-11-10T12:00:08.000Z", "archivedAt": null, "lastMessageAt": null, "memberCount": 1, "memberIds": [ "7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07", "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03" ], "lastReadAt": "2026-11-10T12:00:09.000Z", "unread": 0, "mentions": 0, "countedAt": "2026-11-10T12:00:10.000Z", "muted": false, "starred": false, "sectionId": null, "notify": "default" } } ``` --- # conversations.create > Make a channel (public with channels:manage, private with groups:write); the bot is in it. Source: https://slaiky.xyz/docs/reference/methods/conversations.create `POST https://app.slaiky.xyz/api/methods/conversations.create` · needs `channels:manage` or `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `name` | string | yes | 1–80 characters. | | `isPrivate` | boolean | no | Default `false`. | | `purpose` | string | no | Up to 250 characters. | ## Answer `{ "ok": true, … }` with: channel: MyChannel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.create \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"name":""}' ``` --- # conversations.invite > Add people to a channel the bot is in. Source: https://slaiky.xyz/docs/reference/methods/conversations.invite `POST https://app.slaiky.xyz/api/methods/conversations.invite` · needs the conversation's `channels:manage` / `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `users` | array of id | yes | Up to 500 items. | ## Answer `{ "ok": true, … }` with: (nothing). A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.invite \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","users":[]}' ``` --- # conversations.setTopic > Set a channel’s topic. Source: https://slaiky.xyz/docs/reference/methods/conversations.setTopic `POST https://app.slaiky.xyz/api/methods/conversations.setTopic` · needs the conversation's `channels:manage` / `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `topic` | string | yes | Up to 250 characters. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.setTopic \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","topic":""}' ``` --- # conversations.setPurpose > Set a channel’s purpose. Source: https://slaiky.xyz/docs/reference/methods/conversations.setPurpose `POST https://app.slaiky.xyz/api/methods/conversations.setPurpose` · needs the conversation's `channels:manage` / `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `purpose` | string | yes | Up to 250 characters. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.setPurpose \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","purpose":""}' ``` --- # conversations.rename > Rename a channel the bot made. Source: https://slaiky.xyz/docs/reference/methods/conversations.rename `POST https://app.slaiky.xyz/api/methods/conversations.rename` · needs the conversation's `channels:manage` / `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | | `name` | string | yes | 1–80 characters. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.rename \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general","name":""}' ``` --- # conversations.archive > Archive a channel the bot made. Source: https://slaiky.xyz/docs/reference/methods/conversations.archive `POST https://app.slaiky.xyz/api/methods/conversations.archive` · needs the conversation's `channels:manage` / `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.archive \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # conversations.unarchive > Bring back a channel the bot archived. Source: https://slaiky.xyz/docs/reference/methods/conversations.unarchive `POST https://app.slaiky.xyz/api/methods/conversations.unarchive` · needs the conversation's `channels:manage` / `groups:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | yes | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: channel: Channel. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/conversations.unarchive \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"channel":"#general"}' ``` --- # files.getUploadURL > Where to send a file’s bytes: POST them (raw body) to `uploadUrl` within a few minutes, then call files.completeUpload. Source: https://slaiky.xyz/docs/reference/methods/files.getUploadURL `POST https://app.slaiky.xyz/api/methods/files.getUploadURL` · needs `files:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `filename` | string | yes | 1–255 characters. | | `length` | integer | yes | Size in bytes. 1–5,368,709,120. | | `mime` | string | no | Up to 120 characters. | ## Answer `{ "ok": true, … }` with: uploadUrl: string, fileId: string. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/files.getUploadURL \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"filename":"","length":""}' ``` --- # files.completeUpload > Finish uploads and share the files in a conversation, with an optional message. Source: https://slaiky.xyz/docs/reference/methods/files.completeUpload `POST https://app.slaiky.xyz/api/methods/files.completeUpload` · needs `files:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `files` | array of object | yes | Up to 10 items. | | `channel` | string | no | Channel id, or "#name" for channels. 1–81 characters. | | `text` | string | no | Message text (Markdown). May be empty when blocks are sent. Up to 40,000 characters. | | `threadId` | id | no | | ## Answer `{ "ok": true, … }` with: files: File[], message: Message \| null. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/files.completeUpload \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"files":[]}' ``` --- # files.info > One file the bot can see. Source: https://slaiky.xyz/docs/reference/methods/files.info `POST https://app.slaiky.xyz/api/methods/files.info` · needs `files:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `file` | id | yes | | ## Answer `{ "ok": true, … }` with: file: File. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/files.info \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"file":""}' ``` --- # files.list > Files shared in a conversation the bot is in (newest first), or the bot’s own uploads. Source: https://slaiky.xyz/docs/reference/methods/files.list `POST https://app.slaiky.xyz/api/methods/files.list` · needs `files:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `channel` | string | no | Channel id, or "#name" for channels. 1–81 characters. | ## Answer `{ "ok": true, … }` with: files: File[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/files.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` --- # users.list > Every member of the workspace (people and bots). Source: https://slaiky.xyz/docs/reference/methods/users.list `POST https://app.slaiky.xyz/api/methods/users.list` · needs `users:read` ## Arguments No arguments. ## Answer `{ "ok": true, … }` with: users: User[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/users.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` --- # users.info > One member, by id or @handle. Source: https://slaiky.xyz/docs/reference/methods/users.info `POST https://app.slaiky.xyz/api/methods/users.info` · needs `users:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `user` | string | yes | Member id or @handle. 1–64 characters. | ## Answer `{ "ok": true, … }` with: user: User. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/users.info \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"user":""}' ``` --- # users.lookupByEmail > The member with this e-mail address, if any (the address itself is never listed). Source: https://slaiky.xyz/docs/reference/methods/users.lookupByEmail `POST https://app.slaiky.xyz/api/methods/users.lookupByEmail` · needs `users:read.email` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `email` | e-mail | yes | Up to 320 characters. | ## Answer `{ "ok": true, … }` with: user: User. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/users.lookupByEmail \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"email":""}' ``` --- # team.info > The workspace: name, address, icon. Source: https://slaiky.xyz/docs/reference/methods/team.info `POST https://app.slaiky.xyz/api/methods/team.info` · needs `team:read` ## Arguments No arguments. ## Answer `{ "ok": true, … }` with: team: { id, name, slug, url, icon }. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/team.info \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` --- # lists.list > Lists the bot can open (newest first): shared with it, with a channel it is in, or with everyone. Source: https://slaiky.xyz/docs/reference/methods/lists.list With query, by title and description (accent-insensitive). `POST https://app.slaiky.xyz/api/methods/lists.list` · needs `lists:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `query` | string | no | Up to 500 characters. | | `channel` | id | no | Only lists shared with this channel. | | `limit` | integer | no | 1–100, default `100`. | ## Answer `{ "ok": true, … }` with: lists: ListSummary[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.list \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` --- # lists.info > One list with its fields, views and every item (values by field key). Source: https://slaiky.xyz/docs/reference/methods/lists.info `POST https://app.slaiky.xyz/api/methods/lists.info` · needs `lists:read` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | id | yes | | ## Answer `{ "ok": true, … }` with: list: List, fields: ListField[], views: ListView[], items: ListItem[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.info \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"list":""}' ``` --- # lists.create > Make a list owned by the bot: given fields, views and items, or the default ones (Status, Assignee, Due date). Source: https://slaiky.xyz/docs/reference/methods/lists.create With channelId (a channel the bot is in), shared with it and added to its tabs. `POST https://app.slaiky.xyz/api/methods/lists.create` · needs `lists:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `title` | string | no | Up to 120 characters. | | `emoji` | string | no | Up to 16 characters, may be `null`. | | `description` | string | no | Up to 1,000 characters. | | `channelId` | id | no | | | `fields` | array of object | no | Up to 50 items. | | `views` | array of object | no | Up to 30 items. | | `items` | array of value | no | Up to 500 items. | | `shares` | array of object | no | Up to 100 items. | | `workspaceAccess` | `"none"` / `"view"` / `"edit"` | no | | ## Answer `{ "ok": true, … }` with: list: List, fields: ListField[], views: ListView[], items: ListItem[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.create \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{}' ``` --- # lists.items.add > Add items to a list the bot can edit: a title and values by field key (select and status by option id, people by member id, dates YYYY-MM-DD). Source: https://slaiky.xyz/docs/reference/methods/lists.items.add `POST https://app.slaiky.xyz/api/methods/lists.items.add` · needs `lists:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | id | yes | | | `items` | array of object | yes | Up to 500 items. | ## Answer `{ "ok": true, … }` with: items: ListItem[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.items.add \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"list":"","items":[]}' ``` --- # lists.items.update > Change items: only the values that change (null clears one), a title, archived, or a move (parentId, after, before). Source: https://slaiky.xyz/docs/reference/methods/lists.items.update The last write wins per field. `POST https://app.slaiky.xyz/api/methods/lists.items.update` · needs `lists:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | id | yes | | | `items` | array of object | yes | Up to 500 items. | ## Answer `{ "ok": true, … }` with: items: ListItem[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.items.update \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"list":"","items":[]}' ``` --- # lists.items.remove > Delete items for good (their subtasks too). Source: https://slaiky.xyz/docs/reference/methods/lists.items.remove `POST https://app.slaiky.xyz/api/methods/lists.items.remove` · needs `lists:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | id | yes | | | `items` | array of id | yes | Up to 500 items. | ## Answer `{ "ok": true, … }` with: removed: string[]. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.items.remove \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"list":"","items":[]}' ``` --- # lists.comments.add > Comment on an item (Markdown; @handles of people who can open the list notify them). Source: https://slaiky.xyz/docs/reference/methods/lists.comments.add `POST https://app.slaiky.xyz/api/methods/lists.comments.add` · needs `lists:write` ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `list` | id | yes | | | `item` | id | yes | | | `text` | string | yes | 1–4,000 characters. | ## Answer `{ "ok": true, … }` with: comment: ListComment. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/lists.comments.add \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"list":"","item":"","text":""}' ``` --- # commands.respond > Answer a slash command or a click with its response token (the responseUrl does the same without a token). Source: https://slaiky.xyz/docs/reference/methods/commands.respond `POST https://app.slaiky.xyz/api/methods/commands.respond` · needs the bot token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `responseToken` | string | yes | 1–200 characters. | | `text` | string | no | Message text (Markdown). May be empty when blocks are sent. Up to 40,000 characters. | | `blocks` | [blocks](/docs/reference/blocks) | no | Layout blocks from the closed catalog (header, section, context, actions with buttons and selects, divider, image). Up to 50 items, may be `null`. | | `responseType` | `"ephemeral"` / `"in_channel"` | no | Default `"ephemeral"`. | | `replaceOriginal` | boolean | no | Replace the message that had the clicked button. Default `false`. | | `deleteOriginal` | boolean | no | Delete the message that had the clicked button. Default `false`. | ## Answer `{ "ok": true, … }` with: message: Message \| ephemeral: Ephemeral. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/commands.respond \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"responseToken":""}' ``` --- # views.open > Open a modal for the person who just acted (the triggerId of their command, click or shortcut). Source: https://slaiky.xyz/docs/reference/methods/views.open `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](/docs/reference/blocks#views) | yes | | ## Answer `{ "ok": true, … }` with: view: View. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh 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"}]}}]}}' ``` *Slaiky → your app · `answer`* ```json { "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" } } ``` --- # views.push > Put a modal on top of the one the person has open (up to three). Source: https://slaiky.xyz/docs/reference/methods/views.push `POST https://app.slaiky.xyz/api/methods/views.push` · needs the bot token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `triggerId` | string | yes | 1–100 characters. | | `view` | [view](/docs/reference/blocks#views) | yes | | ## Answer `{ "ok": true, … }` with: view: View. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/views.push \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"triggerId":"","view":{}}' ``` --- # views.update > Change an open modal (or a Home). Source: https://slaiky.xyz/docs/reference/methods/views.update With `hash`, refused when it changed since. `POST https://app.slaiky.xyz/api/methods/views.update` · needs the bot token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `viewId` | id | yes | | | `view` | [view](/docs/reference/blocks#views) | yes | | | `hash` | string | no | Up to 64 characters. | ## Answer `{ "ok": true, … }` with: view: View. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/views.update \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"viewId":"","view":{}}' ``` --- # views.publish > Draw a person’s Home tab of this app (the app has Home turned on). Source: https://slaiky.xyz/docs/reference/methods/views.publish `POST https://app.slaiky.xyz/api/methods/views.publish` · needs the bot token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `userId` | id | yes | Member id. | | `view` | [view](/docs/reference/blocks#views) | yes | | | `hash` | string | no | Up to 64 characters. | ## Answer `{ "ok": true, … }` with: view: View. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example Recorded on a real server (ids replaced). *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/views.publish \ -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \ -H 'content-type: application/json' \ -d '{"userId":"7f3c0008-5a1e-4c2b-9d6f-1a2b3c4d5e07","view":{"type":"home","blocks":[{"type":"header","text":"Hi there"},{"type":"section","text":"Your week, at a glance."}]}}' ``` *Slaiky → your app · `answer`* ```json { "ok": true, "view": { "id": "7f3c0023-5a1e-4c2b-9d6f-1a2b3c4d5e16", "appId": "7f3c0002-5a1e-4c2b-9d6f-1a2b3c4d5e01", "botUserId": "7f3c0004-5a1e-4c2b-9d6f-1a2b3c4d5e03", "type": "home", "title": null, "submit": null, "close": null, "blocks": [ { "text": "Hi there", "type": "header" }, { "text": "Your week, at a glance.", "type": "section" } ], "callbackId": null, "previousId": null, "hash": "1731240000.docs" } } ``` --- # apps.manifest.validate > Check a manifest. Source: https://slaiky.xyz/docs/reference/methods/apps.manifest.validate A configuration token (slk-cfg-…). `POST https://app.slaiky.xyz/api/methods/apps.manifest.validate` · needs a configuration token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `manifest` | [manifest](/docs/reference/manifest) | yes | | ## Answer `{ "ok": true, … }` with: (nothing), or error invalid_manifest with fields per JSON pointer. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.validate \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d '{"manifest":{}}' ``` --- # apps.manifest.create > Make an app from a manifest, as the token’s member. Source: https://slaiky.xyz/docs/reference/methods/apps.manifest.create Returns its bot token (shown once) and signing secret (its managers can show it again on the app’s page). `POST https://app.slaiky.xyz/api/methods/apps.manifest.create` · needs a configuration token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `manifest` | [manifest](/docs/reference/manifest) | yes | | ## Answer `{ "ok": true, … }` with: appId: string, credentials: { botToken, signingSecret, clientId, clientSecret }. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.create \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d '{"manifest":{}}' ``` --- # apps.manifest.update > Make an app what a manifest says. Source: https://slaiky.xyz/docs/reference/methods/apps.manifest.update `POST https://app.slaiky.xyz/api/methods/apps.manifest.update` · needs a configuration token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `appId` | id | yes | App id. | | `manifest` | [manifest](/docs/reference/manifest) | yes | | ## Answer `{ "ok": true, … }` with: appId: string, permissionsUpdated: boolean. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.update \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d '{"appId":"","manifest":{}}' ``` --- # apps.manifest.export > An app as a manifest. Source: https://slaiky.xyz/docs/reference/methods/apps.manifest.export `POST https://app.slaiky.xyz/api/methods/apps.manifest.export` · needs a configuration token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `appId` | id | yes | App id. | ## Answer `{ "ok": true, … }` with: manifest: Manifest. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.export \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d '{"appId":""}' ``` --- # apps.manifest.delete > Remove an app (its bot leaves, its token stops). Source: https://slaiky.xyz/docs/reference/methods/apps.manifest.delete `POST https://app.slaiky.xyz/api/methods/apps.manifest.delete` · needs a configuration token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `appId` | id | yes | App id. | ## Answer `{ "ok": true, … }` with: (nothing). A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/apps.manifest.delete \ -H "authorization: Bearer $SLAIKY_CONFIG_TOKEN" \ -H 'content-type: application/json' \ -d '{"appId":""}' ``` --- # tooling.tokens.rotate > Trade a configuration refresh token (slk-cfr-…, once) for a new token pair. Source: https://slaiky.xyz/docs/reference/methods/tooling.tokens.rotate No Authorization header. `POST https://app.slaiky.xyz/api/methods/tooling.tokens.rotate` · needs no token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `refreshToken` | string | yes | 1–128 characters. | ## Answer `{ "ok": true, … }` with: token: string, refreshToken: string, expiresAt: string. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/tooling.tokens.rotate \ -H 'content-type: application/json' \ -d '{"refreshToken":""}' ``` --- # oauth.v2.access > Add to Slaiky: trade the install code for that workspace’s bot token (client id and secret). Source: https://slaiky.xyz/docs/reference/methods/oauth.v2.access No Authorization header. `POST https://app.slaiky.xyz/api/methods/oauth.v2.access` · needs no token ## Arguments | Argument | Type | Required | What | | --- | --- | --- | --- | | `clientId` | string | yes | 1–80 characters. | | `clientSecret` | string | yes | 1–200 characters. | | `code` | string | yes | 1–200 characters. | | `redirectUri` | URL | no | Up to 2,000 characters. | ## Answer `{ "ok": true, … }` with: accessToken: string, tokenType: "bot", scope: string, botUserId: string, appId: string, team: { id, name, slug }. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)). ## Example The required arguments, with placeholders in angle brackets. *you run* ```sh curl -s https://app.slaiky.xyz/api/methods/oauth.v2.access \ -H 'content-type: application/json' \ -d '{"clientId":"","clientSecret":"","code":""}' ```