Add a subscriber
Adds one person to a list.
POST https://cotlet.dev/api/v1/campaign-monitor/lists/{list_id}/subscribers
write Confirm
Returns the subscriber's state on the list. On a list with double opt-in the state is Unconfirmed until the person confirms. The list's own opt-in settings decide which email the new subscriber gets, so the call reaches that person. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| list_id string required | string | List ID from list_lists. |
| email string required | string | Email address of the new subscriber. |
| name string | string | Full name. |
| custom_fields object | object | Custom field values by field name, for example {"Frequency": "Weekly"}. |
Request
curl -X POST https://cotlet.dev/api/v1/campaign-monitor/lists/list_8c41d2/subscribers \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"jane@example.com"}' result = client.call("campaign-monitor", "add_subscriber", {"list_id":"list_8c41d2","email":"jane@example.com"}) const result = await cotlet.call('campaign-monitor', 'add_subscriber', {"list_id":"list_8c41d2","email":"jane@example.com"}); cotlet call campaign-monitor add_subscriber --data '{"list_id":"list_8c41d2","email":"jane@example.com"}' Example response
{
"email": "noor.haddad@example.com",
"list_id": "1c4e8a2b6d9f4073a5b1c8d2e6f30495",
"state": "Unconfirmed"
}