Skip to main content

Record user properties

Enhance user engagement with the Record User Properties API.

Capture detailed user attributes to fuel personalised experiences and improve cohort analysis on the BIK dashboard. Efficiently store and utilise user data to drive informed strategies, similar to our 'Send Events API' for event tracking. Ideal for developers and marketers aiming for deeper user insights.

Request parameters

NameTypeRequired/OptionalDescription
userPropertiesUserProperty[]Requiredlist of user properties. Check the UserProperty type here

Request Information

CategoryValue
Http requestPOST
URLhttps://bikapi.bikayi.app/integrations/bikPlatformFunctions-createOrUpdateUserProperties
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-createOrUpdateUserProperties' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"userProperties": [
{
"phoneNumber": "9090909090",
"email": "mark@bik.ai",
"firstName": "Test",
"lastName": "2"
},
{
"phoneNumber": "9090909010",
"emial": "mark2@bik.ai",
"firstName": "Test2",
"lastName": "4"
}
]
}'

JSON response example:

{
"status": 200,
"data": {
"invalidUserProperties": [
{
"phoneNumber": "9090909010",
"emil": "mark2@bik.ai",
"firstName": "Test2",
"lastName": "4",
"storeId": "p60HYv5wjgQaOrPdqT5NjbpkroD2",
"customerId": "5242031",
"error": "ValidationError: \"emil\" is not allowed"
}
],
"bulkUpsertUPResponse": {
"createCount": 0,
"updateCount": 1,
"docsFailedToUpdate": []
}
}
}

Response parameters

NameTypeDescription
statusbooleanRecordUserProperties status
dataRecordUserPropertiesRecordUserProperties response if any

UserProperty Type

NameTypeRequired/OptionalDescription
firstNamestringRequiredUser first name
lastNamestringRequiredUser last name
sourcestringOptionalSource
phoneNumberstringOptionalPhone number
alternatePhoneNumberstringOptionalAlternate phone number
emailstringOptionalEmail
address1stringOptionalAddress line 1
address2stringOptionalAddress line 2
citystringOptionalCity
statestringOptionalState
countrystringOptionalCountry
createdAtDate/stringOptionalCreation date
updatedAtDate/stringOptionalLast update date
emailMarketingConsentbooleanOptionalEmail marketing consent status
smsMarketingConsentbooleanOptionalSMS marketing consent status
tagsstring[]OptionalTags associated with the user
partnerCustomerIdstringOptionalPartner's customer ID

RecordUserProperties Type

NameTypeDescription
bulkUpsertUPResponseBulkUpsertUPResponseBulkUpsertUPResponse details
invalidUserPropertiesUserProperty[]InvalidUserProperties list if any

BulkUpsertUPResponse Type

NameTypeDescription
createCountnumberTotal number of user property created
updateCountnumberTotal number of user property updated

Errors

Error CodeMeaning
400Invalid payload -- Your request is invalid.
401Unauthorized -- User is not authenticated.
404Not Found -- The specified API could not be found.
500Internal Server Error -- We had a problem with our server. Try again later.