Add contact to list

Add a contact to a list, creating the contact if the number is new.

POST https://cotlet.dev/api/v1/simpletexting/contact-to-lists

write Confirm

Adds the number to the list and fills the name if you give it. An autoresponder set on that list fires when a contact joins, so adding a contact can send a text within minutes or after the autoresponder's delay. Returns the contact and its lists. Add only people who gave consent to be texted. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: add_contact_to_list
NameTypeDescription
list string required string Name of the contact list, from list_lists.
contact_phone string required string Phone number, with country code.
first_name string string First name.
last_name string string Last name.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/simpletexting/contact-to-lists \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"}'
Python
result = client.call("simpletexting", "add_contact_to_list", {"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"})
Node.js
const result = await cotlet.call('simpletexting', 'add_contact_to_list', {"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"});
CLI
cotlet call simpletexting add_contact_to_list --data '{"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"}'

Example response

JSON

{
  "contact": {
    "name": "Sam Okafor",
    "phone": "+12125550182",
    "lists": [
      "Class reminders"
    ],
    "created": true
  },
  "list": "Class reminders",
  "contacts_in_list": 62
}

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.