Introduction
YuChat provides a REST API for integrating with external systems and building chatbots.
📄 Download OpenAPI Specification
Creating a Bot
-
Add the Bot Assistant (
aibot@yuchat.ai) to your workspace. This assistant is required for creating and managing bots.-
Go to Workspace Settings → Invite to Team → Invite by Email → enter
aibot@yuchat.ai -
Once added, the assistant will appear in the AI Agents and Bots section below your channels list
noteYou can also interact with the Bot Assistant via direct messages using these commands:
Command Description /help Show available commands /smart Smart search across YuChat. Ask a question and the bot will search all accessible messages and meetings /unread Get a summary of unread messages. Optionally specify days: /unread 3(1-7 or 14 days)/desc Get a summary of all messages. Specify days: /desc 3(1-7 or 14 days)/botcreate Create a new bot: /botcreate MyBot/botlist List all active bots in the workspace /botdelete Delete a bot by ID: /botdelete avfANxAcG8/botnewtoken Generate a new token for a bot (invalidates the old one): /botnewtoken avfANxAcG8
-
-
Send a direct message to the Bot Assistant with
/botcreate <bot_name> -
You'll receive a token to use for API authentication
Example:
Command:
/botcreate TestBotResponse:
Bot TestBot created
Token: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJDbzVsR3ItZU51WnU0TjdUSEd2TGVHRGNWVk1oR1JXWlVLTmc0cFBxa2hBIn0.eyJleHAicJ1In0.Cncyq8zILO81Bv_wbNk5b5OuHLP76Vf94TRs2gUAq-Mvq3Qc4ZFNE_eMcpsvYr0q4DOAffpQ -
Save your token securely
Bots can only send messages and perform actions in channels where they are members.
Adding a Bot to a Channel
- Open the target channel
- Open the Members list
- Click Add People
- Select the bot from the list
- Click Invite
You can also download the OpenAPI specification here.
💡 Use the sidebar to browse available API methods, request/response schemas, and examples.
🔑 Some endpoints (e.g., sending messages or files) require workspaceId and chatId in the request body.
Finding Your workspaceId
-
Open YuChat in your browser and navigate to the target workspace
-
Open Developer Tools (
F12) -
Go to the Elements tab
-
Look for an element with the
data-workspace-idattributeExample:
<div data-workspace-id="RRvYqDwAvk">infoIf you have multiple workspaces, ensure you're inspecting the correct one.
-
Alternatively, open the Console tab and switch workspaces—you'll see:
go to workspaceId: <ID>
Finding Your chatId
Check the browser URL when viewing a channel:
Example: https://web.yuchat.ai/testws/channels/w:eXtXOs0sT2
The chatId is w:eXtXOs0sT2.