Messaging
WhatsApp and e-mail from inside the CRM.
GET/messaging/email
Get email (messagings)
Needs the permission activities:create.
curl -X GET https://crm.anibrosdesign.com/api/v1/messaging/email \
-H "Authorization: Bearer crm_live_xxxxxxxx"Responses:
200 401 403 429
POST/messaging/email/preview
Preview a lead e-mail
Returns the HTML and the plain text of the e-mail exactly as the lead would receive it (the real template, the sender's own signature, the company footer). Nothing is sent.
Needs the permission activities:create.
| Body field | Type | Notes |
|---|---|---|
subject | string | up to 200 characters. default "" |
body | string | up to 4000 characters. default "" |
curl -X POST https://crm.anibrosdesign.com/api/v1/messaging/email/preview \
-H "Authorization: Bearer crm_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"subject":"","body":""}'Responses:
200 400 401 402 403 429
POST/messaging/send
Send (messagings)
Needs the permission activities:create.
| Parameter | In | Type | Notes |
|---|---|---|---|
Idempotency-Key | header | string | Any unique string up to 128 characters. Repeating the request with the same key returns the first response. up to 128 characters |
| Body field | Type | Notes |
|---|---|---|
leadId required | string (uuid) | |
channel required | one of email, whatsapp | |
subject | string | up to 200 characters |
body | string | up to 4000 characters. default "" |
template | object | |
template.name required | string | at least 1 characters. up to 100 characters |
template.language required | string | at least 2 characters. up to 10 characters |
template.params | list of string | up to 10 items |
curl -X POST https://crm.anibrosdesign.com/api/v1/messaging/send \
-H "Authorization: Bearer crm_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"leadId":"01a15d23-0000-7000-8000-000000000000","channel":"email","subject":"text"}'Responses:
202 400 401 402 403 429
GET/messaging/whatsapp
Get whatsapp (messagings)
Needs the permission integrations:read.
curl -X GET https://crm.anibrosdesign.com/api/v1/messaging/whatsapp \
-H "Authorization: Bearer crm_live_xxxxxxxx"Responses:
200 401 403 429
PUT/messaging/whatsapp
Set whatsapp (messagings)
Needs the permission integrations:manage.
| Body field | Type | Notes |
|---|---|---|
phoneNumberId required | string | at least 5 characters. up to 40 characters |
accessToken required | string | at least 20 characters. up to 1000 characters |
curl -X PUT https://crm.anibrosdesign.com/api/v1/messaging/whatsapp \
-H "Authorization: Bearer crm_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"phoneNumberId":"text","accessToken":"text"}'Responses:
200 400 401 402 403 412 429
DELETE/messaging/whatsapp
Remove whatsapp (messagings)
Needs the permission integrations:delete.
curl -X DELETE https://crm.anibrosdesign.com/api/v1/messaging/whatsapp \
-H "Authorization: Bearer crm_live_xxxxxxxx"Responses:
204 401 402 403 429
Something missing or unclear? Tell us.