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

# Create an API key

`POST /api/api-keys`

## Request

- Base URL: `https://api.seenpaid.com`
- URL: `https://api.seenpaid.com/api/api-keys`
- Auth: HTTP bearer

Create a new API key. The plaintext `secret` (sp_...) is returned exactly once, at creation — store it immediately.

## Request body

- object
  - `name` string

## Response `201`

Created

- object
  - `success` true
  - `data` object
    - `id` string
    - `name` string
    - `secret` string: Shown only in this response.

## Other responses

- `401`: Missing or invalid credential (API key or OAuth token).

---

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