---
title: "Add accounts under a resource"
method: POST
path: "/restapi/json/v1/resources/{resourceId}/accounts"
tags: ["Accounts"]
---

# Add accounts under a resource

`POST /restapi/json/v1/resources/{resourceId}/accounts`

## Request

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

JSON with ACCOUNTLIST array. Each account: ACCOUNTNAME (required), PASSWORD,

Adds one or more accounts to a specific resource in PAM360. The request supports extensive configuration for account policies, session recording, password reset behaviors, and custom fields.

## Path parameters

- `resourceId` integer, required

## Headers

- `orgName` string

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

- CreateAccountsRequest
  - `operation` object
    - `Details` object
      - `ACCOUNTLIST` object[]: List of accounts to be created under the specified resource
        - `ACCOUNTNAME` string: Name of the account
        - `PASSWORD` string: Password for the account
        - `ACCOUNTPASSWORDPOLICY` string: Password policy to be applied for the account
        - `RECORD_RDP_SESSIONS` boolean: Enable RDP session recording
        - `RECORD_CLI_SESSIONS` boolean: Enable CLI session recording
        - `DISABLE_PASSWORD_RESETS` boolean: Disable password reset for the account
        - `CONFIGURE_PASSWORD_RESET` boolean: Enable configuration for password reset
        - `ACCOUNT_RESOURCE_GROUP_IDS` string[]: List of resource group IDs this account belongs to
        - `IIS_WEB_CONFIG_RESET` boolean: Enable IIS web config reset
        - `IIS_APP_POOL_RESTART` boolean: Enable IIS application pool restart
        - `IIS_APP_POOL_RESET` boolean: Enable IIS application pool reset
        - `SERVICES_RESTART` boolean: Restart services associated with the account
        - `SERVICES_RESET` boolean: Reset services associated with the account
        - `SCHEDULED_TASK_RESET` boolean: Reset scheduled tasks associated with the account
        - `NOTES` string: Notes related to the account
        - `TOTP_SECRET` string: TOTP secret key for the account
        - `TOTP_ALGORITHM` string: TOTP algorithm used (e.g., SHA1, SHA256)
        - `TOTP_DIGITS` string: Number of digits in the TOTP
        - `TOTP_VALIDITY` string: TOTP validity period in seconds
        - `WEBSITE_SESSION_RECORDING` boolean: Enable website session recording
        - `GATEWAY_SESSION_RECORDING` boolean: Enable gateway session recording
        - `SAP_USER_TYPE` 'A' | 'B' | 'C' | 'S' | 'L': SAP account category (v8500+). Values: A (Dialog), B (System), C (Communication), S (Service), L (Reference)
        - `ACCOUNTCUSTOMFIELD` object[]: List of custom fields for the account
          - `CUSTOMLABEL` string: Label for the custom field
          - `CUSTOMVALUE` string: Value for the custom field

## Response `200`

Accounts created

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