---
title: "Share a resource to user or user group"
method: PUT
path: "/restapi/json/v1/resources/{resourceId}/share"
tags: ["Resources"]
---

# Share a resource to user or user group

`PUT /restapi/json/v1/resources/{resourceId}/share`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/restapi/json/v1/resources/{resourceId}/share`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/restapi/json/v1/resources/:resourceId/share/put.ts> (a function with typed inputs; its response is checked against the schema)

Shares a specific resource with a user or user group by granting access privileges such as `view`, `modify`, or `fullaccess`.

## Path parameters

- `resourceId` integer, required

## Headers

- `orgName` string

## Request body `application/x-www-form-urlencoded`

- ShareResourceRequest
  - `INPUT_DATA` object: Share a resource with a user (USERID) or a user group (USERGROUPID). Provide one of the two — not both.
    - `operation` object
      - `Details` object
        - `ACCESSTYPE` 'view' | 'modify' | 'fullaccess' | 'revoke', required: Permission level to grant. Use `revoke` to remove access.
        - `USERID` integer: ID of the user to share the resource with. Use this OR USERGROUPID.
        - `USERGROUPID` integer: ID of the user group to share the resource with. Use this OR USERID.

## Response `200`

Resource shared

- ShareResourceResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `Details` object
      - `accessType` string
    - `name` string

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
