Developers

Build bots for ClutchTick

Bot REST API · v1

Create a bot, grab its token, and call a small, predictable REST API to send messages into your communities. No SDK required — any language that can make an HTTP request works.

Base URL https://api.clutchtick.com/api Auth Authorization: Bot <token>

1Create a bot

Open ClutchTick → Settings → Developers → New bot. Give it a name and you'll get a bot token. Copy it now — it's shown only once (you can reset it later). Keep the token secret; treat it like a password. You can create up to 25 bots per account.

2Add the bot to a community

A bot can only post in communities it has been added to. As the community owner, open Server settings → Bots → Add a bot and pick your bot. It then appears in the member list and can post to that community's text channels.

3Authentication

Authenticate every API request with your bot token in the Authorization header:

Authorization: Bot ctb_your_token_here

An invalid or missing token returns 401 Unauthorized.

4Get the current botverify your token

GET/bot/me
# request
curl https://api.clutchtick.com/api/bot/me \
  -H "Authorization: Bot ctb_your_token_here"

# 200 OK
{
  "id": "clx…",
  "username": "my-bot",
  "displayName": "My Bot",
  "avatarUrl": "",
  "ownerId": "clx…"
}

5Send a messagepost as your bot

POST/bot/channels/:channelId/messages

Post a message to a text channel in a community your bot belongs to. Body fields:

  • content — the message text (string, up to 4000 characters).
  • replyToId — optional, the id of a message in the same channel to reply to.
  • attachments — optional, up to 4 base64 data URLs (images or short clips). A message needs text or at least one attachment.
# request
curl -X POST https://api.clutchtick.com/api/bot/channels/CHANNEL_ID/messages \
  -H "Authorization: Bot ctb_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"content":"gg wp — scrim starts in 10 minutes."}'

# 201 Created — the message object
{
  "id": "clx…",
  "channelId": "CHANNEL_ID",
  "content": "gg wp — scrim starts in 10 minutes.",
  "author": { "username": "my-bot", "isBot": true },
  "createdAt": "2026-06-29T12:00:00.000Z"
}

The message is delivered in real time to everyone viewing the channel, exactly like a message from a person. Find a channel's id from the app, or from a community's data via the API.

6React to a messageadd an emoji

POST/bot/messages/:messageId/reactions

Toggle the bot's emoji reaction on a message in a channel it can access. Send the same emoji again to remove it.

# request
curl -X POST https://api.clutchtick.com/api/bot/messages/MESSAGE_ID/reactions \
  -H "Authorization: Bot ctb_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"emoji":"🔥"}'

# 201 — added is true when the reaction was added, false when it was removed
{ "added": true }

7Edit a messageyour bot's own messages

PATCH/bot/messages/:messageId

Update the text of a message your bot sent. A bot can only edit its own messages; the edited message shows an "(edited)" marker, just like for people.

# request
curl -X PATCH https://api.clutchtick.com/api/bot/messages/MESSAGE_ID \
  -H "Authorization: Bot ctb_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"content":"Updated: scrim starts in 5 minutes."}'

# 200 OK — the updated message object

8Receive messagesevents feed

GET/bot/events

Poll this endpoint to receive new messages posted in the communities your bot belongs to, so it can react or reply. It only ever returns messages from communities your bot was added to — never from anywhere else — and never the bot's own messages.

  • since — the cursor from your previous response. Treat it as an opaque token — don't parse it, just store it and pass it back. The first call (no since) returns an empty list and a fresh cursor, so your bot starts from now instead of replaying history.
  • limit — optional, how many events to return at once (1–100, default 50). If you get a full page, poll again immediately to drain the backlog.

Poll every 3–5 seconds, always passing back the latest cursor. Every message is delivered exactly once — the cursor is a keyset, so nothing is skipped or duplicated even under bursts.

# 1) first call — get a starting cursor
curl https://api.clutchtick.com/api/bot/events \
  -H "Authorization: Bot ctb_your_token_here"
# → { "events": [], "cursor": "MjAyNi0wNi0yOVQxMjo…" }   (opaque — store it)

# 2) poll with the cursor to get everything since
curl "https://api.clutchtick.com/api/bot/events?since=MjAyNi0wNi0yOVQxMjo…" \
  -H "Authorization: Bot ctb_your_token_here"

# 200 OK
{
  "events": [
    {
      "type": "message.created",
      "message": {
        "id": "clx…",
        "channelId": "clx…",
        "serverId": "clx…",
        "content": "!scrim 8pm",
        "author": { "username": "player1", "isBot": false },
        "createdAt": "2026-06-29T12:00:03.000Z"
      }
    }
  ],
  "cursor": "MjAyNi0wNi0yOVQxMjowMDowMy4…"
}

A simple loop: read events, act on each one (e.g. reply with /bot/channels/:id/messages), then poll again with the new cursor. This is a lightweight feed; live WebSocket streaming is planned.

9Errors

  • 401 Unauthorized — the bot token is missing or invalid.
  • 403 Forbidden — the bot isn't a member of that channel's community.
  • 400 Bad Request — the body is empty (no text and no attachment), a field is too long, or the since cursor is malformed.
  • 404 Not Found — the channel doesn't exist.

9Good citizenship

Bots follow the same rules as people — see our Community Guidelines. Don't spam, don't post on behalf of users without their knowledge, and back off if you get errors. Reset a leaked token immediately from Settings → Developers.