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

# Create multiple customers



## OpenAPI

````yaml /openapi.json post /businesses/{id}/customers/batch
openapi: 3.0.3
info:
  title: Pocketflows API
  version: 0.0.4
servers:
  - url: https://api.pocketflows.com
    description: Production server
security:
  - HttpBasicAuth: []
paths:
  /businesses/{id}/customers/batch:
    post:
      tags:
        - Customers
      summary: Create multiple customers
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: The ID of the business
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customers:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          email_address:
                            type: string
                            description: The email address of the customer
                          phone_number:
                            type: string
                            nullable: true
                            description: The phone number of the customer
                          metadata:
                            type: object
                            additionalProperties: true
                            nullable: true
                            description: Any metadata to attach to the customer
                          full_name:
                            type: string
                            nullable: true
                            description: The full name of the customer
                        required:
                          - email_address
                      - type: object
                        properties:
                          phone_number:
                            type: string
                            description: The phone number of the customer
                          email_address:
                            type: string
                            nullable: true
                            description: The email address of the customer
                          metadata:
                            type: object
                            additionalProperties: true
                            nullable: true
                            description: Any metadata to attach to the customer
                          full_name:
                            type: string
                            nullable: true
                            description: The full name of the customer
                        required:
                          - phone_number
                  description: An array of customer data to create
              required:
                - customers
      responses:
        '200':
          description: An array of created `Customer` objects
          content:
            application/json:
              schema:
                type: object
                properties:
                  customers:
                    type: array
                    items:
                      $ref: '#/components/schemas/Customer'
                      nullable: true
                    description: >-
                      An array of created `Customer` objects (null for entries
                      that failed)
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          description: The error message
                        path:
                          type: string
                          description: The path to the field that caused the error
                      required:
                        - message
                        - path
                    description: An array of errors
                required:
                  - customers
components:
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: string
          description: The ID of the customer
        external_id:
          type: string
          nullable: true
          description: The external ID of the customer
        email_address:
          type: string
          nullable: true
          description: The email address of the customer
        phone_number:
          type: string
          nullable: true
          description: The phone number of the customer
        full_name:
          type: string
          nullable: true
          description: The full name of the customer
        metadata:
          type: object
          additionalProperties: true
          description: The metadata associated with this customer
        unsubscribed:
          type: string
          enum:
            - future
            - campaign
          nullable: true
          description: The unsubscribe status of the customer
      required:
        - id
        - external_id
        - email_address
        - phone_number
        - full_name
        - metadata
        - unsubscribed
      title: The Customer object
  securitySchemes:
    HttpBasicAuth:
      type: http
      scheme: basic

````