Revoke viewer or editor access from a private URL

Revoke viewer or editor permissions on a private URL from users (including service accounts) in the owning group or from the owning group itself.

🚧

Premium feature

Private Scanning is only available to VirusTotal Enterprise users with a Private Scanning license.

Use this endpoint to revoke viewer or editor permissions on a Private URL (see URL identifiers) from specific users (including service accounts) in the owning VirusTotal group or from the owning group itself.

This endpoint is restricted to the URL's owner, group administrators of the owning group, and existing editors. The operation is idempotent and returns 200 OK with an empty response body on success.

📘

Request body required

This endpoint requires a JSON request body containing the descriptors to remove, even though it uses the DELETE method.

This is an example request body:

{
  "data": [
    {
      "id": "<user_id>",
      "type": "user"
    },
    {
      "id": "<group_id>",
      "type": "group"
    }
  ]
}

To grant access, see Grant viewer or editor access to a private URL. For full sharing rules, see Sharing private analyses.

Examples

Revoke viewer access from the owning group:

import requests

url_id = "100680ad546ce6a577f42f52df33b4cfdca756859e664b8d7de329b150d09ce9"
url = f"https://www.virustotal.com/api/v3/private/urls/{url_id}/relationships/viewers"
payload = {
    "data": [
        {"type": "group", "id": "my_group_id"}
    ]
}
headers = {
    "x-apikey": "<api-key>",
    "content-type": "application/json",
}
response = requests.delete(url, json=payload, headers=headers)

Revoke editor access from a user:

import requests

url_id = "100680ad546ce6a577f42f52df33b4cfdca756859e664b8d7de329b150d09ce9"
url = f"https://www.virustotal.com/api/v3/private/urls/{url_id}/relationships/editors"
payload = {
    "data": [
        {"type": "user", "id": "analyst_username"}
    ]
}
headers = {
    "x-apikey": "<api-key>",
    "content-type": "application/json",
}
response = requests.delete(url, json=payload, headers=headers)
Path Params
string
required

URL identifier or base64 representation of URL (without padding)

string
enum
required

Sharing relationship to revoke (viewers or editors).

Allowed:
Body Params
data
array of objects
required

Array of user (including service accounts) and/or owning group descriptors to revoke.

data*
Headers
string
required

Your API key

Responses
200

200 OK (empty response body)

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json