Post messages from your own systems — monitoring, a CRM, n8n, a script — into a chat room in the VocPhone apps, using a chat bot and its token.
A chat bot is a sender you create in the portal. You choose the rooms it may post to, copy its token, and your system then sends messages with one HTTPS request. Each message appears in the room under the bot's own name and avatar.
| Limit | Value |
|---|---|
| Bots per account | 10, including disabled bots. At the limit you see This account already has 10 bots. — delete one you no longer use |
| Rooms per bot | 20 |
| Messages per bot | 60 a minute |
| Message length | 8,000 characters (text), 16,000 (html) |
Copy this token now. It will not be shown again. Afterwards the card shows only the first characters (
vocbot_…). If you lose it, regenerate it.
room_id.Only group rooms can be added — not direct messages or spaces. If you have joined more than 100 rooms, some may not be listed.
| Message | Why |
|---|---|
| You are not in this room. | Join the room in the app first |
| You do not have permission to invite to this room. | Ask a room admin to add the bot, or to let you invite |
| Bots can only join group rooms, not spaces or direct messages. | Choose a group room |
| You do not have a chat account. | Your user has no active chat account. Contact support |
| This bot is already in 20 rooms. | Remove a room first |
To stop a bot posting to a room, click the x on the room chip and confirm Remove. The bot leaves the room.
POST /api/v2/chat/messages with the bot token as a bearer token. The Send a message box at the bottom of the card shows this request with the right address for your portal — click Copy and paste it.
curl -X POST https://YOUR-API-HOST/api/v2/chat/messages \
-H "Authorization: Bearer YOUR_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"room_id": "!roomid:example.com", "text": "Hello from my system"}'
| Field | Required | What it does |
|---|---|---|
text |
Yes | The message, as plain text |
room_id |
Only when the bot is in more than one room | The room to post to. With one room it can be left out |
html |
No | A formatted (HTML) version of the message, passed to the apps unchanged — each app decides which tags it shows. Apps that can't show it display text |
msgtype |
No | text (default) or notice. A notice marks the message as automated |
idempotency_key |
No | Up to 128 characters. If a message with this key was already sent, you get the same response back and nothing is posted again; a failed send can be retried with the same key. Keys are remembered for 30 days. Use a new key for each message |
A successful send returns HTTP 200. The event_id and room_id are inside data:
{"title": "Success", "message": "Message sent.", "data": {"event_id": "$abc123...", "room_id": "!roomid:example.com"}}
Errors return JSON with a title and a message. Validation errors also include an errors object.
| Status | Meaning | What to do |
|---|---|---|
| 401 | The bot token is missing, invalid or disabled. | Check the token, and that the bot is Active |
| 403 | This bot may not post in that room. | Add the bot to the room in the portal. Also returned when the bot has no rooms yet |
| 403 | This account is not active. | Contact support |
| 409 | The bot is not in this room. | The bot was removed from the room in the app, or can no longer post there. Remove the room chip and add the bot again |
| 409 | A message with this idempotency_key is still being sent. | Another request with this key is still sending. Retry after a few seconds; a request stuck for more than 2 minutes is treated as failed and the retry sends again |
| 422 | Validation failed — text missing, a field over its limit, or an unknown msgtype |
Fix the field named in errors |
| 422 | room_id is required when the bot is in more than one room. | Send room_id |
| 422 | This idempotency_key was used for a different room. | Use a new key per message |
| 429 | This bot has sent 60 messages this minute. or Chat is rate limiting this bot. Retry later. | Wait the number of seconds in the Retry-After header. Retries count toward the 60 a minute |
| 502 | Chat did not respond. Try again. | Retry, with the same idempotency_key |
| Column or action | What it does |
|---|---|
| Token | The first characters of the token, so you can tell tokens apart |
| Status switch | Active or Disabled. A disabled bot's token is refused until you switch it back on |
| Last used | When the bot last sent a message |
| Manage rooms | Add the bot to another room |
| Pencil icon | Edit bot: change the Name (Save name), Upload image for the avatar (PNG or JPEG, up to 1 MB) or Remove image |
| Key icon | Regenerate token. The current token stops working immediately and the new one is shown once |
| Bin icon | Delete bot. It leaves every room and its token stops working |
Give each system its own bot. You can then disable or delete one without interrupting the others, and people in the room can see which system is talking.