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

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.

PARAMETERTYPEATTRIBUTE DESCRIPTIONMANDATORY
userIDStringEither user id or anonymous id is mandatory.( identifier for a known user)

User id can be of 100 characters.
Yes
nameStringfull name of user
first_nameStringFirst name of the userNo
last_nameStringLast name of the userNo
emailStringEmail IDNo
mobileStringPhone number of the user in E.164 format
eg. +551155256325, +917850009678
No
birth_dateStringBirth date in YYYY-MM-DD formatNo
genderStringGender - value can only be one of male, female, otherNo
email_opt_ininteger1 -> reachable on email 0 -> not available , 2 -> bouncedNo
sms_opt_ininteger1 -> reachable on sms , 0 -> not available , 2 -> invalidNo
whatsapp_opt_ininteger1 -> opt in for whatsapp , 0 -> no, 2 -> invalidNo

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"
}