Templates

Templates define reusable multi-channel text for OTPs, utility notifications, and invitations.

Which account uses which templates?

AccountTemplate sourceSend constraint
PartnerYour templates (partner_id = you)Optional template_code; free-form body allowed
DeveloperOnly approved templates in the developer catalogtemplate_code required - see Developers

Partner API

List

GET /api/v1/templates

Create

POST /api/v1/templates

{
  "code": "payment_reminder",
  "channel": "whatsapp",
  "lang": "fr",
  "category": "utility",
  "body": "{{partner_name}}: paiement de {{amount}} {{currency}} à régler avant {{date}}."
}

Submit for approval

POST /api/v1/templates/{template_id}/submit

Provider approval may be immediate in the sandbox (stub).

Use a template when sending

{
  "phone": "+228XXXXXXXX",
  "template_code": "otp",
  "vars": {
    "code": "483920",
    "ttl": 10
  },
  "lang": "fr"
}

MorisBox renders {{placeholders}} into rendered_body before routing.

Channels

The same code and lang often exist per channel (whatsapp, sms, inapp).

Developer API

GET /api/v1/dev/templates
POST /api/v1/dev/messages   # template_code required

Guide: Developer Accounts.