---
title: "Create Org Key Route"
method: POST
path: "/api/v1/orgs/{org_id}/keys"
tags: ["api-keys"]
---

# Create Org Key Route

`POST /api/v1/orgs/{org_id}/keys`

## Path parameters

- `org_id` string, required

## Headers

- `Authorization` string, nullable
- `X-Request-ID` string, nullable

## Request body

- OrgKeyCreate
  - `name` string, required
  - `expires_in_days` 30 | 60 | 90
  - `scopes` string[]

## Response `201`

Successful Response

- OrgKeyCreatedResponse
  - `key` string, required
  - `key_id` string, required
  - `name` string, nullable, required
  - `org_id` string, uuid, required
  - `expires_at` string, date-time, nullable
  - `scopes` string[]

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-25** `e63bfe8e38b4` — 3 breaking, 1 warning, 5 info
  - the request property `name` became required
  - request property `name` list-of-types was narrowed by removing types `null` from media type `application/json`
  - the `name` request property's minLength was increased from `0` to `1`
  - the `name` request property's maxLength was set to `255`
  - …5 more

[Change history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/orgs/:org_id/keys/post.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) · [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xenovia/controlplane/revisions/18ce94490752/schema)
