---
title: "Manage the associations of a Password Manager Item"
method: POST
path: "/api/v2/passwordmanageritems/{passwordmanageritem_id}/associations"
tags: ["Graph", "PasswordManagerItem"]
---

# Manage the associations of a Password Manager Item

`POST /api/v2/passwordmanageritems/{passwordmanageritem_id}/associations`

## Request

- Base URL: `https://console.jumpcloud.com`
- URL: `https://console.jumpcloud.com/api/v2/passwordmanageritems/{passwordmanageritem_id}/associations`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/docs/api/v2/passwordmanageritems/:passwordmanageritem_id/associations/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint manages the _direct_ associations of a Password Manager Item.

A direct association can be a non-homogeneous relationship between 2 different objects, for example a Password Manager Item and Users.

#### Sample Request
```
curl -X POST https://console.jumpcloud.com/api/v2/passwordmanageritems/{passwordmanageritem_id}/associations?targets=user \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}'
  -d '{"type":"user", "id":"{USER_ID}", "op":"add"}'
```

## Headers

- `x-org-id` string

## Request body

- GraphOperationPasswordManagerItem
  - `id` string, required: The ObjectID of graph object being added or removed as an association.
  - `op` 'add' | 'remove' | 'update', required: How to modify the graph connection.
  - `attributes` GraphAttributes, nullable: The graph attributes.
  - `type` 'user' | 'user_group' | 'command', required: Targets which an "password_manager_item" can be associated to.

## Response `204`

OK

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-console-api/revisions/f396d9271b46?raw)
