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

[Skip to content](#_top)

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

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

[Configurations](https://developers.cloudflare.com/api/python/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

api\_gateway.configurations.update(ConfigurationUpdateParams\*\*kwargs) -> [Configuration](<https://developers.cloudflare.com/api/python/resources/api_gateway#(resource)%20api_gateway.configurations%20%3E%20(model)%20configuration%20%3E%20(schema)>)

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

zone\_id: str

Identifier.

maxLength32

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

<details>

<summary>

auth\_id\_characteristics: Iterable\[AuthIDCharacteristic]

</summary>

One of the following:

<details>

<summary>

class AuthIDCharacteristicAPIShieldAuthIDCharacteristic: …

Auth ID Characteristic

</summary>

name: str

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

maxLength128

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

<details>

<summary>

type: Literal\["header", "cookie"]

The type of characteristic.

</summary>

One of the following:

"header"

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

"cookie"

<a href="#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20auth_id_characteristics%20%3E%20(schema)%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(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20auth_id_characteristics%20%3E%20(schema)%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(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20auth_id_characteristics%20%3E%20(schema)%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class AuthIDCharacteristicAPIShieldAuthIDCharacteristicJWTClaim: …

Auth ID Characteristic extracted from JWT Token Claims

</summary>

name: str

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(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20auth_id_characteristics%20%3E%20(schema)%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20name">Link to this property</a>

type: Literal\["jwt"]

The type of characteristic.

<a href="#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20auth_id_characteristics%20%3E%20(schema)%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(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20auth_id_characteristics%20%3E%20(schema)%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

</details>

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

normalize: Optional\[[bool](<https://developers.cloudflare.com/api/python/resources/api_gateway/subresources/configurations/methods/update#(resource)%20api_gateway.configurations%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20normalize%20%3E%20(schema)>)]

Ensures that the configuration is written or retrieved in normalized fashion

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

##### ReturnsExpand Collapse

<details>

<summary>

class Configuration: …

</summary>

<details>

<summary>

auth\_id\_characteristics: List\[AuthIDCharacteristic]

</summary>

One of the following:

<details>

<summary>

class AuthIDCharacteristicAPIShieldAuthIDCharacteristic: …

Auth ID Characteristic

</summary>

name: str

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: Literal\["header", "cookie"]

The type of characteristic.

</summary>

One of the following:

"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>

"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>

class AuthIDCharacteristicAPIShieldAuthIDCharacteristicJWTClaim: …

Auth ID Characteristic extracted from JWT Token Claims

</summary>

name: str

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: Literal\["jwt"]

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

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
configuration = client.api_gateway.configurations.update(
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    auth_id_characteristics=[{
        "name": "authorization",
        "type": "header",
    }],
)
print(configuration.auth_id_characteristics)
```

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
}
```