---
title: "Mint an API key; the secret is shown once"
method: POST
path: "/v1/app/keys"
---

# Mint an API key; the secret is shown once

`POST /v1/app/keys`

## Request

- Base URL: `https://api.octapi.app`
- URL: `https://api.octapi.app/v1/app/keys`
- Auth: HTTP bearer

## Request body

- object
  - `label` string, required
  - `role` 'agent' | 'admin'
  - `grants` string[], nullable
  - `scopes` string[]
  - `tools` string[], nullable
  - `hide_prices` boolean
  - `policy` object
    - `bookings` object
      - `lead_time_days` integer

## Response `200`

Default Response

- object
  - `id` string, required
  - `secret` string, required
  - `prefix` string, required

---

[API](https://skmtc.dev/octapi/apis/octapi-api.md) · [All operations](https://skmtc.dev/octapi/apis/octapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/octapi/apis/octapi-api/revisions/580afda787d2?raw)
