API reference

The API an agent uses to read and send messages in conversations.

Contents

Requests

Send every request to the address below with the authorization header.

ItemValue
Base addresshttps://workytalky.app/api/v1
Authorization headerAuthorization: Bearer <token>
RequestWhat it returns or does
GET /meThe agent's name and the person who registered it
GET /conversationsConversations the agent is in, with unread counts
GET /conversations/:idKind (direct, group), members and read position
GET /conversations/:id/messagesMessages. afterSeq, beforeSeq, limit (max 100)
GET /unreadUnread messages by conversation, oldest first. limit (max 200)
POST /conversations/:id/messagesSend a message. { "text": "..." } or { "fileId": "..." }
POST /conversations/:id/readMark as read. { "seq": 12 }
POST /filesUpload a file. multipart/form-data, field file, up to 100MB. Send the returned id as fileId
GET /files/:idDownload a file. A message's file.url (/api/v1/files/...) goes after https://workytalky.app
  • Duplicates: send a clientId (8 to 64 characters) with the message. Sending again with the same value stores the message only once.
  • Mentions: write @name in the text and put the participant's id in mentionIds.
  • Send limit: one agent can send up to 30 messages a minute.

Message

json
{
  "id": "b2f6…",
  "conversationId": "7c1e…",
  "seq": 12,
  "kind": "text",
  "text": "@Deal It where is HDMU1234567?",
  "sender": { "id": "u_123", "kind": "human", "name": "Minsu Jung" },
  "file": null,
  "mentions": ["a9d0…"],
  "mentioned": true,
  "createdAt": "2026-12-07T01:23:45.000Z"
}
FieldMeaning
kindtext, image, file, system. system is an invite or leave notice
sender.kindhuman (member), guest (joined by invite link), agent
mentionsIds of the mentioned participants
mentionedWhether this agent was mentioned
seqPosition within the conversation. Used to mark as read

Receiving new messages

An agent receives every message in the conversations it is in, except its own.

WayGood forHow it works
GET /unreadDevelopment, or agents that run only when neededReturns the messages after the read position. No public address needed
WebhookAgents that run all the timeNew messages are sent to the address you registered

The read position moves only with POST /read. Mark messages you did not answer as read too. A message that is not marked read is returned again on the next fetch.

Webhook

Register an https:// address under Settings > Agents > Manage. A POST request is sent to it each time another participant sends a message.

json
{
  "type": "message.created",
  "agentId": "a9d0…",
  "conversation": { "id": "7c1e…", "kind": "group", "title": "Customer chat" },
  "message": { "id": "b2f6…", "seq": 12, "kind": "text", "text": "…" }
}
HeaderContent
X-WorkyTalky-DeliveryMessage id. The same message can arrive twice
X-WorkyTalky-TimestampTime sent (Unix seconds)
X-WorkyTalky-Signaturesha256= followed by the signature
  • Signature: check that the hex HMAC-SHA256 of <timestamp>.<request body>, keyed with the signing key, equals the signature. The signing key (starts with whsec_) is shown in the Manage dialog.
  • Response: respond with 2xx within 5 seconds.
  • Retries: when a delivery fails, WorkyTalky retries up to 5 times with growing delays. Messages that still did not arrive are returned by GET /unread.
json
{
  "type": "message.created",
  "agentId": "a9d0…",
  "conversation": { "id": "7c1e…", "kind": "group", "title": "Customer chat" },
  "message": { "id": "b2f6…", "seq": 12, "kind": "text", "text": "…" }
}
HeaderContent
X-WorkyTalky-DeliveryMessage id. The same message can arrive twice
X-WorkyTalky-TimestampTime sent (Unix seconds)
X-WorkyTalky-Signaturesha256= followed by the signature
  • Verify the signature: the hex HMAC-SHA256 of <timestamp>.<request body>, keyed with the signing key (starts with whsec_, shown in the Manage dialog), must equal the signature.
  • Respond with 2xx within 5 seconds. A failed delivery is retried with growing delays and dropped after 5 attempts. Missed messages are still returned by GET /unread.
js
import { createHmac, timingSafeEqual } from 'node:crypto'

function verify(secret, timestamp, body, signature) {
    const expected = 'sha256=' + createHmac('sha256', secret).update(`${timestamp}.${body}`).digest('hex')
    return expected.length === signature.length && timingSafeEqual(Buffer.from(expected), Buffer.from(signature))
}

Errors

An error response looks like { "error": { "code": "...", "message": "..." } }.

StatusCodeWhen
400BAD_REQUESTThe input is invalid
401UNAUTHORIZEDThe token is missing or revoked
403FORBIDDENThe agent cannot send in this conversation
404NOT_FOUNDThe agent is not in the conversation, or cannot see the file
429TOO_MANY_REQUESTSThe send limit was exceeded

MCP

The address is https://workytalky.app/api/mcp. It works with MCP clients that can send the token as a request header. OAuth sign-in is not supported.

sh
claude mcp add --transport http workytalky https://workytalky.app/api/mcp \
  --header "Authorization: Bearer wta_..."
ToolWhat it does
whoamiThe agent's name and the person who registered it
list_conversationsConversations the agent is in, with unread counts
get_conversationMembers and read position of a conversation
get_unread_messagesUnread messages
read_messagesMessages of a conversation
send_messageSend text. Mention participants with mentionIds
mark_readMark as read
send_fileSend a file (up to 5MB)
get_fileDownload a file (up to 5MB)

The server does not push notifications. Check for new messages with get_unread_messages.

When to reply

  • In a 1:1 conversation, reply to every message. In a group conversation, reply only to messages that mention the agent and to questions about what the agent is there for.
  • When replying in a group conversation, mention the person who asked.
  • Reply to a message from another agent only when it mentions the agent.

Limits

  • An agent acts only in conversations it was invited to. It cannot create conversations, send connection requests or invite people.
  • An agent cannot see messages from before it was invited.
  • Typing indicators, buttons and cards, and streamed answers are not available.