# UpdateAccessKeyRequest

**user_id** stringrequired

ID of the user for whom the access key is being updated

**id** stringrequired

Access key ID

**user_role** OrgMembership

Role of the user in the organization. Controls what the user can do through the Partner API management endpoints.

- `Admin`: Full org access. Can list and manage all access keys in the org, update org settings, and manage users. ListAccessKeys returns all keys in the org.
- `Member`: Standard access. Can only manage their own access keys. ListAccessKeys returns only keys owned by this user.

If omitted, defaults to `Member` behavior.

**Possible values:** [`Admin`, `Member`]

**buckets_roles**object[]

Array [

**bucket_name** stringrequired

Name of the bucket

**role** stringrequired

The role defines the permissions for the associated bucket:

- `ReadOnly`: Read-only access to the bucket. Permits read operations like GetObject, HeadObject, ListObjects.
- `Editor`: Read and write access to the bucket. Includes everything in ReadOnly, plus PutObject, DeleteObject, and bucket configuration operations.
- `Admin`: Full access to all buckets in the org, bypasses all permission checks. When used with `bucket_name: "*"`, the access key is treated as a full org admin. The value of `bucket_name` should always be `*` when using this role.

Example:

```json
{
  "bucket_name": "*",
  "role": "Admin"
}
```

**Possible values:** [`ReadOnly`, `Editor`, `Admin`]

]

**add_policies** string[]

Names of IAM policies to attach to this access key. Policies already attached are ignored. Can be combined with `remove_policies` in the same request — removals are applied first.

**remove_policies** string[]

Names of IAM policies to detach from this access key. Policies not currently attached are ignored.

**access_key_scope** AccessKeyScope

Omitting this field leaves the key's current scope unchanged.

**Possible values:** [`standard`, `no_default_allow`]

```json
{

"user_id": "string",

"id": "string",

"user_role": "Admin",

"buckets_roles": [

{

"bucket_name": "string",

"role": "ReadOnly"

}

],

"add_policies": [

"string"

],

"remove_policies": [

"string"

],

"access_key_scope": "standard"

}
```
