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
Name | Type | Required/Optional | Description |
---|---|---|---|
userProperties | UserProperty[] | Required | list of user properties. Check the UserProperty type here |
Request Information
Category | Value |
---|---|
Http request | POST |
URL | https://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
Name | Type | Description |
---|---|---|
status | boolean | RecordUserProperties status |
data | RecordUserProperties | RecordUserProperties response if any |
UserProperty Type
Name | Type | Required/Optional | Description |
---|---|---|---|
firstName | string | Required | User first name |
lastName | string | Required | User last name |
source | string | Optional | Source |
phoneNumber | string | Optional | Phone number |
alternatePhoneNumber | string | Optional | Alternate phone number |
email | string | Optional | |
address1 | string | Optional | Address line 1 |
address2 | string | Optional | Address line 2 |
city | string | Optional | City |
state | string | Optional | State |
country | string | Optional | Country |
createdAt | Date/string | Optional | Creation date |
updatedAt | Date/string | Optional | Last update date |
emailMarketingConsent | boolean | Optional | Email marketing consent status |
smsMarketingConsent | boolean | Optional | SMS marketing consent status |
tags | string[] | Optional | Tags associated with the user |
partnerCustomerId | string | Optional | Partner's customer ID |
RecordUserProperties Type
Name | Type | Description |
---|---|---|
bulkUpsertUPResponse | BulkUpsertUPResponse | BulkUpsertUPResponse details |
invalidUserProperties | UserProperty[] | InvalidUserProperties list if any |
BulkUpsertUPResponse Type
Name | Type | Description |
---|---|---|
createCount | number | Total number of user property created |
updateCount | number | Total number of user property updated |
Errors
Error Code | Meaning |
---|---|
400 | Invalid payload -- Your request is invalid. |
401 | Unauthorized -- User is not authenticated. |
404 | Not Found -- The specified API could not be found. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |