Revoke live views of the browser

October 14, 2026

Table of contents

  1. Request Headers
  2. Responses
  3. Model
  4. Examples
  5. Try It

End every live view of the agent’s browser. Open viewer sessions end within about 15 seconds, and links that were not opened yet stop working. A link you create after this works as usual. The browser itself stays open: stop it to close it. If you had control in a viewer that ends this way, control goes back to the agent.

Use it when you gave a viewer link to someone and want to take it back, or to free the account’s one viewer for another browser. See the Live Browser Guide for the whole flow.

https://api.useapi.net/v1/muse/chats/chatId/browser/taskId/viewer

  • chatId is URL-encoded in the path (it contains : and @).
  • taskId is the taskId of the chat’s browser event.
Request Headers
Authorization: Bearer {API token}
Responses
  • 200 OK

    {
      "chatId": "c-u12345-email:[email protected]:8e0bf21e-a3b5-4a1e-a05a-65d160469bfb-bot:muse",
      "taskId": "423bc12e-db16-4921-8670-08b5f3f5a5d6",
      "revoked": true
    }
    
  • 400 Bad Request — the path holds no valid chatId or taskId.

    {
      "error": "Path parameter taskId (not-a-task) is not a valid browser task id",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden — the chatId was 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. Its viewers ended with it.

    {
      "error": "This browser is already closed",
      "code": 409
    }
    
  • 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
  revoked: true
  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 DELETE -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/viewer"
    
  • 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)}/viewer`;
    const response = await fetch(apiUrl, {
      method: "DELETE",
      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='')}/viewer"
    headers = {
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response, response.json())
    
Try It