---
title: "Create policy"
method: POST
path: "/policy/create"
tags: ["Policy"]
---

# Create policy

`POST /policy/create`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/policy/create`
- Auth: HTTP bearer

## Request body

- object: Blueprint properties
  - `alias` string, nullable: The unique alias for the instance
  - `name` string: The associated name
  - `description` string: The associated description
  - `meta` Meta: Meta data information
  - `blueprintId` string, nullable: The ID of the blueprint
  - `botId` string: The ID of the bot this policy applies to. When omitted the policy is global and applies to every bot.
  - `type` 'retention' | 'usage', required: The policy type
  - `state` 'enabled' | 'disabled': The lifecycle state of a resource - toggle it on/off without deleting it
  - `config` object: The policy configuration as JSON

## Response `200`

The policy was created successfully

- object
  - `id` string, required: The ID of the created policy

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
