---
title: "Share an account to user or user group"
method: PUT
path: "/restapi/json/v1/resources/{resourceId}/accounts/{accountId}/share"
tags: ["Accounts"]
---

# Share an account to user or user group

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

## Request

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

Assigns access permissions to an account under a resource for a specific user or user group. Provide `USERID` or `USERGROUPID` in the request body.

## Path parameters

- `resourceId` integer, required
- `accountId` integer, required

## Headers

- `orgName` string

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

- AccountShareRequest
  - `INPUT_DATA` object: Share an account with a user or user group. Provide USERID or USERGROUPID.
    - `operation` object
      - `Details` object
        - `ACCESSTYPE` 'view' | 'modify' | 'fullaccess', required: Permission level to grant
        - `USERID` string: ID of the user to share the account with. Use this or USERGROUPID.
        - `USERGROUPID` string: ID of the user group to share the account with. Use this or USERID.

## Response `200`

Account shared

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