---
title: "Purchase Api Key"
method: POST
path: "/api/v1/apikey/purchase"
tags: ["apikey"]
---

# Purchase Api Key

`POST /api/v1/apikey/purchase`

Purchase an API Key product.

## Request body

- AppApiEndpointsApikeyPurchaseRequest — Purchase API Key request.
  - `product_id` integer, required — Product ID to purchase
  - `api_key_name` string — Custom name for the API key
  - `currency` string — Currency to use for purchase (CNY or USD)

## Response `200`

Successful Response

- AppApiEndpointsApikeyPurchaseResponse — Purchase response.
  - `success` boolean, required
  - `message` string, required
  - `api_key_id` integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/qcode/apis/qcode-web.md) · [All operations](https://skmtc.dev/qcode/apis/qcode-web/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qcode/qcode-web/revisions/2f2f5f49ffc7/schema)
