Control Chat Presence
Use these endpoints to ask ai_licia to join or leave one of the channels linked to your API key.
- The channel must be owned by (or shared with) the API key owner.
- ai_licia must have an active subscription or available credits for the account to join.
POST /v1/streams/{channelName}
Sends a join request and waits up to 10 seconds for the confirmation event.
Request
- Method/Path:
POST /v1/streams/{channelName} - Headers:
Authorization: Bearer <API_KEY> - Path parameters:
channelName: handle of a channel you control (e.g. your Twitch username)
Responses
200 OKwith aJoinChannelResponsepayload indicating success, already-joined status, or timeout401 Unauthorizedif the API key is invalid403 Forbiddenif the channel is not associated with the key or no subscription/credits are available404 Not Foundif the channel cannot be resolved for the streamer
Example
curl -X POST https://api.getailicia.com/v1/streams/mychannel \
-H "Authorization: Bearer ${API_KEY}"{
"success": true,
"message": "AI successfully joined channel",
"joinedAt": 1739982392000,
"channelId": "ch_123"
}If ai_licia is already connected:
{
"success": true,
"message": "AI already in channel",
"alreadyJoined": true
}Timeout example:
{
"success": false,
"message": "Join request sent but AI join confirmation timed out after 10 seconds",
"timeout": true,
"joinRequestId": "req_xyz"
}DELETE /v1/streams/{channelName}
Queues a leave request for the specified channel. The orchestrator processes it asynchronously, so the endpoint responds immediately.
Request
- Method/Path:
DELETE /v1/streams/{channelName} - Headers:
Authorization: Bearer <API_KEY> - Path parameters:
channelName: handle of a controlled channel
Responses
202 Acceptedonce the leave request is enqueued401 Unauthorizedif the API key is invalid403 Forbiddenif the channel is not associated with the key404 Not Foundif the channel cannot be resolved
Example
curl -X DELETE https://api.getailicia.com/v1/streams/mychannel \
-H "Authorization: Bearer ${API_KEY}"