NotifyVisitors API endpoints enable you to create and update users whenever they perform any actions on your site. But before you know how to create and update the users, it is important to identify the users to make the tracking process more feasible.
Different API Endpoints
NotifyVisitors provides different API endpoints for creating users :
Upload User Profile
- This endpoint enables you to create and update user profiles. You can create single or multiple users by this API. Upload a maximum of 100 users at an API call.
https://analytics.notifyvisitors.com/api/v1/user/create
Delete a User Profile
- This endpoint enables you to delete a user profile.
https://analytics.notifyvisitors.com/api/v1/user/delete
Individual User Profile Data From User Id
- Get user profile data through this API.
https://analytics.notifyvisitors.com/api/v1/user/userData
Create/Update User Profile and Log Event
- This endpoint makes it easy to manage user profiles and log events at the same time.
https://analytics.notifyvisitors.com/api/v1/user_event/create
User Attributes Example Data
Refer to the below example for the same
{
"nv": [
{
"userID": "[email protected]",
"user_attributes": {
"name": "Michael Smith",
"first_name": "Michael",
"last_name": "Smith",
"email": "[email protected]",
"mobile": "+551155256325",
"birth_date":"1990-11-25",
"gender": "male",
"email_opt_in": "1",
"sms_opt_in": "1",
"whatsapp_opt_in": "1"
}
}
]
}
Note:
You can select parameters from the given table on the right to send user attributes in request body.
Points to Remember While Setting Attributes:
-
The User attribute names must be less than 50 characters and string attribute
values must be less than 1000 characters. -
The JSON object customer value cannot be used to create segments.
-
The data type must be consistent and firm with the value you want to save against an attribute.
PARAMETER | TYPE | ATTRIBUTE DESCRIPTION | MANDATORY |
---|---|---|---|
userID | String | Either user id or anonymous id is mandatory.( identifier for a known user) User id can be of 100 characters. | Yes |
name | String | full name of user | |
first_name | String | First name of the user | No |
last_name | String | Last name of the user | No |
String | Email ID | No | |
mobile | String | Phone number of the user in E.164 format eg. +551155256325, +917850009678 | No |
birth_date | String | Birth date in YYYY-MM-DD format | No |
gender | String | Gender - value can only be one of male, female, other | No |
email_opt_in | integer | 1 -> reachable on email 0 -> not available , 2 -> bounced | No |
sms_opt_in | integer | 1 -> reachable on sms , 0 -> not available , 2 -> invalid | No |
whatsapp_opt_in | integer | 1 -> opt in for whatsapp , 0 -> no, 2 -> invalid | No |
Returns
- When you call API to send the users’ data, you can receive the response. i..e status of the request
as “success, queued or error.
{
"userIDs": [
"[email protected]"
],
"status_code": "200",
"processed": 1
}
- You also get the reason if the status is shown as “ERROR” as given below :
{
"message": "All records must contain userID",
"status_code": "403"
}