---
title: "Create Application Policy"
method: POST
path: "/governance-service/api/ai/application/{app_id}/policy"
tags: ["AI Application Policy Management"]
---

# Create Application Policy

`POST /governance-service/api/ai/application/{app_id}/policy`

Create a new AI application policy.

## Path parameters

- `app_id` integer, required

## Request body

- AIApplicationPolicyViewInput — A model representing an AI application policy. Inherits from: BaseView: The base model containing common fields. Attributes: name (str): The name of the AI application policy. description (str): The description of the AI application policy. users (List[str]): The users associated with the AI application policy. groups (List[str]): The groups associated with the AI application policy. roles (List[str]): The roles associated with the AI application policy. tags (List[str]): The list of tags associated with the AI application policy. prompt (PermissionType): The prompt associated with the AI application policy. reply (PermissionType): The reply associated with the AI application policy. enriched_prompt (PermissionType): The enriched prompt associated with the AI application policy. application_id (int): The application id associated with the AI application policy.
  - `id` integer, nullable — The unique identifier of the resource
  - `status` integer, nullable — The status of the resource
  - `createTime` string, date-time, nullable — The creation time of the resource
  - `updateTime` string, date-time, nullable — The last update time of the resource
  - `name` string, nullable — The name of the AI application policy
  - `description` string, required — The description of the AI application policy
  - `users` string[], required — The users associated with the AI application policy
  - `groups` string[], required — The groups associated with the AI application policy
  - `roles` string[], required — The roles associated with the AI application policy
  - `tags` string[], required — The list of tags associated with the AI application policy
  - `prompt` 'ALLOW' | 'DENY' | 'REDACT', required
  - `reply` 'ALLOW' | 'DENY' | 'REDACT', required
  - `enrichedPrompt` 'ALLOW' | 'DENY' | 'REDACT', required
  - `applicationId` integer — The application id associated with the AI application policy

## Response `200`

Successful Response

- AIApplicationPolicyViewOutput — A model representing an AI application policy. Inherits from: BaseView: The base model containing common fields. Attributes: name (str): The name of the AI application policy. description (str): The description of the AI application policy. users (List[str]): The users associated with the AI application policy. groups (List[str]): The groups associated with the AI application policy. roles (List[str]): The roles associated with the AI application policy. tags (List[str]): The list of tags associated with the AI application policy. prompt (PermissionType): The prompt associated with the AI application policy. reply (PermissionType): The reply associated with the AI application policy. enriched_prompt (PermissionType): The enriched prompt associated with the AI application policy. application_id (int): The application id associated with the AI application policy.
  - `id` integer, nullable — The unique identifier of the resource
  - `status` integer, nullable — The status of the resource
  - `createTime` string — The creation time of the resource
  - `updateTime` string — The last update time of the resource
  - `name` string, nullable — The name of the AI application policy
  - `description` string, required — The description of the AI application policy
  - `users` string[], required — The users associated with the AI application policy
  - `groups` string[], required — The groups associated with the AI application policy
  - `roles` string[], required — The roles associated with the AI application policy
  - `tags` string[], required — The list of tags associated with the AI application policy
  - `prompt` 'ALLOW' | 'DENY' | 'REDACT', required
  - `reply` 'ALLOW' | 'DENY' | 'REDACT', required
  - `enrichedPrompt` 'ALLOW' | 'DENY' | 'REDACT', required
  - `applicationId` integer — The application id associated with the AI application policy

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/privacera/apis/paig-server.md) · [All operations](https://skmtc.net/privacera/apis/paig-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/privacera/paig-server/versions/e3d2c30ceace/schema)
