---
title: "Purchase Api Key"
method: POST
path: "/v1/purchase-key"
---

# Purchase Api Key

`POST /v1/purchase-key`

## Request

- Base URL: `https://www.polytranslator.com/api`
- URL: `https://www.polytranslator.com/api/v1/purchase-key`
- Auth: HTTP bearer

## Request body

- PurchaseApiKeyRequest
  - `expected_user_id` string, uuid, nullable
  - `pack_id` 'credits_300' | 'credits_1000' | 'credits_2000' | 'credits_5000' | 'credits_25000', required
  - `idempotency_key` string, uuid, required
  - `payment_token` string, password, required
  - `payment_method` unknown
  - `email` string, email, required
  - `name` string

## Response `200`

Successful Response

- PurchaseApiKeyResponse
  - `account_id` string, uuid, required
  - `email` string, required
  - `key` string, required
  - `key_id` string, uuid, required
  - `key_prefix` string, required
  - `can_manage_billing` boolean, required
  - `balance_credits` integer, required
  - `purchase` ApiPurchaseResponse, required
    - `purchase_id` string, uuid, required
    - `status` string, required
    - `checkout_url` string, nullable
    - `credits` integer, required
    - `price_cents` integer, required
    - `currency` string, required
    - `credits_granted` boolean, required
    - `payment_intent_id` string, nullable
    - `client_secret` string, nullable
    - `action_url` string, nullable
    - `action_type` string, nullable
    - `failure_reason` string, nullable

## Other responses

- `422`: Validation Error

---

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