---
title: "Bulk share accounts to users or user groups"
method: PUT
path: "/restapi/json/v1/accounts/share"
tags: ["Accounts"]
---

# Bulk share accounts to users or user groups

`PUT /restapi/json/v1/accounts/share`

## Request

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

Shares one or more accounts with users or user groups with the desired access level. Provide `userIds` or `userGroupIds`.

## Headers

- `orgName` string

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

- BulkAccountShareRequest
  - `INPUT_DATA` object: Share multiple accounts with users or user groups in bulk. Provide userIds or userGroupIds.
    - `operation` object
      - `Details` object
        - `accountIds` string[], required: List of account IDs to share
        - `userIds` string[]: List of user IDs to share with. Use this or userGroupIds.
        - `userGroupIds` string[]: List of user group IDs to share with. Use this or userIds.
        - `accessType` 'view' | 'modify' | 'fullaccess' | 'revoke', required: Permission level to grant

## Response `200`

Accounts shared

- BulkAccountShareResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `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)
