---
title: Update session identifier settings
---

[Skip to content](#_top)

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

[API Gateway](https://developers.cloudflare.com/api/go/resources/api_gateway)

[Configurations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/configurations)

Copy Markdown

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

---

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

# Update session identifier settings

client.APIGateway.Configurations.Update(ctx, params) (\*[Configuration](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/api\_gateway/configuration

Replaces the zone’s authentication identifier characteristics used to identify distinct API sessions.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

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

`Account API Gateway``Domain API Gateway`

##### ParametersExpand Collapse

<details>

<summary>

params ConfigurationUpdateParams

</summary>

ZoneID param.Field\[string]

Path param: Identifier.

maxLength32

<a href="#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

Configuration param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)">Configuration</a>]

Body param

<a href="#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20configuration">Link to this property</a>

Normalize param.Field\[bool]Optional

Query param: Ensures that the configuration is written or retrieved in normalized fashion

<a href="#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20normalize">Link to this property</a>

</details>

[Link to this property](<#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type Configuration struct{…}

</summary>

<details>

<summary>

AuthIDCharacteristics \[]ConfigurationAuthIDCharacteristic

</summary>

One of the following:

<details>

<summary>

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic struct{…}

Auth ID Characteristic

</summary>

Name string

The name of the characteristic field, i.e., the header or cookie name.

maxLength128

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType

The type of characteristic.

</summary>

One of the following:

const ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeHeader ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType = "header"

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

const ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeCookie ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType = "cookie"

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJWTClaim struct{…}

Auth ID Characteristic extracted from JWT Token Claims

</summary>

Name string

Claim location expressed as <code>$(token_config_id):$(json_path)</code>, where <code>token_config_id</code> is the ID of the token configuration used in validating the JWT, and <code>json_path</code> is a RFC 9535 JSONPath (<a href="https://goessner.net/articles/JsonPath/">https://goessner.net/articles/JsonPath/</a>, <a href="https://www.rfc-editor.org/rfc/rfc9535.html">https://www.rfc-editor.org/rfc/rfc9535.html</a>). The JSONPath expression may be in dot or bracket notation, may only specify literal keys or array indexes, and must return a singleton value, which will be interpreted as a string.

maxLength128

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20name">Link to this property</a>

Type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJWTClaimType

The type of characteristic.

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)%20%3E%20(property)%20auth_id_characteristics">Link to this property</a>

</details>

[Link to this property](<#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)>)

### Update session identifier settings

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  configuration, err := client.APIGateway.Configurations.Update(context.TODO(), api_gateway.ConfigurationUpdateParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    Configuration: api_gateway.ConfigurationParam{
      AuthIDCharacteristics: cloudflare.F([]api_gateway.ConfigurationAuthIDCharacteristicsUnionParam{api_gateway.ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicParam{
        Name: cloudflare.F("authorization"),
        Type: cloudflare.F(api_gateway.ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeHeader),
      }}),
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", configuration.AuthIDCharacteristics)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "auth_id_characteristics": [
      {
        "name": "authorization",
        "type": "header"
      }
    ]
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "auth_id_characteristics": [
      {
        "name": "authorization",
        "type": "header"
      }
    ]
  },
  "success": true
}
```