---
title: Create new saved string queries
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Brand Protection](https://developers.cloudflare.com/api/go/resources/brand_protection)

[Queries](https://developers.cloudflare.com/api/go/resources/brand_protection/subresources/queries)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Create new saved string queries

client.BrandProtection.Queries.New(ctx, params) error

POST/accounts/{account\_id}/brand-protection/queries

Return a success message after creating new saved string queries

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

##### Accepted Permissions (at least one required)

`Intel Write`

##### ParametersExpand Collapse

<details>

<summary>

params QueryNewParams

</summary>

AccountID param.Field\[string]

Path param

minLength1

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

ID param.Field\[string]Optional

Query param

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20id">Link to this property</a>

QueryScan param.Field\[bool]Optional

Query param

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20scan">Link to this property</a>

QueryTag param.Field\[string]Optional

Query param

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tag">Link to this property</a>

MaxTime param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/brand_protection/subresources/queries/methods/create#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20max_time%20%3E%20(schema)">Time</a>]Optional

Body param

formatdate-time

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20max_time">Link to this property</a>

MinTime param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/brand_protection/subresources/queries/methods/create#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20min_time%20%3E%20(schema)">Time</a>]Optional

Body param

formatdate-time

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20min_time">Link to this property</a>

QueryScan param.Field\[bool]Optional

Query param

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20scan">Link to this property</a>

StringMatches param.Field\[unknown]Optional

Body param

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20string_matches">Link to this property</a>

QueryTag param.Field\[string]Optional

Query param

<a href="#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tag">Link to this property</a>

</details>

[Link to this property](<#(resource)%20brand_protection.queries%20%3E%20(method)%20create%20%3E%20(params)%20default>)

### Create new saved string queries

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"

  "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"),
  )
  err := client.BrandProtection.Queries.New(context.TODO(), brand_protection.QueryNewParams{
    AccountID: cloudflare.F("x"),
  })
  if err != nil {
    panic(err.Error())
  }
}
```

##### Returns Examples