sendport templates▾

sendport templates

List, create and delete message templates from the terminal.

$sendport templates ls

List templates with their review status and quality rating.

Usage
sendport templates ls [--status <status>] [--category <category>]
FlagTypeDescription
--status <status>enumPENDING, APPROVED, REJECTED, PAUSED, DISABLED.
--category <category>enumMARKETING, UTILITY, AUTHENTICATION.
--lang <code>stringFilter by language.
$sendport templates create

Submit a template for Meta review. Keep the JSON in version control next to your code.

Usage
sendport templates create --file <path.json>
FlagTypeDescription
--file <path>stringTemplate definition. Required.
--waitbooleanBlock 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 rm

Delete a template at Meta. Permanent, and the name is locked for 30 days.

Usage
sendport templates rm <name> [--lang <code>] [--yes]
FlagTypeDescription
--lang <code>stringRequired when the template exists in several languages.
--yesbooleanSkip the confirmation prompt.