webhookURL, and your service replies by calling the Send Bot Message API.
Endpoints
How bots work
- A bot is a user plus a webhook. The
uidyou pass to the Create Bot API must already belong to a User; if it does not, the API returnsERR_UID_NOT_FOUND. - One-to-one messages sent to the bot are relayed to its
webhookURL. - Group messages are relayed according to
groupChatSetting:
- A bot only relays messages while
enabledistrue. - Set
useBasicAuthtotrueto send HTTP basic auth credentials with every webhook call, so your endpoint can verify the caller. - Bots reply through the Send Bot Message API, which posts a message as the bot.
- Agents created through AI Agents are not managed by these endpoints. They don’t appear in the List Bots response, and Get, Update and Delete return
ERR_BOT_NOT_FOUNDfor their UIDs.
Relationships
- Users — A bot is a User with a webhook attached. Its name and avatar belong to the user, so change them with the Update User API.
- Send Bot Message — Use the Send Bot Message API to post a message as a bot.
- Custom Bots — For an end-to-end walkthrough, including the webhook payload your service receives, see the Custom Bots guide.
Bot properties
Responses omit every property whose value is empty or
false, so a standard bot has no isAIBot, and a bot that has never had basic auth has no useBasicAuth, username or password. Setting useBasicAuth to false with the Update Bot API does not clear stored credentials: the response drops useBasicAuth but still contains username and password.Error handling
For the complete list of error codes, see Error Guide.
For all system limits (bot caps, UID length, etc.), see Properties and Constraints.