---
title: "POST /assoc-target-item"
method: POST
path: "/assoc-target-item"
tags: ["v2"]
---

# POST /assoc-target-item

`POST /assoc-target-item`

## Request body

- AssocTargetItem — assocTargetItem is a command that creates an association between target and item.
  - `certificate-path` string — A path on the target to store the certificate pem file (relevant only for certificate provisioning)
  - `chain-path` string — A path on the target to store the full chain pem file (relevant only for certificate provisioning)
  - `disable-previous-key-version` boolean — Automatically disable previous key version (required for azure targets)
  - `external-key-name` string — The external key name to associate with the classic key (Relevant only for Classic Key AWS/Azure/GCP targets)
  - `json` boolean — Set output format to JSON
  - `key-operations` string[] — A list of allowed operations for the key (required for azure targets)
  - `keyring-name` string — Keyring name of the GCP KMS (required for gcp targets)
  - `kms-algorithm` string — Algorithm of the key in GCP KMS (required for gcp targets)
  - `location-id` string — Location id of the GCP KMS (required for gcp targets)
  - `multi-region` string — Set to 'true' to create a multi-region managed key. (Relevant only for Classic Key AWS targets)
  - `name` string, required — The item to associate
  - `post-provision-command` string — A custom command to run on the remote target after successful provisioning (relevant only for certificate provisioning)
  - `private-key-path` string — A path on the target to store the private key (relevant only for certificate provisioning)
  - `project-id` string — Project id of the GCP KMS (required for gcp targets)
  - `protection-level` string — Protection level of the key [software/hardware] (relevant for gcp targets)
  - `purpose` string — Purpose of the key in GCP KMS (required for gcp targets)
  - `regions` string[] — The list of regions to create a copy of the key in (relevant for aws targets)
  - `sra-association` boolean — Is the target to associate is for sra, relevant only for linked target association for ldap rotated secret
  - `target-name` string, required — The target to associate
  - `tenant-secret-type` string — The tenant secret type [Data/SearchIndex/Analytics] (required for salesforce targets)
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication
  - `vault-name` string — Name of the vault used (required for azure targets)

## Response `200`

assocTargetItemResponse wraps response body.

- CreateTargetItemAssocOutput — CreateTargetItemAssocOutput defines output of CreateTargetItemAssoc operation.
  - `assoc_id` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
