---
title: "POST /policy-create-keys"
method: POST
path: "/policy-create-keys"
tags: ["v2"]
---

# POST /policy-create-keys

`POST /policy-create-keys`

## Request body

- PolicyCreateKeys
  - `allowed-algorithms` string[] — Specify allowed key algorithms (e.g., [RSA2048,AES128GCM])
  - `allowed-key-names` string[] — Specify allowed protection key names. To enforce using the account's default protection key, use 'default-account-key'
  - `allowed-key-types` string[] — Specify allowed key protection types (dfc, classic-key)
  - `json` boolean — Set output format to JSON
  - `max-rotation-interval-days` integer — Set the maximum rotation interval for automatic key rotation.
  - `object-types` string[] — The object types this policy will apply to (items, targets). If not provided, defaults to [items, targets].
  - `path` string, required — The path the policy refers to
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication

## Response `201`

- PoliciesCreateOutput
  - `id` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
