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

# Create Customers Batch Job

> Create or update multiple customer profiles in a single API call for bulk user imports and mass profile updates.

## Create Customers Batch Job

The **Batch Customer API** allows clients to create or update multiple customer profiles in a single API call. This is useful for bulk user imports, mass profile updates, and large-scale customer data synchronization while reducing network overhead and improving efficiency.

> [!NOTE]
>
> **Security:** Requires **apiKey** and **secretKey** headers.

> [!NOTE]
>
> To register a push token for a customer in the batch, send `deviceToken` with `pushServiceProvider` (`Firebase` or `Huawei`, default `Firebase`) on that customer, the same as in [Create/Update Customer](https://docs.gameball.co/api-reference/customers/management/create-customer.md#registering-a-push-token).


## OpenAPI

````yaml POST /api/v4.0/integrations/batch/customers
openapi: 3.1.0
info:
  title: Gameball API
  description: >-
    Gameball REST API v4.0 - Complete API reference for integrating loyalty,
    gamification, and customer engagement features
  version: 4.0.0
servers:
  - url: https://api.gameball.co
security:
  - bearerAuth: []
paths:
  /api/v4.0/integrations/batch/customers:
    post:
      description: >-
        Create or update multiple customer profiles in a single API call for
        bulk user imports and mass profile updates.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  type: array
                  items:
                    type: object
                    required:
                      - customerId
                    properties:
                      customerId:
                        type: string
                        description: >-
                          Unique identifier for the customer that you can
                          reference across the customer's whole lifetime. Could
                          be a database ID, random string, email, or anything
                          that uniquely identifies the customer.
                      email:
                        type: string
                        description: >-
                          Customer's email address. Required if your account
                          uses email-based channel merging.
                      mobile:
                        type: string
                        description: >-
                          Customer's mobile number. Required if your account
                          uses mobile-based channel merging.
                      deviceToken:
                        type: string
                        description: >-
                          Push notification token for the customer's device (an
                          FCM token, or an HMS Push Kit token for Huawei), used
                          to deliver mobile push campaigns. Send it with
                          `pushServiceProvider`. Each new token is added to the
                          customer's registered devices, and tokens registered
                          earlier are kept.
                      pushServiceProvider:
                        type: string
                        enum:
                          - Firebase
                          - Huawei
                        default: Firebase
                        description: >-
                          Push service that issued `deviceToken`: `Firebase` or
                          `Huawei`, spelled exactly as shown. Send it whenever
                          you send `deviceToken`. When it is omitted, the token
                          is treated as a Firebase token, so Huawei tokens
                          registered without it never receive push
                          notifications. In the mobile SDKs this field is called
                          `pushProvider`.
                      osType:
                        type: string
                        description: >-
                          Operating system of the device, for example `iOS` or
                          `Android`.
                      customerAttributes:
                        type: object
                        description: >-
                          Additional customer-specific attributes. Includes
                          attributes such as the customer's name, contact
                          details, and purchase history.
                        properties:
                          displayName:
                            type: string
                            description: Display name for the customer.
                          firstName:
                            type: string
                            description: Customer's first name.
                          lastName:
                            type: string
                            description: Customer's last name.
                          email:
                            type: string
                            description: Customer's email address.
                          gender:
                            type: string
                            description: Customer's gender.
                          mobile:
                            type: string
                            description: Customer's mobile number.
                          mobileCountryCode:
                            type: string
                            maxLength: 10
                            description: >-
                              International dialing code of the customer's
                              mobile, for example `966` or `+966`. Optional.
                              Send it when `mobile` is in local format (for
                              example `0548548545`) so Gameball can tell the
                              number's country. Gameball stores it only if
                              `mobile` is a valid full-length number for that
                              code. If you don't send it, or it doesn't match,
                              Gameball reads the code from `mobile` when it's
                              written in international format (`+966...`,
                              `00966...` or `966...`).
                          dateOfBirth:
                            type: string
                            description: Customer's date of birth.
                          joinDate:
                            type: string
                            description: Date the customer joined.
                          country:
                            type: string
                            description: Customer's country.
                          city:
                            type: string
                            description: Customer's city.
                          zip:
                            type: string
                            description: Customer's postal code.
                          preferredLanguage:
                            type: string
                            description: >-
                              The customer's preferred language for
                              communication and interactions. This is typically
                              used to personalize notifications, messages, and
                              other system interactions based on the customer's
                              language preference.
                          source:
                            type: string
                            description: Source of the customer registration.
                          utms:
                            type: array
                            description: >-
                              List of UTM attributes associated with the
                              customer.
                          devices:
                            type: array
                            description: >-
                              Device and browser details describing the
                              customer, for profile and segmentation purposes.
                              Not used for push notifications: register push
                              tokens with `deviceToken` and
                              `pushServiceProvider`.
                            items:
                              type: object
                              properties:
                                userAgent:
                                  type: string
                                  description: Browser or app user agent string.
                                os:
                                  type: string
                                  description: Operating system, for example `iOS`.
                                device:
                                  type: string
                                  description: >-
                                    Device model or type, for example `iPhone
                                    15`.
                                browser:
                                  type: string
                                  description: Browser name, for example `Safari`.
                          paymentMethods:
                            type: array
                            description: >-
                              List of payment methods used by the customer. This
                              array may include various forms of payment, such
                              as credit cards, PayPal, or other payment
                              providers. Each payment method is represented as a
                              string.
                          totalSpent:
                            type: number
                            description: Total amount spent by the customer.
                          lastOrderDate:
                            type: string
                            description: Date of the last order placed by the customer.
                          totalOrders:
                            type: integer
                            description: Total number of orders placed by the customer.
                          avgOrderAmount:
                            type: number
                            description: Average amount spent per order by this customer.
                          channel:
                            type: string
                            description: >-
                              Indicates the channel through which the customer
                              was acquired or engaged. This is especially useful
                              for systems that support multiple channels to
                              track customer origin and interactions.
                              Understanding the acquisition or engagement
                              channel helps in tailoring marketing strategies,
                              optimizing communication, and analyzing customer
                              preferences.
                            enum:
                              - mobile
                              - pos
                              - web
                              - callcenter
                          custom:
                            type: object
                            additionalProperties: true
                            description: >-
                              Key-value pairs that allow you to store additional
                              attributes for the customer. This can include any
                              extra information specific to your needs, enabling
                              more personalized interactions and offerings.
                      referrerCode:
                        type: string
                        description: >-
                          The referral code of an existing customer who is
                          referring the customer being created. This is required
                          in the create customer request to process the
                          referral.
                      guest:
                        type: boolean
                        description: >-
                          A flag indicating if the individual interacting with
                          your system is a guest (not signed up). Set this to
                          true for guest users; otherwise, they are treated as
                          registered customers by default.
      responses:
        '200':
          description: Batch customer data processing initiated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobId:
                    type: number
                    description: >-
                      The assigned job ID, which is later used for status
                      verification and response retrieval.
      security:
        - apiKey: []
          secretKey: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: apikey
    secretKey:
      type: apiKey
      in: header
      name: secretkey

````

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