---
title: "Create API Key"
method: POST
path: "/api_keys"
tags: ["api-keys"]
---

# Create API Key

`POST /api_keys`

Endpoint for creating a new API key with a user-provided public key.  This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests.

## Request body

- CreateApiKeyRequest
  - `name` string, required — Name for the API key. This helps identify the key's purpose
  - `public_key` string, required — RSA public key in PEM format. This will be used to verify signatures on API requests
  - `scopes` ApiKeyScope[] — List of scopes to grant to the API key. If the broad `write` parent scope is included, `read` must also be included. Child scopes may be granted without the broad parent scope. Defaults to full access (`read`, `write`) if not provided.
  - `subaccount` integer — If set, restricts the API key to a single sub-account (0-63) that you own. A restricted key may only read and trade on that sub-account; it cannot act on other sub-accounts, transfer funds between sub-accounts, or create sub-accounts. Omit to leave the key unrestricted. Mutually exclusive with fcm_subtrader_id.
  - `fcm_subtrader_id` string — FCM members only. If set, binds the API key to a single FCM subtrader that you own, spelled {your_user_id}_{suffix} with a suffix of 1-16 lowercase alphanumeric characters. The subtrader must already exist. A bound key is the institution's trading credential for that subtrader - FIX order-entry and market-data sessions, plus margin WebSocket sessions scoped to the subtrader's own data - and is denied on every REST endpoint, including key management. Mutually exclusive with subaccount.

## Response `201`

API key created successfully

- CreateApiKeyResponse
  - `api_key_id` string, required — Unique identifier for the newly created API key
  - `warning` string, nullable — Present only when the minted key is bound to an FCM subtrader that has no initial-margin cap at any scope. The mint still succeeds; once SMA enforcement is enabled, the subtrader's orders will be rejected until a cap is set.

## Other responses

- `400` — Bad request - invalid input
- `401` — Unauthorized
- `403` — Forbidden - insufficient API usage level, or fcm_subtrader_id from a non-FCM caller
- `409` — Conflict - the bound FCM subtrader is not yet visible in the credential registry; retry after the subtrader create propagates
- `500` — Internal server error

## Changes

- **2026-08-31** `2093c418fb5d` — 3 info
  - added the new optional request property `fcm_subtrader_id`
  - added the non-success response with the status `409`
  - added the optional property `warning` to the response with the `201` status

[Change history](https://skmtc.dev/kalshi/apis/kalshi-trade-api-manual-endpoints/changes/api_keys/post.md)

---

[API](https://skmtc.dev/kalshi/apis/kalshi-trade-api-manual-endpoints.md) · [All operations](https://skmtc.dev/kalshi/apis/kalshi-trade-api-manual-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kalshi/kalshi-trade-api-manual-endpoints/revisions/75d99f2579b8/schema)
