---
title: "Create Account Key Route"
method: POST
path: "/v1/me/accounts/{account_id}/keys"
---

# Create Account Key Route

`POST /v1/me/accounts/{account_id}/keys`

## Request

- Base URL: `https://api.quantradin.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.quantradin.com/v1/me/accounts/{account_id}/keys`
- Auth: none declared

Generate a fresh key pair for one of the caller's own desks and return
{key_id, secret} — the SECRET is shown ONCE and is never retrievable again.
Revokes any prior active pair for this account. 403 if not the caller's desk.

Optional ``capabilities`` (agentic-hardening control 1): a preset name
(``read_only`` | ``backtest_only`` | ``deploy_allowed``) or a list of preset
/ atomic (read|backtest|deploy) tokens, scoping the new pair. Omitted / null
mints an UNRESTRICTED (full-scope) pair — the legacy default, no breakage.

## Path parameters

- `account_id` integer, required

## Request body

- AccountKeyCreateRequest: POST /v1/me/accounts/{id}/keys — optional capability scope for a new pair. ``capabilities`` may be a preset name (``read_only`` | ``backtest_only`` | ``deploy_allowed``), a list of preset / atomic (read|backtest|deploy) tokens, or null (an UNRESTRICTED full-scope pair — the legacy default). Unknown tokens are a 400.
  - `capabilities` union
    - string
    - string[]

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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