---
title: "Generate API key"
method: POST
path: "/admin/api_key"
tags: ["API Keys"]
---

# Generate API key

`POST /admin/api_key`

## Request body

- object
  - `project` string, required — The project Id associated with this key
  - `key_name` string, required — A human-readable identifier for this key. Needs to be unique per project.

## Response `200`

OK

- object
  - `key` string, required — The generated secret key (`sk_` token). This key cannot be retrieved after initial creation.

## Other responses

- `401` — Unauthorized if admin_key is incorrect.

---

[API](https://skmtc.net/devtari-io/apis/cronback-admin-api.md) · [All operations](https://skmtc.net/devtari-io/apis/cronback-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devtari-io/cronback-admin-api/versions/e05bc4ba19b4/schema)
