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

# Create customers (bulk)

> Create multiple customers in one request for data migration or CRM sync.

Creates up to 1000 customers in a single request. Each item follows the [CustomerInsert](/docs/admin-api/customers/bulk/post) schema.

`registration_date` is optional on each item and defaults to the current time when omitted. For regular customers, `id`, `name`, and `email` are required. Anonymous customers need only `id` and `is_anonymous: true`.

## Request

```bash theme={null}
curl -X POST "https://firespark.cloud/api/admin/v1/customers/bulk" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "id": "crm-001",
      "name": "Jane Doe",
      "email": "jane@example.com"
    },
    {
      "id": "crm-002",
      "name": "Bob Lee",
      "email": "bob@example.com",
      "registration_date": "2025-03-01T00:00:00Z"
    }
  ]'
```

## Response

Returns `201` with a summary object in `data` when the batch is accepted.


## OpenAPI

````yaml POST /customers/bulk
openapi: 3.0.1
info:
  title: Fire spark Admin API
  description: Back-office and merchant operations endpoints for Fire spark.
  version: 1.0.0
servers:
  - url: https://firespark.cloud/api/admin/v1
security:
  - bearerAuth: []
paths:
  /customers/bulk:
    post:
      summary: Create customers (bulk)
      requestBody:
        required: true
        description: Customers to create.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CustomerInsert'
      responses:
        '201':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    additionalProperties: true
components:
  schemas:
    CustomerInsert:
      type: object
      required:
        - id
      description: >-
        Schema for registering a new customer. For anonymous customers, only
        `id` and `is_anonymous: true` are required. For regular customers, `id`,
        `name`, and `email` are required. `registration_date` is optional and
        defaults to the current time.
      properties:
        id:
          type: string
          description: >-
            Your customer unique identifier. Must match the `sub` claim from the
            customer's OIDC ID token.
        is_anonymous:
          type: boolean
          description: >-
            Set to true to create an anonymous customer. When true, name and
            email are not required.
          default: false
        name:
          description: The full name of the customer. Required unless is_anonymous is true.
          type: string
          example: John Smith
        email:
          description: The email of the customer. Required unless is_anonymous is true.
          type: string
          format: email
        status:
          description: The status of the customer
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          default: ACTIVE
        gender:
          description: The gender of the customer
          type: string
          nullable: true
          enum:
            - MALE
            - FEMALE
            - OTHER
        dob:
          description: The date of birth of the customer
          type: string
          nullable: true
          format: date-time
        document_type:
          description: The document type of the customer
          type: string
          nullable: true
        document_number:
          description: The document number of the customer
          type: string
          nullable: true
          maxLength: 50
        country:
          description: The country of the customer
          type: string
          nullable: true
          maxLength: 100
        phone:
          description: The customer's phone number in international format
          type: string
          nullable: true
          example: +593 99 123 4567
        registration_date:
          description: >-
            The date when the customer was registered. Defaults to the current
            time when omitted.
          type: string
          format: date-time
        devices:
          type: array
          description: >-
            Optional device payloads on registration. Use Storefront PATCH
            /customers/{id} with a `devices` array to manage structured push
            devices after registration.
          items:
            type: object
            additionalProperties: true
        delivery_addresses:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/DeliveryAddress'
        billing_profiles:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/BillingProfile'
        consent:
          $ref: '#/components/schemas/Consent'
          description: The customer's consent preferences
          nullable: true
        metadata:
          description: Custom metadata for the customer. Must serialize to 1MB or less.
          type: object
          additionalProperties: true
    DeliveryAddress:
      type: object
      required:
        - alias
        - address_line1
      properties:
        alias:
          type: string
          maxLength: 100
        address_line1:
          type: string
          maxLength: 100
        address_line2:
          type: string
          maxLength: 100
        city:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        zip:
          type: string
          maxLength: 100
        country:
          type: string
          maxLength: 100
        reference:
          type: string
          maxLength: 100
        latitude:
          type: number
          minimum: -90
          maximum: 90
        longitude:
          type: number
          minimum: -180
          maximum: 180
        instructions:
          type: string
          maxLength: 100
        preferred:
          type: boolean
          default: false
        metadata:
          description: Custom metadata. Must serialize to 1MB or less.
          type: object
          nullable: true
          additionalProperties: true
    BillingProfile:
      type: object
      required:
        - alias
        - type
        - legal_name
        - address_line1
        - tax_id
        - tax_id_type
      properties:
        alias:
          type: string
          maxLength: 100
        type:
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
          description: Whether this profile is for an individual or a business
        legal_name:
          type: string
          maxLength: 100
        address_line1:
          type: string
          maxLength: 100
        address_line2:
          type: string
          maxLength: 100
        city:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        zip:
          type: string
          maxLength: 100
        country:
          type: string
          maxLength: 100
        tax_id:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9_-]+$
        tax_id_type:
          type: string
          enum:
            - VAT
            - EIN
            - SSN
            - TIN
            - NIF
            - CUIT
            - RUT
            - NIT
            - RCN
            - RUC
            - CI
            - DNI
            - PASSPORT
            - OTHER
        preferred:
          type: boolean
          default: false
        metadata:
          description: Custom metadata. Must serialize to 1MB or less.
          type: object
          nullable: true
          additionalProperties: true
    Consent:
      type: object
      description: >-
        Channel-level marketing and messaging consent preferences. Omitted flags
        default to false.
      properties:
        email:
          type: boolean
          description: Consent for email marketing
          default: false
        push_notifications:
          type: boolean
          description: Consent for push notifications
          default: false
        in_app_messages:
          type: boolean
          description: Consent for in-app messages
          default: false
        phone_calls:
          type: boolean
          description: Consent for phone calls
          default: false
        sms:
          type: boolean
          description: Consent for SMS messages
          default: false
        whatsapp:
          type: boolean
          description: Consent for WhatsApp messages
          default: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````