Add contacts

Add contacts to a list with name, phone number and email.

POST https://cotlet.dev/api/v1/clicksend/lists/{list_id}/contacts

write Confirm

Adds the contacts to one list as Add on the list page does. Each contact needs a phone number with the country code. A campaign scheduled for this list also goes to contacts added before it sends, so the call waits for your OK. It does not check the Opt-Out List: run remove_opted_out_contacts after. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: add_contacts
NameTypeDescription
list_id integer required integer Contact list ID from list_contact_lists.
contacts array required array Objects with phone_number (required), first_name, last_name and email.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/clicksend/lists/1/contacts \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contacts":"contacts"}'
Python
result = client.call("clicksend", "add_contacts", {"list_id":1,"contacts":"contacts"})
Node.js
const result = await cotlet.call('clicksend', 'add_contacts', {"list_id":1,"contacts":"contacts"});
CLI
cotlet call clicksend add_contacts --data '{"list_id":1,"contacts":"contacts"}'

Example response

JSON

{
  "list_id": 128741,
  "list": "Webinar leads",
  "added": 2
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.