---
title: App Assignments API
path: reference/api/app-assignments
status: published
---

# App Assignments API

Reference for the `App Assignments` endpoint group — 9 endpoints.

Generated from the live OpenAPI spec. Re-run `_generate_api_reference.py` after backend changes.

## Authentication

All endpoints require a Bearer JWT in the `Authorization` header unless noted otherwise. See [Concepts → Tokens and scopes](/docs/scaikey/concepts/tokens-and-scopes) and [Reference → OAuth endpoints](/docs/scaikey/reference/oauth-endpoints) for how to obtain one.

## Endpoints

### **GET** `/api/v1/tenants/{tenant_id}/applications/{application_id}/assignees`

_Get Application Assignees_

Get all users and groups assigned to an application.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `application_id` | path | yes | `string` |  |

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → [`ApiResponse_ApplicationAssigneesResponse_`](#schema-apiresponse-applicationassigneesresponse) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **GET** `/api/v1/tenants/{tenant_id}/applications/{application_id}/effective-users`

_Get Application Effective Users_

Get all users who have access to an application.

This includes both directly assigned users and users who have access via group membership.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `application_id` | path | yes | `string` |  |
| `page` | query | no | `integer` |  |
| `per_page` | query | no | `integer` |  |

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → [`PaginatedResponse_dict_`](#schema-paginatedresponse-dict) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **GET** `/api/v1/tenants/{tenant_id}/groups/{group_id}/applications`

_Get Group Applications_

Get all applications assigned to a group.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `group_id` | path | yes | `string` |  |

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → [`ApiResponse_list_AppAssignment__`](#schema-apiresponse-list-appassignment) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **POST** `/api/v1/tenants/{tenant_id}/groups/{group_id}/applications`

_Assign Application To Group_

Assign an application to a group.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `group_id` | path | yes | `string` |  |

**Request body:**

Required.

- `application/json` → [`AssignmentCreate`](#schema-assignmentcreate)

**Responses:**

| Status | Body |
|---|---|
| `201` | `application/json` → [`ApiResponse_dict_`](#schema-apiresponse-dict) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **DELETE** `/api/v1/tenants/{tenant_id}/groups/{group_id}/applications/{application_id}`

_Unassign Application From Group_

Remove an application assignment from a group.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `group_id` | path | yes | `string` |  |
| `application_id` | path | yes | `string` |  |

**Responses:**

| Status | Body |
|---|---|
| `204` | Successful Response |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **GET** `/api/v1/tenants/{tenant_id}/users/{user_id}/applications`

_Get User Applications_

Get all applications assigned to a user.

Returns both directly assigned applications and those assigned via group membership.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `user_id` | path | yes | `string` |  |
| `include_group_assignments` | query | no | `boolean` | Include apps assigned via groups |

**Responses:**

| Status | Body |
|---|---|
| `200` | `application/json` → [`ApiResponse_UserAssignedAppsResponse_`](#schema-apiresponse-userassignedappsresponse) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **POST** `/api/v1/tenants/{tenant_id}/users/{user_id}/applications`

_Assign Application To User_

Assign an application to a user.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `user_id` | path | yes | `string` |  |

**Request body:**

Required.

- `application/json` → [`AssignmentCreate`](#schema-assignmentcreate)

**Responses:**

| Status | Body |
|---|---|
| `201` | `application/json` → [`ApiResponse_dict_`](#schema-apiresponse-dict) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **POST** `/api/v1/tenants/{tenant_id}/users/{user_id}/applications/bulk`

_Bulk Assign Applications To User_

Assign multiple applications to a user at once.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `user_id` | path | yes | `string` |  |

**Request body:**

Required.

- `application/json` → [`BulkAssignmentCreate`](#schema-bulkassignmentcreate)

**Responses:**

| Status | Body |
|---|---|
| `201` | `application/json` → [`ApiResponse_dict_`](#schema-apiresponse-dict) |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

### **DELETE** `/api/v1/tenants/{tenant_id}/users/{user_id}/applications/{application_id}`

_Unassign Application From User_

Remove an application assignment from a user.

**Parameters:**

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `tenant_id` | path | yes | `string` |  |
| `user_id` | path | yes | `string` |  |
| `application_id` | path | yes | `string` |  |

**Responses:**

| Status | Body |
|---|---|
| `204` | Successful Response |
| `422` | `application/json` → [`HTTPValidationError`](#schema-httpvalidationerror) |

---

## Schemas

Definitions for every type referenced by the endpoints above. Schema-to-schema references on this page link within the page; cross-page references would require visiting the linked page.

### `ApiResponse_ApplicationAssigneesResponse_`

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | [`ApplicationAssigneesResponse`](#schema-applicationassigneesresponse) | yes |  |
| `meta` | [`MetaResponse`](#schema-metaresponse) | no |  |

### `ApiResponse_UserAssignedAppsResponse_`

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | [`UserAssignedAppsResponse`](#schema-userassignedappsresponse) | yes |  |
| `meta` | [`MetaResponse`](#schema-metaresponse) | no |  |

### `ApiResponse_dict_`

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes |  |
| `meta` | [`MetaResponse`](#schema-metaresponse) | no |  |

### `ApiResponse_list_AppAssignment__`

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | array of [`AppAssignment`](#schema-appassignment) | yes |  |
| `meta` | [`MetaResponse`](#schema-metaresponse) | no |  |

### `AppAssignment`

Application assignment.

| Field | Type | Required | Description |
|---|---|---|---|
| `application_id` | `string` | yes |  |
| `application_name` | `string` | yes |  |
| `application_client_id` | `string` | yes |  |
| `assigned_at` | `string` (`date-time`) | yes |  |
| `assignment_type` | `string` | yes |  |
| `assigned_via` | `string` \| `null` | no |  |

### `ApplicationAssigneesResponse`

Application's assignees response.

| Field | Type | Required | Description |
|---|---|---|---|
| `application_id` | `string` | yes |  |
| `users` | array of `string` | yes |  |
| `groups` | array of `string` | yes |  |
| `total_users` | `integer` | yes |  |
| `total_groups` | `integer` | yes |  |

### `AssignmentCreate`

Request to create an assignment.

| Field | Type | Required | Description |
|---|---|---|---|
| `application_id` | `string` | yes |  |

### `BulkAssignmentCreate`

Request to create multiple assignments.

| Field | Type | Required | Description |
|---|---|---|---|
| `application_ids` | array of `string` | yes |  |

### `HTTPValidationError`

| Field | Type | Required | Description |
|---|---|---|---|
| `detail` | array of [`ValidationError`](#schema-validationerror) | no |  |

### `MetaResponse`

Metadata included in API responses.

| Field | Type | Required | Description |
|---|---|---|---|
| `request_id` | `string` \| `null` | no |  |
| `timestamp` | `string` (`date-time`) | no |  |

### `PaginatedResponse_dict_`

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | array of object | yes |  |
| `pagination` | [`PaginationMeta`](#schema-paginationmeta) | yes |  |
| `meta` | [`MetaResponse`](#schema-metaresponse) | no |  |

### `PaginationMeta`

Pagination metadata.

| Field | Type | Required | Description |
|---|---|---|---|
| `page` | `integer` | yes |  |
| `per_page` | `integer` | yes |  |
| `total_items` | `integer` | yes |  |
| `total_pages` | `integer` | yes |  |

### `UserAssignedAppsResponse`

User's assigned applications response.

| Field | Type | Required | Description |
|---|---|---|---|
| `user_id` | `string` | yes |  |
| `applications` | array of [`AppAssignment`](#schema-appassignment) | yes |  |
| `total_count` | `integer` | yes |  |

### `ValidationError`

| Field | Type | Required | Description |
|---|---|---|---|
| `loc` | array of `string` \| `integer` | yes |  |
| `msg` | `string` | yes |  |
| `type` | `string` | yes |  |
