---
title: "Update Spaces Access Keys"
method: PUT
path: "/v2/spaces/keys/{access_key}"
tags: ["DigitalOcean-public.v2-new_Spaces Keys"]
---

# Update Spaces Access Keys

`PUT /v2/spaces/keys/{access_key}`

To update Spaces Access Key, send a PUT or PATCH request to `/v2/spaces/keys/$ACCESS_KEY`. At the moment, you cannot convert a
fullaccess key to a scoped key or vice versa. You can only update the name of the key.

## Path parameters

- `access_key` string, required

## Request body

- Key
  - `name` string — The access key's name.
  - `grants` Grant[] — The list of permissions for the access key.
    - `bucket` string, required — The name of the bucket.
    - `permission` string, required — The permission to grant to the user. Possible values are `read`, `readwrite`, `fullaccess`, or an empty string.
  - `access_key` string — The Access Key ID used to access a bucket.
  - `created_at` string, date-time — The date and time the key was created.

## Response `200`

The response will be a JSON object

- object
  - `key` Key
    - `name` string — The access key's name.
    - `grants` Grant[] — The list of permissions for the access key.
      - `bucket` string, required — The name of the bucket.
      - `permission` string, required — The permission to grant to the user. Possible values are `read`, `readwrite`, `fullaccess`, or an empty string.
    - `access_key` string — The Access Key ID used to access a bucket.
    - `created_at` string, date-time — The date and time the key was created.

## Other responses

- `400` — Cannot mix fullaccess permission with scoped permissions
- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
