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

## Changes

- **2026-09-04** `c7469ef15aa4` — 2 info
  - for the `query` request parameter `duration_minutes`, the max was increased from `525960.00` to `153722867.00`
  - the `duration_minutes` request property's max was increased from `525960.00` to `153722867.00`

[Change history](https://skmtc.dev/opal/apis/opal-api/changes/resources/:resource_id/users/:user_id/post.md)

---

[API](https://skmtc.dev/opal/apis/opal-api.md) · [All operations](https://skmtc.dev/opal/apis/opal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opal/apis/opal-api/revisions/530ef84d9785?raw)
