Skip to content
Start here

Create Miscategorization

client.Intel.Miscategorizations.New(ctx, params) (*MiscategorizationNewResponse, error)
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 MiscategorizationNewParams
AccountID param.Field[string]

Path param: Identifier.

maxLength32
ContentAdds param.Field[[]int64]Optional

Body param: Content category IDs to add.

ContentRemoves param.Field[[]int64]Optional

Body param: Content category IDs to remove.

IndicatorType param.Field[MiscategorizationNewParamsIndicatorType]Optional

Body param

const MiscategorizationNewParamsIndicatorTypeDomain MiscategorizationNewParamsIndicatorType = "domain"
const MiscategorizationNewParamsIndicatorTypeIPV4 MiscategorizationNewParamsIndicatorType = "ipv4"
const MiscategorizationNewParamsIndicatorTypeIPV6 MiscategorizationNewParamsIndicatorType = "ipv6"
const MiscategorizationNewParamsIndicatorTypeURL MiscategorizationNewParamsIndicatorType = "url"
IP param.Field[string]Optional

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

SecurityAdds param.Field[[]int64]Optional

Body param: Security category IDs to add.

SecurityRemoves param.Field[[]int64]Optional

Body param: Security category IDs to remove.

URL param.Field[string]Optional

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
type MiscategorizationNewResponse struct{…}
Errors []MiscategorizationNewResponseError
Code int64
minimum1000
Message string
DocumentationURL stringOptional
Source MiscategorizationNewResponseErrorsSourceOptional
Pointer stringOptional
Messages []MiscategorizationNewResponseMessage
Code int64
minimum1000
Message string
DocumentationURL stringOptional
Source MiscategorizationNewResponseMessagesSourceOptional
Pointer stringOptional
Success MiscategorizationNewResponseSuccess

Whether the API call was successful.

Create Miscategorization

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/intel"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  miscategorization, err := client.Intel.Miscategorizations.New(context.TODO(), intel.MiscategorizationNewParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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
}