---
title: "Create a scoped API key (shown once; stored as a SHA-256)"
method: POST
path: "/api/keys"
---

# Create a scoped API key (shown once; stored as a SHA-256)

`POST /api/keys`

## Request

- Base URL: `https://crawlcheck.io`
- URL: `https://crawlcheck.io/api/keys`
- Auth: one of:
  - API key in header `x-crawlcheck-key`
  - HTTP bearer

## Headers

- `x-crawlcheck-key` string, required

## Request body

- object
  - `name` string
  - `scopes` string[]
  - `domains` string[]
  - `days` integer

## Response `201`

key, id, scopes, domains, expires

- object, nullable
  - `ok` boolean, nullable
  - `key` string, nullable
  - `id` string, nullable
  - `name` string, nullable
  - `scopes` string[], nullable
  - `domains` string[], nullable
  - `expires` string, nullable
  - `note` string, nullable

## Other responses

- `400`: No usable scope
- `401`: No valid licence key
- `403`: Domain not on the licence
- `409`: Twenty-key limit reached

---

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