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

# Mint Consumer Api Key

> Mint a new consumer API key. The raw key is returned exactly once.



## OpenAPI

````yaml https://api.getfloo.com/openapi.json post /v1/apps/{app_id}/consumers/{consumer_id}/keys
openapi: 3.1.0
info:
  title: floo API
  version: 0.1.0
servers:
  - url: https://api.getfloo.com
security: []
paths:
  /v1/apps/{app_id}/consumers/{consumer_id}/keys:
    post:
      tags:
        - app-api-keys
      summary: Mint Consumer Api Key
      description: Mint a new consumer API key. The raw key is returned exactly once.
      operationId: app_api_keys_mint_consumer_api_key
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: App Id
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
        - $ref: '#/components/parameters/X-Floo-Org-Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MintConsumerKeyRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MintedAppConsumerApiKeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    X-Floo-Org-Id:
      name: X-Floo-Org-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: Organization to act in; defaults to the one joined most recently.
  schemas:
    MintConsumerKeyRequest:
      properties:
        name:
          type: string
          maxLength: 120
          minLength: 1
          title: Name
        scopes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Scopes
        rate_limit_rpm:
          anyOf:
            - type: integer
              maximum: 100000
              minimum: 1
            - type: 'null'
          title: Rate Limit Rpm
      type: object
      required:
        - name
      title: MintConsumerKeyRequest
      description: >-
        Require a key name with optional scopes and a bounded per-minute rate
        limit.
    MintedAppConsumerApiKeyResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        app_id:
          type: string
          format: uuid
          title: App Id
        consumer_id:
          type: string
          format: uuid
          title: Consumer Id
        prefix:
          type: string
          title: Prefix
        name:
          type: string
          title: Name
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        rate_limit_rpm:
          type: integer
          title: Rate Limit Rpm
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        created_at:
          type: string
          format: date-time
          title: Created At
        raw_key:
          type: string
          title: Raw Key
      type: object
      required:
        - id
        - app_id
        - consumer_id
        - prefix
        - name
        - scopes
        - rate_limit_rpm
        - last_used_at
        - created_at
        - raw_key
      title: MintedAppConsumerApiKeyResponse
      description: Include the raw bearer secret in the response to key creation.
    ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Body of every error response except request validation (422).
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: true
      type: object
      required:
        - code
        - message
      title: ErrorDetail
      description: Standard error envelope with operation-specific JSON context.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `floo_` API key.

````

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