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

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

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

Adds a user to this resource.

## Path parameters

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

## Query parameters

- `duration_minutes` integer
- `access_level_remote_id` string

## Request body

- object
  - `duration_minutes` integer, required — The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite.
  - `access_level_remote_id` string — The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used.

## Response `200`

The ResourceUser that was created.

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