---
title: "Create Api Key"
method: POST
path: "/external-api-keys/"
tags: ["external-api-keys"]
---

# Create Api Key

`POST /external-api-keys/`

Create a new external API key. Returns the plaintext key once — store it securely.

## Query parameters

- `org_name` string, required

## Response `200`

Successful Response

- CreateApiKeyResponse
  - `key_id` string, required
  - `org_name` string, required
  - `key_prefix` string, required
  - `is_active` boolean, required
  - `created_at` string, date-time, nullable
  - `plaintext_key` string, required

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/trytrata/apis/fastapi.md) · [All operations](https://skmtc.dev/trytrata/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trytrata/fastapi/revisions/89fec75ff598/schema)
