---
title: "Create Customer"
method: POST
path: "/api/v4.0/integrations/customers"
---

# Create Customer

`POST /api/v4.0/integrations/customers`

Create or update a customer profile in Gameball using a unique customerId. Serving as a consistent identity, this customerId allows you to track a customer's entire journey.

## Request body

- UpsertCustomerRequest
  - `customerId` string, required — 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` string — Customer's email address. Required if your account uses email-based channel merging.
  - `mobile` string — Customer's mobile number. Required if your account uses mobile-based channel merging.
  - `deviceToken` string — Token used to identify the device.
  - `osType` string — Operating system type of the device.
  - `customerAttributes` object — Additional customer-specific attributes. Includes attributes such as the customer's name, contact details, and purchase history.
    - `displayName` string — Display name for the customer.
    - `firstName` string — Customer's first name.
    - `lastName` string — Customer's last name.
    - `email` string — Customer's email address.
    - `gender` string — Customer's gender.
    - `mobile` string — Customer's mobile number.
    - `dateOfBirth` string — Customer's date of birth.
    - `joinDate` string — Date the customer joined.
    - `country` string — Customer's country.
    - `city` string — Customer's city.
    - `zip` string — Customer's postal code.
    - `preferredLanguage` string — 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` string — Source of the customer registration.
    - `utms` unknown[] — List of UTM attributes associated with the customer.
      - unknown
    - `devices` unknown[] — List of devices associated with the customer.
      - unknown
    - `paymentMethods` unknown[] — 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.
      - unknown
    - `totalSpent` number — Total amount spent by the customer.
    - `lastOrderDate` string — Date of the last order placed by the customer.
    - `totalOrders` integer — Total number of orders placed by the customer.
    - `avgOrderAmount` number — Average amount spent per order by this customer.
    - `channel` 'mobile' | 'pos' | 'web' | 'callcenter' — 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.
    - `custom` object — 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` string — 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` boolean — 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.

## Response `200`

Customer created or updated successfully

- UpsertCustomerResponse
  - `gameballId` number — The customer's unique ID within the Gameball system. This ID is used to store the customer in our database and is different from the customerId used in the dashboard.

---

[API](https://skmtc.net/gameballers/apis/gameball-api.md) · [All operations](https://skmtc.net/gameballers/apis/gameball-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gameballers/gameball-api/versions/2e4a8bfe2291/schema)
