SmsGetTemplates¶
GET sms/templates/list
Returns the templates of the brand. For the templates a specific manager can actually use in the send dialog, see SmsGetMyProfiles — it returns them grouped by profile.
Access Control¶
Allowed roles: admin, leader, manager, within the brand of the caller.
Request¶
GET request
GET https://{broker_domain}/sms/templates/list?limit=50&where=%7B%22status%22%3A%22ENABLED%22%7D
Authorization: <JWT_TOKEN>
{
"command": "SmsGetTemplates",
"extID": "1",
"data": {
"limit": 50,
"where": {
"status": "ENABLED"
}
}
}
const res = await platform.SmsGetTemplates({
limit: 50,
where: {
status: "ENABLED"
}
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
limit |
int | No | Page size, 1..1000, default 100 |
offset |
int | No | Rows to skip |
orderBy |
array | No | Sorting, for example ["id", "DESC"] |
count |
array | No | Row count aggregate, ["id"] |
where |
object | No | Filters, see Table filter syntax |
Response Data¶
{
"rows": [
{
"id": 4,
"brand": "default",
"name": "Deposit confirmed",
"description": null,
"text": "{{name}}, your deposit of {{amount}} is confirmed",
"language": "EN",
"kind": "TRANSACTIONAL",
"triggerId": 2,
"profileId": null,
"status": "ENABLED"
}
]
}
Errors¶
| Code | Error | Description |
|---|---|---|
401 |
PERMISSION_DENIED |
No manager session |