> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kalshi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Subtrader-Bound API Key

> FCM clearing members only. Mint an API key bound to one of your margin subtraders using an RSA or Ed25519 public key you supply. The binding is set at mint and immutable; the resulting key is the institution's trading credential for that subtrader and cannot reach any REST endpoint, including key management.



## OpenAPI

````yaml /perps_scm_openapi.yaml post /fcm/margin/api_keys
openapi: 3.0.0
info:
  title: Kalshi Clearing Member API
  version: 0.0.1
  description: >
    Klear API endpoints available to clearing members —

    institutional users who clear margin activity directly with

    Kalshi.


    ## Authentication


    All endpoints require an admin access token passed in the `Authorization`
    header:


    `Authorization: Bearer <admin_user_id>:<access_token>`


    To generate an access token and obtain your admin user id, sign in at

    https://klearing.kalshi.com, and navigate to the "Security" page.


    If you are in the process of onboarding to be a clearing member,

    please contact your contact at Kalshi for credentials. Otherwise,

    please contact institutional@kalshi.com.
servers:
  - url: https://api.klear.kalshi.com/klear-api/v1
    description: Production
  - url: https://demo-api.kalshi.co/klear-api/v1
    description: Demo
security:
  - kalshiBearer: []
paths:
  /fcm/margin/api_keys:
    post:
      summary: Create Subtrader-Bound API Key
      description: >-
        FCM clearing members only. Mint an API key bound to one of your margin
        subtraders using an RSA or Ed25519 public key you supply. The binding is
        set at mint and immutable; the resulting key is the institution's
        trading credential for that subtrader and cannot reach any REST
        endpoint, including key management.
      operationId: CreateMarginFcmApiKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMarginFcmApiKeyRequest'
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMarginFcmApiKeyResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '409':
          description: >-
            The bound subtrader is not yet visible in the credential registry,
            which updates asynchronously. Retry shortly after creating the
            subtrader.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateMarginFcmApiKeyRequest:
      type: object
      required:
        - name
        - public_key
        - fcm_subtrader_id
      properties:
        name:
          type: string
          description: >-
            Name identifying the key's purpose, e.g. the institution it is
            issued to.
        public_key:
          type: string
          description: >-
            RSA or Ed25519 public key in PEM format. Signatures on the
            institution's requests verify against it with the key's algorithm.
        fcm_subtrader_id:
          type: string
          description: >-
            The subtrader to bind, spelled {your_account_id}_{suffix} with a
            suffix of 1-16 characters of [a-z0-9]. Must already exist and belong
            to you.
    CreateMarginFcmApiKeyResponse:
      type: object
      required:
        - api_key_id
      properties:
        api_key_id:
          type: string
        warning:
          type: string
          nullable: true
          description: >-
            Present only when the bound subtrader is missing a per-subtrader
            risk control - the initial-margin cap (margin lane) or the
            event-contract daily cap. The mint still succeeds; the warning names
            each missing control - an event-contract subtrader without a daily
            cap has its event-contract orders rejected until one is set, while a
            margin subtrader without an initial-margin cap is bounded only by
            firm-level risk limits.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: string
        service:
          type: string
  responses:
    BadRequestError:
      description: Bad request - invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedError:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ForbiddenError:
      description: Caller is not permitted to access this resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    kalshiBearer:
      type: http
      scheme: bearer
      bearerFormat: admin_user_id:access_token
      description: >
        Pass `Authorization: Bearer <admin_user_id>:<access_token>` on each
        request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.