Change a permission rule

October 12, 2026 (November 16, 2026)

Table of contents

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

Change one standing rule of the Muse agent: allow or deny one website or app action. Find rules with GET /accounts/email/permissions. A rule is created when an approval is answered with allow_always.

  • allow: the agent goes ahead without asking.
  • deny: the agent may not do it.
  • ask: removes the rule, because asking is the default. The response then has removed: true.

https://api.useapi.net/v1/muse/accounts/email/permissions/permissionId

  • email is the email of an added account, URL-encoded in the path.
  • permissionId is the rule’s permissionId from GET /accounts/email/permissions, URL-encoded in the path (it contains :).
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Request Body
{
  "mode": "deny"
}
  • mode is required, one of the rule’s modes.
    Supported values: allow, ask, deny.
Responses
  • 200 OK — the rule as it is now. With mode: "ask" the rule is gone and the response has removed: true instead of rule.

    {
      "email": "example@gmail.com",
      "permissionId": "network_rule:hitl_domain_allow_nodesource_com_afdc93c7",
      "mode": "deny",
      "rule": {
        "permissionId": "network_rule:hitl_domain_allow_nodesource_com_afdc93c7",
        "type": "web",
        "mode": "deny",
        "modes": ["allow", "ask", "deny"],
        "title": "nodesource.com",
        "target": "nodesource.com:80,443",
        "note": null,
        "lifetime": "durable",
        "revocable": true,
        "created": null
      }
    }
    
    {
      "email": "example@gmail.com",
      "permissionId": "network_rule:hitl_domain_allow_nodesource_com_afdc93c7",
      "mode": "ask",
      "removed": true
    }
    
  • 400 Bad Request — mode is missing or is not one of the rule’s modes.

    {
      "error": "Parameter mode (sometimes) valid values: allow,ask,deny",
      "code": 400
    }
    
  • 401 Unauthorized — Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 404 Not Found — the account named by email is not added, or it has no rule with this permissionId.

    {
      "error": "Permission not found",
      "code": 404
    }
    
  • 502 Bad Gateway — Muse did not change the rule. Retry.

  • 503 Service Unavailable — Muse could not be read right now. Retry shortly.

    {
      "error": "Muse could not be read right now (…), please retry",
      "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 three 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 example@gmail.com: Meta asks for a security check on account example@gmail.com (\"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 example@gmail.com: Muse refused to sign in account example@gmail.com (…). Update its password with POST /accounts, or sign in at https://muse.ai to clear the block, then re-add it",
      "code": 596
    }
    

    Or Muse disabled the account’s computer and refuses to start it again. Sign in at muse.ai in a browser to see why, and ask Muse support to restore it with the form Muse shows there. Add the account again only after Muse has restored it.

    {
      "error": "Account example@gmail.com: Muse has disabled the computer of account example@gmail.com (\"VM wake unavailable\"). Sign in at https://muse.ai in a browser to see why and contact Muse support there, then add the account again with POST /accounts",
      "code": 596
    }
    
Model

The rule as it is now after allow or deny, or removed: true after ask.

The changed rule, field by field
{ // TypeScript, all fields are optional
  email: string
  permissionId: string
  mode: string                 // the mode you sent
  rule?: Rule                  // allow / deny: the rule as it is now, see GET /accounts/{email}/permissions
  removed?: true               // ask: the rule is gone
  error?: string               // errors only
  code?: number                // errors only
}
Examples
  • EMAIL="example@gmail.com"
    curl -X POST -H "Authorization: Bearer …" \
         -H "Content-Type: application/json" \
         -d '{"mode": "deny"}' \
         "https://api.useapi.net/v1/muse/accounts/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$EMAIL")/permissions/network_rule%3Ahitl_domain_allow_nodesource_com_afdc93c7"
    
  • const token = "API token";
    const email = "Previously added account email";
    const permissionId = "permissionId from GET /accounts/{email}/permissions";
    const apiUrl = `https://api.useapi.net/v1/muse/accounts/${encodeURIComponent(email)}/permissions/${encodeURIComponent(permissionId)}`;
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({ mode: "deny" })
    });
    console.log("response", response.status, await response.json());
    
  • import requests
    from urllib.parse import quote
    token = "API token"
    email = "Previously added account email"
    permissionId = "permissionId from GET /accounts/{email}/permissions"
    apiUrl = f"https://api.useapi.net/v1/muse/accounts/{quote(email, safe='')}/permissions/{quote(permissionId, safe='')}"
    headers = {
        "Content-Type": "application/json",
        "Authorization" : f"Bearer {token}"
    }
    response = requests.post(apiUrl, headers=headers, json={"mode": "deny"})
    print(response, response.json())
    
Try It