---
title: "Assign AccessControlPolicies to a user for secret or directory"
method: POST
path: "/secrets/access_policies"
tags: ["secrets"]
---

# Assign AccessControlPolicies to a user for secret or directory

`POST /secrets/access_policies`

"Assign AccessControlPolicies to a user for secret or directory"

## Request body

- SecretsPolicyInformation — Information about ACPs for secret and secret directories
  - `role_name` string, required — Name of the role to which ACP is assigned
  - `secrets_information_list` SecretsDetails[], required
    - `path` string, required — Path for secret or secret directory
    - `type` string, required — Type of the path
  - `account_name_list` string[], required — List of accounts who need to have the ACPs assigned
  - `policy_name` string, required — Name for the policy to be created

## Response `200`

Success

- SecretsPolicyResponse — Details of the policy which was created.
  - `access_control_policy_reference` AccessControlPolicyReference — The reference to a access_control_policy
    - `kind` string, required — The kind name
    - `name` string
    - `uuid` string, UUID, required
  - `role_reference` RoleReference — The reference to a role
    - `kind` string, required — The kind name
    - `name` string
    - `uuid` string, UUID, required

## Other responses

- `default` — Internal Error

---

[API](https://skmtc.net/nutanix/apis/nutanix-intentful-api.md) · [All operations](https://skmtc.net/nutanix/apis/nutanix-intentful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nutanix/nutanix-intentful-api/revisions/40395083ab31/schema)
