Skip to content
Start here

Create Miscategorization

intel.miscategorizations.create(MiscategorizationCreateParams**kwargs) -> MiscategorizationCreateResponse
POST/accounts/{account_id}/intel/miscategorization

Allows you to submit requests to change a domain’s category.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
account_id: str

Identifier.

maxLength32
content_adds: Optional[Iterable[int]]

Content category IDs to add.

content_removes: Optional[Iterable[int]]

Content category IDs to remove.

indicator_type: Optional[Literal["domain", "ipv4", "ipv6", "url"]]
One of the following:
"domain"
"ipv4"
"ipv6"
"url"
ip: Optional[str]

Provide only if indicator_type is ipv4 or ipv6.

security_adds: Optional[Iterable[int]]

Security category IDs to add.

security_removes: Optional[Iterable[int]]

Security category IDs to remove.

url: Optional[str]

Provide only if indicator_type is domain or url. Example if indicator_type is domain: example.com. Example if indicator_type is url: https://example.com/news/.

ReturnsExpand Collapse
class MiscategorizationCreateResponse:
errors: List[Error]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[ErrorSource]
pointer: Optional[str]
messages: List[Message]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[MessageSource]
pointer: Optional[str]
success: Literal[true]

Whether the API call was successful.

Create Miscategorization

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
miscategorization = client.intel.miscategorizations.create(
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(miscategorization.errors)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true
}