Customer data

This article provides information on how you can integrate customer data from your site or app with our platform.


Blueshift supports several identifiers to uniquely identify customer behavior & attributes. You would need to include one or more of these identifiers while integrating with Blueshift for any customer specific data.

customer_id(string) First party unique customer id for each customer. The customer_id can be at most 128 characters in length.
email(string) Email address of the customer. The email address can be at most 64 characters in length.
cookie(string) First-party cookie that our (Blueshift's) Javascript pixel inserts. We automatically generate this cookie and it's 36 characters in length.
device_id(string) Unique device identifier on iOS or Android devices. Blueshift mobile SDKs can automatically capture the device_id and include it in each event.

Blueshift can track anonymous customer behavior (before login) based on an anonymous first-party cookie on your website, or a device_id on mobile. Once a customer logs in, the anonymous behavior can get merged in with known customer identity to create a unified single customer view. You can read our customer documentation to learn how single customer view and profile is merged.

API overview

Our platform provides API endpoints that you can use to integrate data of your site's customers with our platform. We host a 360 degree customer profile for each of your customers to represent all of their demographic, behavioral activity, and engagement activity. We merge logged-out activity with logged-in activity to create a rich customer profile. In addition to feed uploads, we support REST APIs to create, update, or retrieve customer information. You need a user API key. The API reference documentation specifies how you can get it. Here are the API endpoints that you can use to integrate our platform with your app or site and use its features:

However, before you get to the endpoints, we'd like you to review the attributes and use the recommended format to send data to us.


emailEmail address of a customer to uniquely identity the customer."[email protected]"
customer_idCustomer ID of a customer to uniquely identify the customer."12341j234klkhj1234l1kj3"
firstnameFirst name of a customer (optional)."John"
lastnameLast name of a customer (optional)."Doe"
genderGender of a customer (optional)."male"
joined_atDate when a customer joined your site in iso8601 format."2016-02-02T04:19:42Z"
facebook_idFacebook ID of a customer (optional)."john.doe"
unsubscribedSubscription status of a customer in boolean format (optional). Set it true if a customer has unsubscribed from a mailing list.true
unsubscribed_atDate when a customer unsubscribes from a mailing list in iso8601 format (optional)."2016-02-02T04:19:42Z"
email_hard_bouncedAutomatically updated boolean value when an email hard bounce occurs.true
email_spam_reportedAutomatically updated boolean value when a customer marks your email as spam via the ISP.true
phone_numberPhone number of the customer including the country code to send SMS messages (optional).

Ensure that the phone number that you specify meets the phone number format requirements listed here.
device_idsMobile device identifiers of a customer's device (optional).["1234ABCD-4321DCBA","2345EDCB-5432BCDE"]
device_tokensMobile device tokens of a customer's device to push notifications (optional).["123abcd", "321cdba"]
birth_yearYear of birth of a customer (optional).2001
birth_monthMonth of birth of a customer (optional).12
birth_dayofmonthDay of birth of a customer (optional).10
last_device_tokenToken of the most recent device of a customer sent from your mobile app."1234abcd"
last_location_geo_longitudeLast known geo longitude of the customer.51.4934
last_location_geo_latitudeLast known geo latitude of the customer.0.0098
custom attributeDescribed below.Provided below.

Custom attributes

You can send custom attributes about your site's customers to us. You can use these attributes to filter your customers during segmentation. Ensure that you use the correct JSON data types when you send the custom attributes, since the data types determine how you can filter customers in segments. You can use the following guidelines to send the custom attributes to our platform:

Data typeDescriptionExamples
BooleanBoolean values in JSON must either be true or false.{ "is_premium_member": true }
StringsString values in JSON must be entered in double quotes.{"name": ": "John" }
NumbersNumbers in JSON must be an integer. Use strings if you don't want to perform comparisons on the values that you want to send to our platform.{ "age": 30 }
DecimalNumbers in JSON must be a floating point. Use strings if you don't want to perform comparisons on the values that you want to send to our platform.{ "rating": 4.5 }
DatesDates must be in ISO8601 format.{ "signed_on": "2017-07-13T17:44:46Z" }
ArraysValues in JSON can be arrays.{""preferences": [ "fiction", "local" ] }
Nested objectsValues in JSON can be nested objects. Contact Blueshift support to discuss data design before you upload nested JSON objects.{ "plan":
{ "name":"premium",
"end_at": "2017-07-13T17:44:46Z"