Uploading contacts in batch via API

When connecting external systems to Remarkety, you may want to upload contacts in batch through an API, instead of uploading files through the app.

To do this, you need the store's ID and a user API token. Get both on the Settings -> API Keys page in Remarkety:

 

To upload / update the contacts in batch, your server will need to POST to the following endpoint:

https://app.remarkety.com/api/v2/stores/<store id>/contacts/batch

 
You can upload up to 100 contacts on each batch.
 
The request should be a POST request with the following format.
 
Headers:
Content-Type: application/json
X-Token: <API Token>
Body:
{
  "contacts": [
    {
      "email": "guy@remarkety.com",
      "tags": ["test1","test2"],
      "accepts_marketing": true
    }, 
    {
      "email": "invalid",
      "tags": ["test2"]
     }
  ],
  "update_existing": true,
  "append_tags": true
}
The JSON contains the following fields:
 
"contacts": An array of contact information objects
"update_existing": If set to true, will update information for existing contacts. If false, will only create new contacts but if a contact already exists, the call will not update information.
"append_tags": If set to true, the tags received will be appended to the contact's existing tags. If set to false, then the contacts existing tags will be replaced by the tags sent here.
 
 
Response example:
{
    "success": 1,
    "failed": 1,
    "failedReason": [
        {
            "email": "invalid",
            "reason": "Invalid email address"
        }
    ]
}
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.