---
title: "Create a scoped expiring key"
method: POST
path: "/api/v1/keys"
tags: ["Keys"]
---

# Create a scoped expiring key

`POST /api/v1/keys`

## Request

- Base URL: `https://xcatcher.top`
- URL: `https://xcatcher.top/api/v1/keys`
- Auth: HTTP bearer

## Request body

- KeyCreate
  - `name` string
  - `scopes` string[]
  - `expires_in_days` integer

## Response `201`

New key secret shown once

- AnyJson

## Other responses

- `409`: Active-key limit reached

---

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