Adding New Users
To add a new contact use data streaming in JSON format via Public API.
Use the Add Contact method to create the user's profile to an account or update an existing one.
Note
This method doesn't generate events, so you won't use it to launch workflows.
Using the specified methods, contacts with email addresses will be created as confirmed, as imported from a file. It doesn't allow configuring double opt-in.
If you want to store some custom information about your users, create additional fields before uploading contacts.
For adding/updating bulk of contacts use the Add Contacts method. This resource allows adding/updating up to 3000 contacts with one request.
JSON sample of request body
For this API method, you must pass channels
; other fields are optional. Format and description of all fields are available here.
{
"firstName": "John",
"lastName": "Smith",
"channels": [
{
"type": "mobilepush",
"value": "8900-7654-6456-9876-0012",
"device": {
"appId": "83b77a49-fc28-409b-aeaa-68c9d544ab9d",
"deviceModel": "iPhone 13",
"os": "Android",
"locale": "uk-UA",
"clientVersion": "native",
"appVersion": "4.1.7",
"active": true
}
},
{
"type": "email",
"value": "[email protected]"
}
],
"fields": [
{
"id": 12345,
"value": "writer"
},
{
"id": 12346,
"value": "1990-03-09"
}
]
}
Validation of Users' Names and Last Names
eSputnik validates contact data received through the API according to the following rules:
First Name
The maximum field value length is 40 characters.
Letters of any alphabet (unicode) and up to 3 digits are allowed.
Special characters are prohibited, except:
- apostrophes in the middle of a word
- hyphens in the middle of a word or between words without spaces
- a dot at the end of a short (up to 3 characters) word (for example, Jr.)
It is allowed to use 3 words of more than 3 characters and 3 words of a maximum of 3 characters. Names exclusively composed of numbers and/or special characters are prohibited.
Last Name
The validation rules of the Last name field are the same as for the First name, except that any number of words of any length are allowed (but not more than 40 characters in total).
Updated 9 months ago