---
title: "POST /v1/api-keys"
method: POST
path: "/v1/api-keys"
---

# POST /v1/api-keys

`POST /v1/api-keys`

Create a new API key for the current organization

## Request body

- union
  - object
  - CreateAPIKeyParams
    - `description` string
    - `expiresAt` string
    - `name` string, required
    - `scope` string, required

## Response `200`

OK

- CreateAPIKeySuccessResponse
  - `code` integer
  - `data` CreateAPIKeyData
    - `createdAt` string
    - `description` string
    - `expiresAt` string
    - `id` string
    - `key` string — Key is the full plaintext API key, shown only once. Store it securely.
    - `keyPrefix` string
    - `lastUsedAt` string
    - `name` string
    - `organizationId` string
    - `revokedAt` string
    - `scope` 'read' | 'read-write'
    - `userId` string
  - `message` string
  - `requestId` string

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/b3-fun/apis/b3os-workflow-api.md) · [All operations](https://skmtc.net/b3-fun/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/b3-fun/b3os-workflow-api/versions/5a750a5a9596/schema)
