Message List
Email or SMS message templates.
Email:
Email must at least contain html, text or a subject and can contain any combination of those three.
The organisation the contact belongs to needs to be configured for sending messages.
The emails may contain Jinja-style template variables. Each {{variable}} can be specified as such in the email:
{{variable}}
Three personified variables are taken from each recipient/contact info when specified using the template language: name: contact info name (and thus first and last name) email: contact info email phone_number: contact info phone number
SMS:
The smses may contain Jinja-style template variables. Each {{variable}} can be specified as such in the content:
{{variable}}
Query parameters
name:
Text filter on name
. Supports various lookup types (name__exact by
default).
organisation:
Related filter on organisation
. See the
organisations endpoint.
type:
Choice filter on type
. Options are email
or sms
.
no_further_impact:
Boolean filter on no_further_impact
.
page_size: The maximum number of results to return in list-view. The default is 10.
ordering
Show the results in a specific order.
You can order them by name
, subject
, text
, html
,
type
and organisation__name
.
Add a -
in front to reverse the order.
created:
Temporal filter on created
. Supports various lookup types
(exact
, lt
, lte
, gt
, gte
; created__exact by default).
Filter values should be specified in ISO 8601 YYYY-MM-DDThh:mm:ssZ format.
last_modified:
Temporal filter on last_modified
. Supports various lookup types
(exact
, lt
, lte
, gt
, gte
; last_modified__exact by default).
Filter values should be specified in ISO 8601 YYYY-MM-DDThh:mm:ssZ format.
Examples
?name=Example
?name__icontains=Examp
?subject__startswith=Examp
?text=Examp
?name__icontains=Examp&page_size=100
?organisation__uuid=c5e37ca3495045168f5d911c37ee2319
?ordering=-organisation__name
?ordering=-name
?created__gte=2017-01-01T00:00:00Z
?last_modified__lt=2018-01-01T00:00:00Z
GET /api/v4/messages/?format=api
{
"count": 0,
"next": null,
"previous": null,
"results": []
}