---
title: "PUT /resources/{resource_id}/users/{user_id}"
method: PUT
path: "/resources/{resource_id}/users/{user_id}"
tags: ["resources"]
---

# PUT /resources/{resource_id}/users/{user_id}

`PUT /resources/{resource_id}/users/{user_id}`

Updates a user's access level or duration on this resource.

## Path parameters

- `resource_id` string, uuid, required
- `user_id` string, uuid, required

## Request body

- object
  - `duration_minutes` integer, required — The updated duration for which the resource can be accessed (in minutes). Use 0 for indefinite.
  - `access_level_remote_id` string — The updated remote ID of the access level granted to this user.

## Response `200`

The ResourceUser was successfully updated.

- ResourceUser — # Resource User Object ### Description The `ResourceUser` object is used to represent a user with direct access to a resource.
  - `resource_id` string, uuid, required — The ID of the resource.
  - `user_id` string, uuid, required — The ID of the user.
  - `access_level` ResourceAccessLevel, required — # Access Level Object ### Description The `AccessLevel` object is used to represent the level of access that a principal has. The "default" access level is a `AccessLevel` object whose fields are all empty strings. ### Usage Example View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource.
    - `access_level_name` string, required — The human-readable name of the access level.
    - `access_level_remote_id` string, required — The machine-readable identifier of the access level.
  - `full_name` string, required — The user's full name.
  - `email` string, required — The user's email.
  - `expiration_date` string, date-time, nullable — The day and time the user's access will expire.

---

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