---
title: pydo.functions_access_key.update()
description: Update a Namespace Access Key
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/functions_access_key/update/
last_updated: "2026-10-01"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.functions_access_key.update()

Generated on 1 Oct 2026 from `pydo` version [`v0.43.0`](https://github.com/digitalocean/pydo/releases/tag/v0.43.0v0.43.0)

## Usage

```python
client.functions_access_key.update(
    namespace_id="fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    key_id="dof-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    body={
        "name": "updated-key-name",
    },
)
```

Returns `JSON`Raises `HttpResponseError`

## Description

Updates the name of an access key for a serverless functions namespace.

To update an access key, send a PUT request to [`/v2/functions/namespaces/{namespace_id}/keys/{key_id}`](https://docs.digitalocean.com/reference/api/reference/functions/index.html.md#functionsAccessKey_update).

## Parameters

`namespace_id` string required

The ID of the namespace to be managed.

`key_id` string required

The ID of the access key to be managed.

`name` string required

Example: `updated-key-name`

The new name for the access key.

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "updated-key-name"
}

resp = client.functions_access_key.update(namespace_id="fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", key_id="dof-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", body=req)
```

## Response Example

## Show Response Example

```json
{
  "access_key": {
    "id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "name": "updated-key-name",
    "expires_at": "2026-12-19T10:30:00Z",
    "created_at": "2025-12-19T10:30:00Z",
    "updated_at": "2025-12-19T16:00:00Z"
  }
}
```

## More Information

See [`/v2/functions/namespaces/{namespace_id}/keys/{key_id}`](https://docs.digitalocean.com/reference/api/reference/functions/index.html.md#functionsAccessKey_update) in the API reference for additional detail on responses, headers, parameters, and more.