Skip to content
Start here

Create new saved logo queries from image files

client.BrandProtection.Logos.New(ctx, params) (*LogoNewResponse, error)
POST/accounts/{account_id}/brand-protection/logos

Return new saved logo queries created from image files

Security

API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Intel Write
ParametersExpand Collapse
params LogoNewParams
AccountID param.Field[string]

Path param

minLength1
MatchType param.Field[string]optional

Query param

Tag param.Field[string]optional

Query param

Threshold param.Field[float64]optional

Query param

Image param.Field[Reader]optional

Body param

ReturnsExpand Collapse
type LogoNewResponse struct{…}
ID int64optional
Tag stringoptional
UploadPath stringoptional

Create new saved logo queries from image files

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  logo, err := client.BrandProtection.Logos.New(context.TODO(), brand_protection.LogoNewParams{
    AccountID: cloudflare.F("x"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", logo.ID)
}
{
  "id": 0,
  "tag": "tag",
  "upload_path": "upload_path"
}
Returns Examples
{
  "id": 0,
  "tag": "tag",
  "upload_path": "upload_path"
}