Skip to main content

Create an SMS template

POST 

https://core-prod.malipopay.co.tz/api/v1/sms-template

Creates a new custom SMS template for the authenticated project.

Request

Bodyrequired

    namestringrequired

    Template name (unique per project/env/language)

    Example: payment_confirmation
    templatestringrequired

    Template text with optional placeholders in {{variable}} format

    Example: Dear {{name}}, your payment of {{amount}} {{currency}} has been received. Ref: {{reference}}
    languagestringrequired

    ISO 639-1 language code

    Example: sw
    envstringrequired

    Environment the template is active in (TEST or PROD)

    Possible values: [TEST, PROD]

    Example: TEST
    descriptionstring

    Human-readable description of the template purpose

    Example: Sent to customer after successful payment

Responses

Template created successfully

Schema
    _idstring
    Example: 65b3d92a4e5f6c0a1b8d7e54
    namestring
    Example: payment_confirmation
    templatestring
    Example: Dear {{name}}, your payment of {{amount}} {{currency}} has been received. Ref: {{reference}}
    languagestring
    Example: sw
    envstring

    Possible values: [TEST, PROD]

    Example: TEST
    descriptionstring
    Example: Sent to customer after successful payment
    projectstring

    Project ID this template belongs to

    Example: 63db68a6c5f3e7682e23c2ca
    deletedboolean
    Example: false
    createdAtdate-time
    Example: 2024-03-01T10:00:00.000Z
    updatedAtdate-time
    Example: 2024-03-01T10:00:00.000Z

Authorization: apiToken

name: apiTokentype: apiKeyin: headerdescription: Project API key. Get yours from the Malipopay dashboard under Settings → API Keys.
curl -L 'https://core-prod.malipopay.co.tz/api/v1/sms-template' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'apiToken: <apiToken>' \
-d '{
"name": "payment_confirmation",
"template": "Dear {{name}}, your payment of {{amount}} {{currency}} has been received. Ref: {{reference}}",
"language": "sw",
"env": "TEST",
"description": "Sent to customer after successful payment"
}'
Request
Base URL
https://core-prod.malipopay.co.tz
Auth
Body required
{
  "name": "payment_confirmation",
  "template": "Dear {{name}}, your payment of {{amount}} {{currency}} has been received. Ref: {{reference}}",
  "language": "sw",
  "env": "TEST",
  "description": "Sent to customer after successful payment"
}
Response

Click the Send API Request button above and see the response here!