---
title: "Create an API key"
method: POST
path: "/v1/account/keys"
---

# Create an API key

`POST /v1/account/keys`

## Request

- Base URL: `https://api.stackresolve.dev`
- URL: `https://api.stackresolve.dev/v1/account/keys`
- Auth: API key in header `x-api-key`

Mint a new API key for the authenticated workspace. The raw key is returned once. This is how an agent provisions its own credential.

## Request body

- object
  - `label` string

## Response `200`

OK

- ApiKey
  - `key` string: The raw key, returned once
  - `id` string

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `429`: Rate limited; retry after the Retry-After header

---

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