Activate Agent for Widget
ethora-agents-activate-v2Make an agent the app's ACTIVE widget bot: sets App.defaultBotInstanceId (and botStatus: on), which is what POST /v2/widget/sessions uses to decide who answers website visitors. Required before an embedded widget can answer on an API-created app. Preconditions: the agent was invited into a room of this app with ethora-agent-invite-to-chat (that creates its bot instance). Works in user auth (app update route); falls back to the app-token /v2/agents/:id/activate route when an appToken is stored.
Auth: user session (owner of the app). Errors: 404 no bot instance for this agent in the app (invite first); 403 not the app owner. Related: ethora-widget-embed-snippet next, ethora-bot-instances-list to inspect.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | No | App to activate the agent for. Defaults to the app from `ethora-app-select`. | |
| agentId | Yes | Id (or address) of the agent to activate. Get it from `ethora-agents-list-v2` / `ethora-agents-create-v2`. | |
| chatJid | No | Room JID `${appId}_${chatId}` (with or without `@conference...`) that becomes the widget chat. Required for API-created apps; omit only for dashboard-created apps that already have an AI Widget chat bound. |