Give the browser back
October 14, 2026
Table of contents
Give control of the agent’s browser back to the agent, like the Done button in the muse.ai app. Use it after you took control of the browser in a viewer, when the viewer is no longer open to give it back itself. The viewer page has its own Release control button, and control also returns to the agent when the viewer closes.
The call answers 200 with controlOwner: "agent" also when the agent already has control, so it is safe to repeat. See the Live Browser Guide for the whole flow.
https://api.useapi.net/v1/muse/chats/
chatId/browser/taskId/release
chatIdis URL-encoded in the path (it contains:and@).taskIdis thetaskIdof the chat’sbrowserevent.
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Responses
-
{ "chatId": "c-u12345-email:[email protected]:8e0bf21e-a3b5-4a1e-a05a-65d160469bfb-bot:muse", "taskId": "423bc12e-db16-4921-8670-08b5f3f5a5d6", "released": true, "controlOwner": "agent" } -
400 Bad Request — the path holds no valid
chatIdortaskId.{ "error": "Path parameter taskId (not-a-task) is not a valid browser task id", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
403 Forbidden — the
chatIdwas issued to a different API token.{ "error": "This chat id does not belong to this API token", "code": 403 } -
404 Not Found — the chat or the browser was not found, or the account that holds the chat is not added.
{ "error": "Browser task not found in this chat", "code": 404 } -
409 Conflict — the browser is closed, or Muse refused the release.
{ "error": "This browser is already closed", "code": 409 } -
502 Bad Gateway — Muse did not take the release. Retry shortly.
{ "error": "Muse refused the release (HTTP 500)", "code": 502 } -
503 Service Unavailable — Muse could not be reached. Retry shortly.
{ "error": "Could not connect to the Muse workspace of account [email protected] (…), please retry shortly", "code": 503 } -
596 Account Error
The account needs your attention, and it is paused until you add it again. You receive an email when this happens. There are two causes.
Meta asks for a security check on the account. Sign in once at muse.ai in a browser, complete the check, then add the account again with POST /accounts using the same email and password. The API keeps using its session, so no new sign-in is needed.
{ "error": "Account [email protected]: Meta asks for a security check on account [email protected] (\"This account must complete a security checkpoint on the web\"). Sign in once at https://muse.ai in a browser, complete the check, then add the account again with POST /accounts", "code": 596 }Or Muse refused to sign the account in again when its session needed renewing, most often because the password was changed. Add the account again with the current password.
{ "error": "Account [email protected]: Muse refused to sign in account [email protected] (…). Update its password with POST /accounts, or sign in at https://muse.ai to clear the block, then re-add it", "code": 596 }
Model
{ // TypeScript, all fields are optional
chatId: string
taskId: string
released: true
controlOwner: string // agent
error?: string // errors only
code?: number // errors only
}
Examples
-
CHATID="c-u12345-email:[email protected]:8e0bf21e-a3b5-4a1e-a05a-65d160469bfb-bot:muse" TASKID="423bc12e-db16-4921-8670-08b5f3f5a5d6" curl -X POST -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/muse/chats/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$CHATID")/browser/$TASKID/release" -
const token = "API token"; const chatId = "chatId from POST /chats"; const taskId = "taskId from the stream's browser event"; const apiUrl = `https://api.useapi.net/v1/muse/chats/${encodeURIComponent(chatId)}/browser/${encodeURIComponent(taskId)}/release`; const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", response.status, result); -
import requests from urllib.parse import quote token = "API token" chatId = "chatId from POST /chats" taskId = "taskId from the stream's browser event" apiUrl = f"https://api.useapi.net/v1/muse/chats/{quote(chatId, safe='')}/browser/{quote(taskId, safe='')}/release" headers = { "Authorization" : f"Bearer {token}" } response = requests.post(apiUrl, headers=headers) print(response, response.json())