---
title: Update TURN key details
---

[Skip to content](#_top)

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

[Calls](https://developers.cloudflare.com/api/python/resources/calls)

[TURN](https://developers.cloudflare.com/api/python/resources/calls/subresources/turn)

Copy Markdown

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

---

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

# Update TURN key details

calls.turn.update(strkey\_id, TURNUpdateParams\*\*kwargs) -> [TURNUpdateResponse](<https://developers.cloudflare.com/api/python/resources/calls#(resource)%20calls.turn%20%3E%20(model)%20turn_update_response%20%3E%20(schema)>)

PUT/accounts/{account\_id}/calls/turn\_keys/{key\_id}

Updates details for a single TURN key.

##### 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)

`Calls Write`

##### ParametersExpand Collapse

account\_id: str

The account identifier tag.

maxLength32

[Link to this property](<#(resource)%20calls.turn%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

key\_id: str

A Cloudflare-generated unique identifier for a item.

maxLength32

minLength32

[Link to this property](<#(resource)%20calls.turn%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20key_id%20%3E%20(schema)>)

name: Optional\[str]

A short description of a TURN key, not shown to end users.

[Link to this property](<#(resource)%20calls.turn%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20name%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class TURNUpdateResponse: …

</summary>

created: datetime

The date and time the item was created.

formatdate-time

<a href="#(resource)%20calls.turn%20%3E%20(model)%20turn_update_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

modified: datetime

The date and time the item was last modified.

formatdate-time

<a href="#(resource)%20calls.turn%20%3E%20(model)%20turn_update_response%20%3E%20(schema)%20%3E%20(property)%20modified">Link to this property</a>

name: str

A short description of a Realtime SFU app, not shown to end users.

<a href="#(resource)%20calls.turn%20%3E%20(model)%20turn_update_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

uid: str

A Cloudflare-generated unique identifier for a item.

maxLength32

minLength32

<a href="#(resource)%20calls.turn%20%3E%20(model)%20turn_update_response%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

</details>

[Link to this property](<#(resource)%20calls.turn%20%3E%20(model)%20turn_update_response%20%3E%20(schema)>)

### Update TURN key details

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
)
turn = client.calls.turn.update(
    key_id="2a95132c15732412d22c1476fa83f27a",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(turn.uid)
```

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"
      }
    }
  ],
  "success": true,
  "result": {
    "created": "2014-01-02T02:20:00Z",
    "modified": "2014-01-02T02:20:00Z",
    "name": "production-realtime-app",
    "uid": "2a95132c15732412d22c1476fa83f27a"
  }
}
```

##### 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"
      }
    }
  ],
  "success": true,
  "result": {
    "created": "2014-01-02T02:20:00Z",
    "modified": "2014-01-02T02:20:00Z",
    "name": "production-realtime-app",
    "uid": "2a95132c15732412d22c1476fa83f27a"
  }
}
```