sendport templates▾
sendport templates
List, create and delete message templates from the terminal.
$
sendport templates lsList templates with their review status and quality rating.
Usage
sendport templates ls [--status <status>] [--category <category>]| Flag | Type | Description |
|---|---|---|
| --status <status> | enum | PENDING, APPROVED, REJECTED, PAUSED, DISABLED. |
| --category <category> | enum | MARKETING, UTILITY, AUTHENTICATION. |
| --lang <code> | string | Filter by language. |
$
sendport templates createSubmit a template for Meta review. Keep the JSON in version control next to your code.
Usage
sendport templates create --file <path.json>| Flag | Type | Description |
|---|---|---|
| --file <path> | string | Template definition. Required. |
| --wait | boolean | Block until review finishes, then exit non-zero on rejection. Good in CI. |
order_shipped.json
{
"name": "order_shipped",
"language": "en",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Your order {{1}} shipped and arrives on {{2}}.",
"example": { "body_text": [["A-4417", "Tuesday"]] }
},
{ "type": "FOOTER", "text": "Reply STOP to opt out." }
]
}$
sendport templates rmDelete a template at Meta. Permanent, and the name is locked for 30 days.
Usage
sendport templates rm <name> [--lang <code>] [--yes]| Flag | Type | Description |
|---|---|---|
| --lang <code> | string | Required when the template exists in several languages. |
| --yes | boolean | Skip the confirmation prompt. |