Delete a permission rule

October 12, 2026

Table of contents

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

Remove one standing rule of the Muse agent. Without the rule, the account’s default setting applies again, see GET /accounts/email/permissions. Rules are created when an approval is answered with allow_always, so this is how you take an “Always allow this site” back.

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}
Responses
  • 200 OK

    {
      "email": "[email protected]",
      "permissionId": "network_rule:hitl_domain_allow_nodesource_com_afdc93c7",
      "deleted": true
    }
    
  • 401 Unauthorized — Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 404 Not Found — the rule is not there (already removed), or the account named by email is not added.

    {
      "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 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
  email: string
  permissionId: string
  deleted: true
  error?: string               // errors only
  code?: number                // errors only
}
Examples
  • EMAIL="[email protected]"
    curl -X DELETE -H "Authorization: Bearer …" \
         "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: "DELETE",
      headers: {
        "Authorization": `Bearer ${token}`,
      }
    });
    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 = {
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response, response.json())
    
Try It