Skip to main content
POST
Create Customer
This API enables you to 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, linking them to all associated events, purchases, and loyalty activities across their lifetime. This ensures comprehensive customer management within the Gameball platform.
Security: Requires apiKey header.
Channel Merging Available
If your system uses different customer IDs across multiple channels (e.g., online and offline), Gameball’s channel merging feature helps unify customer profiles. By including the customer’s mobile number or email (based on your merging configuration) with each request, Gameball will combine activities into a single profile.
For more information, head to the Omni-Channel Handling Guide.

Registering a Push Token

To send mobile push notifications to a customer, register their device token with this API, either from your server or through the Gameball mobile SDKs. Send deviceToken together with pushServiceProvider:
  • Use the option exactly as spelled above. When you omit pushServiceProvider, the token is treated as a Firebase token, so always send Huawei for Huawei Push Kit tokens.
  • The field has a different name in the API and in the SDKs: Over REST, only pushServiceProvider is read. Any other name, such as pushProvider, is ignored and returned in the x-gameball-unknown-fields response header.
  • A customer can have several devices. Each new token is added, and tokens registered earlier keep receiving notifications until the push service reports them as invalid. Gameball has no API to remove a token, so a device keeps receiving the customer’s notifications after the customer logs out.
  • Sending a token that is already registered has no effect.
  • The token is registered after the request returns, so a 200 response does not confirm the registration.
customerAttributes.devices is unrelated to push notifications. It holds descriptive device and browser details (userAgent, os, device, browser), and push tokens never appear in it.

Authorizations

apikey
string
header
required

Body

application/json

Customer payload containing identifiers and attributes.

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

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
enum<string>
default:Firebase

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.

Available options:
Firebase,
Huawei
osType
string

Operating system of the device, for example iOS or Android.

customerAttributes
object

Additional customer-specific attributes. Includes attributes such as the customer's name, contact details, and purchase history.

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 - application/json

Customer created or updated successfully

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.