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

# POST /consumers/batch

> Create consumers



## OpenAPI

````yaml /api/openapi/admin-api.json post /consumers/batch
openapi: 3.1.0
info:
  description: Admin API for Fanfare
  title: Fanfare Admin API
  version: 1.0.0
servers:
  - description: Production
    url: https://admin.fanfare.io/api
  - description: Local development
    url: http://localhost:4800
security:
  - SecretKeyAuth: []
paths:
  /consumers/batch:
    post:
      tags:
        - Consumers
      description: Create consumers
      operationId: postConsumersBatch
      requestBody:
        content:
          application/json:
            schema:
              properties:
                consumers:
                  items:
                    properties:
                      activityRank:
                        type: number
                      activityScore:
                        type: number
                      activityScoreUpdatedAt:
                        nullable: true
                        type: string
                      aov:
                        type: string
                      email:
                        format: email
                        nullable: true
                        type: string
                      emailVerified:
                        type: boolean
                      engagedCount:
                        type: number
                      fullName:
                        nullable: true
                        type: string
                      lastEngagedAt:
                        nullable: true
                        type: string
                      lastGeoAt:
                        nullable: true
                        type: string
                      lastGeoCity:
                        nullable: true
                        type: string
                      lastGeoCoordinates:
                        nullable: true
                        properties:
                          latitude:
                            type: number
                          longitude:
                            type: number
                        required:
                          - latitude
                          - longitude
                        type: object
                      lastGeoCountry:
                        nullable: true
                        type: string
                      lastGeoPostalCode:
                        nullable: true
                        type: string
                      lastGeoRegion:
                        nullable: true
                        type: string
                      lastGeoSource:
                        nullable: true
                        type: string
                      lastGeoTimezone:
                        nullable: true
                        type: string
                      lastLoginAt:
                        nullable: true
                        type: string
                      lastOrderAt:
                        nullable: true
                        type: string
                      lastReturnAt:
                        nullable: true
                        type: string
                      loyaltyBalance:
                        type: number
                      loyaltyLastActivityAt:
                        nullable: true
                        type: string
                      loyaltyLifetimePoints:
                        type: number
                      ltv:
                        type: string
                      metadata:
                        additionalProperties:
                          oneOf:
                            - oneOf:
                                - type: string
                                - type: number
                                - type: boolean
                                - type: 'null'
                            - items:
                                oneOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - type: 'null'
                              type: array
                        nullable: true
                        type: object
                      monetaryRank:
                        type: number
                      monetaryScore:
                        type: number
                      monetaryScoreUpdatedAt:
                        nullable: true
                        type: string
                      phone:
                        nullable: true
                        type: string
                      phoneVerified:
                        type: boolean
                      purchaseFrequencyRank:
                        type: number
                      purchaseFrequencyScore:
                        type: number
                      purchaseFrequencyScoreUpdatedAt:
                        nullable: true
                        type: string
                      smsOptOut:
                        type: boolean
                      status:
                        enum:
                          - ACTIVE
                          - INACTIVE
                        type: string
                      totalEngagements:
                        type: number
                      totalMessages:
                        type: number
                      totalOrders:
                        type: number
                      totalReturns:
                        type: number
                      verificationCode:
                        nullable: true
                        type: string
                      verificationCodeExpiresAt:
                        nullable: true
                        type: string
                    required:
                      - emailVerified
                      - phoneVerified
                      - status
                    type: object
                  type: array
              required:
                - consumers
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  properties:
                    activityRank:
                      default: 0
                      maximum: 5
                      minimum: 0
                      type: integer
                    activityScore:
                      default: 0
                      type: number
                    activityScoreUpdatedAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    aov:
                      default: '0'
                      pattern: ^\d{1,12}(\.\d{1,8})?$
                      type: string
                    archived:
                      type: boolean
                    createdAt:
                      format: date-time
                      type: string
                    createdBy:
                      type: string
                    email:
                      anyOf:
                        - format: email
                          type: string
                        - type: 'null'
                    emailVerified:
                      type: boolean
                    engagedCount:
                      default: 0
                      type: number
                    fullName:
                      anyOf:
                        - type: string
                        - type: 'null'
                    id:
                      format: uuid
                      type: string
                    lastEngagedAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    lastGeoAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    lastGeoCity:
                      anyOf:
                        - type: string
                        - type: 'null'
                    lastGeoCoordinates:
                      anyOf:
                        - properties:
                            latitude:
                              type: number
                            longitude:
                              type: number
                          required:
                            - latitude
                            - longitude
                          type: object
                        - type: 'null'
                    lastGeoCountry:
                      anyOf:
                        - type: string
                        - type: 'null'
                    lastGeoPostalCode:
                      anyOf:
                        - type: string
                        - type: 'null'
                    lastGeoRegion:
                      anyOf:
                        - type: string
                        - type: 'null'
                    lastGeoSource:
                      anyOf:
                        - type: string
                        - type: 'null'
                    lastGeoTimezone:
                      anyOf:
                        - type: string
                        - type: 'null'
                    lastLoginAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    lastOrderAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    lastReturnAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    loyaltyBalance:
                      default: 0
                      type: number
                    loyaltyLastActivityAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    loyaltyLifetimePoints:
                      default: 0
                      type: number
                    ltv:
                      default: '0'
                      pattern: ^\d{1,12}(\.\d{1,8})?$
                      type: string
                    metadata:
                      anyOf:
                        - additionalProperties:
                            anyOf:
                              - anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - type: 'null'
                              - items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                    - type: 'null'
                                type: array
                          propertyNames:
                            type: string
                          type: object
                        - type: 'null'
                    monetaryRank:
                      default: 0
                      maximum: 5
                      minimum: 0
                      type: integer
                    monetaryScore:
                      default: 0
                      type: number
                    monetaryScoreUpdatedAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    organizationId:
                      format: uuid
                      type: string
                    phone:
                      anyOf:
                        - type: string
                        - type: 'null'
                    phoneVerified:
                      type: boolean
                    primaryExternalId:
                      anyOf:
                        - type: string
                        - type: 'null'
                    primaryLastSyncedAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    primarySourceVendor:
                      anyOf:
                        - type: string
                        - type: 'null'
                    primarySyncSourceId:
                      anyOf:
                        - type: string
                        - type: 'null'
                    purchaseFrequencyRank:
                      default: 0
                      maximum: 5
                      minimum: 0
                      type: integer
                    purchaseFrequencyScore:
                      default: 0
                      type: number
                    purchaseFrequencyScoreUpdatedAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    smsOptOut:
                      default: false
                      type: boolean
                    status:
                      enum:
                        - ACTIVE
                        - INACTIVE
                    totalEngagements:
                      default: 0
                      type: number
                    totalMessages:
                      default: 0
                      type: number
                    totalOrders:
                      default: 0
                      type: number
                    totalReturns:
                      default: 0
                      type: number
                    updatedAt:
                      anyOf:
                        - format: date-time
                          type: string
                        - type: 'null'
                    updatedBy:
                      anyOf:
                        - type: string
                        - type: 'null'
                    verificationCode:
                      anyOf:
                        - type: string
                        - type: 'null'
                    verificationCodeExpiresAt:
                      anyOf:
                        - type: string
                        - type: 'null'
                  required:
                    - id
                    - organizationId
                    - createdAt
                    - createdBy
                    - archived
                    - emailVerified
                    - phoneVerified
                    - status
                  type: object
                type: array
          description: Consumers created successfully
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    const: validation_error
                  issues:
                    items:
                      properties:
                        expected:
                          type: string
                        kind:
                          type: string
                        message:
                          type: string
                        path:
                          items:
                            properties:
                              input: {}
                              key:
                                type: string
                              origin:
                                type: string
                              type:
                                type: string
                            required:
                              - type
                              - origin
                              - input
                              - key
                            type: object
                          type: array
                        received:
                          type: string
                        type:
                          type: string
                      required:
                        - kind
                        - type
                        - expected
                        - received
                        - message
                        - path
                      type: object
                    type: array
                required:
                  - error
                  - issues
                type: object
          description: Bad Request - Invalid input schema
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Unauthorized - Authentication required
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Forbidden - User must be authenticated
        '500':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Internal server error
components:
  securitySchemes:
    SecretKeyAuth:
      description: Fanfare secret key. Keep secret credentials on your server.
      scheme: bearer
      type: http

````