---
title: "create_api_key"
method: POST
path: "/tools/create_api_key"
tags: ["Account"]
---

# create_api_key

`POST /tools/create_api_key`

## Request

- Base URL: `https://compabase.com/api/mcp`
- URL: `https://compabase.com/api/mcp/tools/create_api_key`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Create a new REST API key (`cb_…`). The raw key is returned **once** and cannot be
retrieved later; store it securely.

**Does not consume quota.**

**Example prompts:** "Create a new API key called 'Analytics'."

**Parameters:** `name` (string, required, max 100 chars); human-readable label.

## Response `200`

Created key (raw_key shown once)

- object

---

[API](https://skmtc.dev/compabase/apis/compabase-mcp.md) · [All operations](https://skmtc.dev/compabase/apis/compabase-mcp/llms.txt) · [OpenAPI document](https://skmtc.dev/compabase/apis/compabase-mcp/revisions/43169ccbb0f7?raw)
