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
| Name | Type | Description |
|---|---|---|
| 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 -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"}' result = client.call("simpletexting", "add_contact_to_list", {"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"}) const result = await cotlet.call('simpletexting', 'add_contact_to_list', {"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"}); cotlet call simpletexting add_contact_to_list --data '{"list":"Class reminders","contact_phone":"+12125550182","first_name":"Sam","last_name":"Okafor"}' Example response
{
"contact": {
"name": "Sam Okafor",
"phone": "+12125550182",
"lists": [
"Class reminders"
],
"created": true
},
"list": "Class reminders",
"contacts_in_list": 62
}