Add to Opt-Out List
Add a phone number to the Opt-Out List.
POST https://cotlet.dev/api/v1/clicksend/phones/{phone_number}/opt-outs
write Confirm
Adds the number as + New Contact on the Opt-Out List does. The number stays on your other lists until you run remove_opted_out_contacts. Removing a number from the Opt-Out List is not offered. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| phone_number string required | string | Phone number with the country code. |
Request
curl -X POST https://cotlet.dev/api/v1/clicksend/phones/phone%20number/opt-outs \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("clicksend", "add_opt_out", {"phone_number":"phone number"}) const result = await cotlet.call('clicksend', 'add_opt_out', {"phone_number":"phone number"}); cotlet call clicksend add_opt_out --data '{"phone_number":"phone number"}' Example response
{
"phone_number": "+15550100234",
"added": true
}