API reference
Message templates
Reusable messages.
GET/message-templates
List message templates
Needs the permission templates:read.
| Parameter | In | Type | Notes |
|---|---|---|---|
channel | query | one of email, whatsapp, sms |
curl -X GET https://crm.anibrosdesign.com/api/v1/message-templates \
-H "Authorization: Bearer crm_live_xxxxxxxx"Responses:
200 400 401 403 429
POST/message-templates
Create a message template
Needs the permission templates:manage.
| Body field | Type | Notes |
|---|---|---|
name required | string | at least 1 characters. up to 80 characters |
channel | one of any, email, whatsapp, sms | |
subject | string or null | |
body required | string | at least 1 characters. up to 4000 characters |
curl -X POST https://crm.anibrosdesign.com/api/v1/message-templates \
-H "Authorization: Bearer crm_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"name":"text","channel":"any","subject":"text","body":"text"}'Responses:
201 400 401 402 403 429
POST/message-templates/starters
Starters (message templates)
Needs the permission templates:manage.
curl -X POST https://crm.anibrosdesign.com/api/v1/message-templates/starters \
-H "Authorization: Bearer crm_live_xxxxxxxx"Responses:
200 401 402 403 429
PATCH/message-templates/{id}
Change a message template
Needs the permission templates:manage.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (uuid) |
| Body field | Type | Notes |
|---|---|---|
name | string | at least 1 characters. up to 80 characters |
channel | one of any, email, whatsapp, sms | |
subject | string or null | |
body | string | at least 1 characters. up to 4000 characters |
curl -X PATCH https://crm.anibrosdesign.com/api/v1/message-templates/{id} \
-H "Authorization: Bearer crm_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"name":"text","channel":"any","subject":"text"}'Responses:
200 400 401 402 403 404 412 429
DELETE/message-templates/{id}
Delete a message template
Needs the permission templates:manage.
| Parameter | In | Type | Notes |
|---|---|---|---|
id required | path | string (uuid) |
curl -X DELETE https://crm.anibrosdesign.com/api/v1/message-templates/{id} \
-H "Authorization: Bearer crm_live_xxxxxxxx"Responses:
204 400 401 402 403 404 429
Something missing or unclear? Tell us.