---
title: "Manage the associations of an Application"
method: POST
path: "/api/v2/applications/{application_id}/associations"
tags: ["Graph", "Applications"]
---

# Manage the associations of an Application

`POST /api/v2/applications/{application_id}/associations`

## Request

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

This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogeneous relationship between 2 different objects, for example Application and User Groups.

#### Sample Request
```
curl -X POST 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations' \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
    "op": "add",
    "type": "user_group",
    "id": "{Group_ID}"
  }'
```

## Headers

- `x-org-id` string

## Request body

- GraphOperationApplication
  - `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` 'agent_group' | 'user' | 'user_group', required: Targets which a "application" 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)
