Uploading Your Mobile Token Base

Before launching a campaign, you must add information about your users to eSputnik.

To configure the sending of mobile push notifications through the eSputnik, it’s necessary to export the existing mobile token database in JSON format to our system via Public API.

How to Upload Mobile Token

The Add contacts method allows for creating new contacts to an account or updating existing ones. ​​You can add/update up to 3000 contacts with one request.

📘

Note

  • This method automatically generates events for new contacts but will not run a workflow for updated or existing contacts.
  • Contacts with email addresses will be created as confirmed, as imported from a file; however, 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 one contact, use the Add Contact method. This resource allows to create a user's profile or update an existing one.
  • Upload your contact list with external user ID as the main identifier.

JSON sample for channel

For this API method, you must pass the required fields channels and dedupe On; others are optional. Format and description of all fields are available here.

{
    "contacts":
    [
        {
            "firstName": "John",
            "lastName": "Smith",
            "channels":
            [
                {
                    "type": "mobilepush",
                    "value": "8900-7654-6456-9876-0011",
                    "device":
                    {
                        "appId": "83b77a49-fc28-409b-aeaa-68c9d544ab9d",
                        "deviceModel": "iPhone 13",
                        "os": "Android",
                        "locale": "ua",
                        "appVersion": "4.1.6"
                    }
                },
                {
                    "type": "email",
                    "value": "[email protected]"
                }
            ],
            "externalCustomerId": "6add3c31-3ec6-4f34-b20e-8c757fe65270",
            "fields":
            [
                {
                    "id": 12345,
                    "value": "writer"
                },
                {
                    "id": 12346,
                    "value": "1814-03-09"
                }
            ]
        }
    ],
    "dedupeOn": "externalCustomerId",
    "contactFields":
    [
        "firstName",
        "lastName",
        "email",
        "mobilepush",
        "externalCustomerId"
    ],
    "customFieldsIDs":
    [
        12345,
        12346
    ]
}