Send an email
Email chosen contacts or the registrants of an event, now or scheduled.
POST https://cotlet.dev/api/v1/wild-apricot/emails
Composes a plain email under Communication > Email. Give contact_ids, or event_id (with checked_in_only for the attendees). Wild Apricot sends one email per unique address and hides other recipients. Attachments are not possible; put a link in the body. Sent now, it waits in Wild Apricot's queue for a few minutes to a few hours. schedule_at uses your organization's timezone. Needs a full administrator, membership manager, events manager or donations manager. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| subject string required | string | Subject line. |
| body string required | string | Plain text of the message. Links are allowed. |
| contact_ids array | array | Contact IDs to email, from list_contacts or list_event_registrants. |
| event_id integer | integer | Email the registrants of this event, from list_events. |
| checked_in_only boolean | boolean | With event_id, only registrants who were checked in. Default: false. |
| schedule_at datetime | datetime | Deliver later, in your organization's timezone. Omit to send now. |
Request
curl -X POST https://cotlet.dev/api/v1/wild-apricot/emails \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"event_id":7210,"checked_in_only":true,"subject":"Thank you for riding with us on Saturday","body":"Thanks for coming to Saturday'\''s group ride. The photo album is here: https://yourclub.example/ride-photos"}' result = client.call("wild-apricot", "send_email", {"event_id":7210,"checked_in_only":True,"subject":"Thank you for riding with us on Saturday","body":"Thanks for coming to Saturday's group ride. The photo album is here: https://yourclub.example/ride-photos"}) const result = await cotlet.call('wild-apricot', 'send_email', {"event_id":7210,"checked_in_only":true,"subject":"Thank you for riding with us on Saturday","body":"Thanks for coming to Saturday's group ride. The photo album is here: https://yourclub.example/ride-photos"}); cotlet call wild-apricot send_email --data '{"event_id":7210,"checked_in_only":true,"subject":"Thank you for riding with us on Saturday","body":"Thanks for coming to Saturday'\''s group ride. The photo album is here: https://yourclub.example/ride-photos"}' Example response
{
"email_id": 20318,
"status": "queued",
"recipients": 18,
"event_id": 7210,
"scheduled_for": null,
"subject": "Thank you for riding with us on Saturday"
}