---
title: "Create an API key"
method: POST
path: "/api/api-keys"
tags: ["API keys"]
---

# Create an API key

`POST /api/api-keys`

Creates a new scoped key for trusted integrations and MCP clients. This endpoint accepts web session tokens only; API keys cannot create other API keys. The plaintext `bp_` key is returned once; store it immediately.

## Request body

- object
  - `name` string, required
  - `scopes` ApiKeyScope[] — Scopes granted to the new key. Send explicit least-privilege scopes for API-created keys.

## Response `200`

Created API key including one-time plaintext key.

- ApiKeyCreated
  - `id` string, uuid
  - `name` string
  - `scopes` ApiKeyScope[]
  - `createdAt` string, date-time
  - `lastUsedAt` string, date-time, nullable
  - `revokedAt` string, date-time, nullable
  - `key` string

## Other responses

- `401` — Missing, invalid, revoked, or expired credentials.
- `403` — Credential is valid but cannot perform this action.

---

[API](https://skmtc.net/carboncopyinc/apis/blueprints-api.md) · [All operations](https://skmtc.net/carboncopyinc/apis/blueprints-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/carboncopyinc/blueprints-api/revisions/821dba6e3373/schema)
