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

# Creates a new api key for the account



## OpenAPI

````yaml /products/commerce/v1/openapi.yaml post /configuration/accounts/{account_id}/keys
openapi: 3.1.0
info:
  license:
    name: Hellgate® API License
    url: https://starfish.team
  title: Commerce
  version: '0.1'
servers:
  - url: https://commerce1.on-hellgate.dev
    variables: {}
security:
  - mtls: []
  - api_key: []
tags: []
paths:
  /configuration/accounts/{account_id}/keys:
    post:
      tags:
        - keys
      summary: Creates a new api key for the account
      operationId: CommerceWeb.Configuration.KeyController.create
      parameters:
        - description: Account ID
          in: path
          name: account_id
          required: true
          schema:
            type: string
            x-struct: null
            x-validate: null
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyCreateParams'
        description: Body
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
          description: Success
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
      callbacks: {}
      security:
        - mtls: []
components:
  schemas:
    KeyCreateParams:
      properties:
        expired_at:
          description: Expiration date. Must be in the future.
          format: date-time
          type: string
          x-struct: null
          x-validate: null
      title: KeyCreateParams
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.KeysSchema.KeyCreateParams
      x-validate: null
    KeyResponse:
      properties:
        id:
          format: uuid
          type: string
          x-struct: null
          x-validate: null
        key_value:
          type: string
          x-struct: null
          x-validate: null
      required:
        - id
        - key_value
      title: KeyResponse
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.KeysSchema.KeyResponse
      x-validate: null
    ErrorResponse:
      properties:
        classifier:
          type: string
          x-struct: null
          x-validate: null
        code:
          type: integer
          x-struct: null
          x-validate: null
        message:
          type: string
          x-struct: null
          x-validate: null
      required:
        - code
        - classifier
        - message
      title: ErrorResponse
      type: object
      x-struct: Elixir.CommerceWeb.Schemas.ErrorsSchema.ErrorResponse
      x-validate: null
  securitySchemes:
    mtls:
      description: >-
        Client certificate authentication via mTLS. Account-scoped routes
        additionally require the X-Account-ID header to identify the account.
      type: mutualTLS
    api_key:
      in: header
      name: X-API-Key
      type: apiKey

````