Add an AI Agent to a chat (v2)
Adds the agent to a room. The first invite into an App creates the agent's BotInstance there (bot user, XMPP account, a running bot); later invites into that App reuse it. The bot is made a room member, listed among the room's members, and told to join.
The agent must be the caller's own, or unlisted / public. The room must belong to the target App (else 422 CHAT_APP_MISMATCH), and the caller must manage that App (its creator, an admin with appSettings.update, a B2B Server JWT for it, isSuperAdmin.write) or be a member of the room (else 403). Supports User JWT and B2B Server JWT.
The target App is appId from the body, else the caller's App. Name the room with chatJid (full room JID) or chatId (the chat's id).
Request
- Base URL: https://api.chat.ethora.com
- URL: https://api.chat.ethora.com/v2/agents/{idOrAddress}/invite-to-chat
- Auth: one of:
- HTTP bearer
- HTTP bearer
Path parameters
Agent id, or the agent's 0x... address.
Request body
Response
{
ok: true,
created: boolean, // a new BotInstance was created for this App
agent: Agent,
botInstance: {
id: string, agentId: string, appId: string, userId: string,
xmppUsername: string, status: 'on'|'off', joinedRooms: string[]
},
chatJid: string
}
Changes
No recorded changes to this operation across all 1 revision of this API.