> ## 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.

# Create App Consumer

> Create a machine consumer for an app.



## OpenAPI

````yaml https://api.getfloo.com/openapi.json post /v1/apps/{app_id}/consumers
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:
    post:
      tags:
        - app-api-keys
      summary: Create App Consumer
      description: Create a machine consumer for an app.
      operationId: app_api_keys_create_app_consumer
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: App Id
        - $ref: '#/components/parameters/X-Floo-Org-Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConsumerRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerResponse'
        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:
    CreateConsumerRequest:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
        metadata:
          anyOf:
            - $ref: '#/components/schemas/JsonObject-Input'
            - type: 'null'
      type: object
      required:
        - name
      title: CreateConsumerRequest
      description: Require a bounded consumer name and accept optional metadata.
    ConsumerResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        app_id:
          type: string
          format: uuid
          title: App Id
        name:
          type: string
          title: Name
        metadata:
          anyOf:
            - $ref: '#/components/schemas/JsonObject-Output'
            - type: 'null'
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - app_id
        - name
        - created_by
        - created_at
      title: ConsumerResponse
      description: >-
        Expose app consumer identity while serializing ORM metadata under its
        public name.
    ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Body of every error response except request validation (422).
    JsonObject-Input:
      additionalProperties:
        $ref: '#/components/schemas/JsonValue-Input'
      type: object
    JsonObject-Output:
      additionalProperties:
        $ref: '#/components/schemas/JsonValue-Output'
      type: object
    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.
    JsonValue-Input:
      anyOf:
        - type: boolean
        - type: integer
        - type: number
        - type: string
        - items:
            $ref: '#/components/schemas/JsonValue-Input'
          type: array
        - additionalProperties:
            $ref: '#/components/schemas/JsonValue-Input'
          type: object
        - type: 'null'
    JsonValue-Output:
      anyOf:
        - type: boolean
        - type: integer
        - type: number
        - type: string
        - items:
            $ref: '#/components/schemas/JsonValue-Output'
          type: array
        - additionalProperties:
            $ref: '#/components/schemas/JsonValue-Output'
          type: object
        - type: 'null'
  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.