Agents

Make an AI Agent the App's website widget responder (v2, app-token)

Invites the agent into the App's AI Widget chat (as POST /v2/agents/{idOrAddress}/invite-to-chat does) and sets the resulting BotInstance as the App's defaultBotInstanceId, the bot that answers website widget visitors. AppId is inferred from the app-token (authMw('app')).

The room is chatJid from the body, else the App's bound AI Widget chat; it must be one of this App's rooms (else 422 CHAT_APP_MISMATCH). The agent must be owned by the App or be unlisted / public.

post/v2/agents/{idOrAddress}/activate

Request

  • Base URL: https://api.chat.ethora.com
  • URL: https://api.chat.ethora.com/v2/agents/{idOrAddress}/activate
  • Auth: HTTP bearer

Path parameters

idOrAddressstring required

Agent id, or the agent's 0x... address.

Request body

chatJidstring

Room to use instead of the App's AI Widget chat.

Response

{ ok: true, agent: Agent, botInstance: { id, agentId, appId, userId, xmppUsername, status, joinedRooms }, defaultBotInstanceId: string|null }

Changes

No recorded changes to this operation across all 1 revision of this API.