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.
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 as919812345678.
- 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;Customwhen 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.
| Refused | cd | When |
|---|---|---|
| 400 | BAD_REQUEST or a field name | The array is empty, pagination is invalid, or a contact fails validation. Messages depend on the request language. |
| 400 | INVALID_CONTACT_LIST | The 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.
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
}
contactsholds the lists, each with itscountof contacts.moreIndicatorisYwhile there are more lists, andnextIndexis where the next page starts.
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.