Skip to content
Start here

Create Miscategorization

client.intel.miscategorizations.create(MiscategorizationCreateParams { account_id, content_adds, content_removes, 5 more } params, RequestOptionsoptions?): MiscategorizationCreateResponse { errors, messages, success }
POST/accounts/{account_id}/intel/miscategorization

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

Requests that include category 169 (New Domains) or category 177 (Newly Seen) in any of content_adds, content_removes, security_adds, or security_removes will be rejected with a 400 Bad Request. These categories are automatically managed and fall off 30 days after they are applied.

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
params: MiscategorizationCreateParams { account_id, content_adds, content_removes, 5 more }
account_id: string

Path param: Identifier.

maxLength32
content_adds?: Array<number>

Body param: Content category IDs to add.

content_removes?: Array<number>

Body param: Content category IDs to remove.

indicator_type?: "domain" | "ipv4" | "ipv6" | "url"

Body param

One of the following:
"domain"
"ipv4"
"ipv6"
"url"
ip?: string | null

Body param: Provide only if indicator_type is ipv4 or ipv6.

security_adds?: Array<number>

Body param: Security category IDs to add.

security_removes?: Array<number>

Body param: Security category IDs to remove.

url?: string

Body param: 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
MiscategorizationCreateResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

Create Miscategorization

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const miscategorization = await client.intel.miscategorizations.create({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(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
}