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.

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
}