Contact lists

Make contact lists, find them, and add the people your own systems collect, such as sign-ups and customers, so that campaigns and automations in Oblic can reach them. These routes need a key that holds contacts:manage, and work in your organization's default workspace.


POST/external/contact-list/v1/{contactListId}/add

Add contacts to a list

The body is an array of contacts, each with a name and at least one of an email address, a phone number and a WhatsApp number.

  • Name
    name
    Type
    string
    Description

    Required: the contact's name, of letters, digits, spaces, ', , and -. Letters outside A to Z, such as é, are refused.

  • Name
    email
    Type
    string
    Description

    The contact's email address.

  • Name
    phone
    Type
    string
    Description

    The phone number with its country code and no +, at least 10 digits, such as 919812345678.

  • Name
    whatsApp
    Type
    string
    Description

    The WhatsApp number with its country code and no +, 10 to 15 digits.

  • Name
    source
    Type
    string
    Description

    Where the contacts came from, such as Website. The first contact's applies to every contact in the request; Custom when it leaves it out.

Add ?startJourneys=true to start the automations and journeys whose trigger is "Joins audience group" on this list, for each contact the call puts on it. Without it the call starts none, whatever its source: contacts your systems send are not taken for sign-ups. A contact already on the list starts nothing; one that left it and is added again starts them again.

Add two contacts

curl -X POST https://api.oblic.app/external/contact-list/v1/CLT000R7ZM4Q2VXH00/add \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '[
    { "name": "Asha Rao", "email": "asha@example.org", "source": "Website" },
    { "name": "Ravi Kumar", "phone": "919812345678", "whatsApp": "919812345678" }
  ]'

The answer is 200, with data null. Email addresses are kept in lower case.

RefusedcdWhen
400BAD_REQUEST or a field nameThe array is empty, pagination is invalid, or a contact fails validation. Messages depend on the request language.
400INVALID_CONTACT_LISTThe workspace has no list with that id

Use cd, not the wording of a message, to classify a refusal. See Errors for the response format.


GET/external/contact-list/v1/{nextIndex}/{limit}

List contact lists

The workspace's lists, newest first, limit at a time from nextIndex, which starts at 0. search narrows them to those whose name holds it, whatever its case. limit must be at least 1.

The first 50 lists

curl -G https://api.oblic.app/external/contact-list/v1/0/50 \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d search=newsletter

Response

{
  "status": "success",
  "data": {
    "contacts": [
      { "id": "CLT000R7ZM4Q2VXH00", "name": "Newsletter", "count": 1284 }
    ],
    "moreIndicator": "N",
    "nextIndex": ""
  },
  "errors": null
}
  • contacts holds the lists, each with its count of contacts.
  • moreIndicator is Y while there are more lists, and nextIndex is where the next page starts.

POST/external/contact-list/v1/add

Make a contact list

Make a list

curl -X POST https://api.oblic.app/external/contact-list/v1/add \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "Website sign-ups" }'

The answer is the new list, {"id": …, "name": "Website sign-ups", "count": 0}. Add its contacts with the first route. A name may be given to more than one list.

Was this page helpful?