Skip to content

Templates

Retrieve saved SMS and email templates to use in send requests.

GET /api/v1/templates

Query parameters

Parameter Type Description
type string Filter by email or sms. Omit to return both.

Examples

curl "https://admin.notifybulk.com/api/v1/templates" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
curl "https://admin.notifybulk.com/api/v1/templates?type=sms" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
curl "https://admin.notifybulk.com/api/v1/templates?type=email" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response — all types

{
  "success": true,
  "data": {
    "email": [
      {
        "id": 3,
        "name": "Order Shipped",
        "subject": "Your order is on its way!",
        "source": "custom"
      },
      {
        "id": 1,
        "name": "Welcome Email",
        "subject": "Welcome to {{brand}}",
        "source": "starter"
      }
    ],
    "sms": [
      {
        "id": 7,
        "name": "Appointment Reminder",
        "message": "Hi {{name}}, your appointment is tomorrow at {{time}}.",
        "created_at": "2025-04-10 11:00:00"
      }
    ]
  }
}

Response — filtered by type

When type is specified, data is a flat array:

{
  "success": true,
  "type": "sms",
  "data": [
    {
      "id": 7,
      "name": "Appointment Reminder",
      "message": "Hi {{name}}, your appointment is tomorrow at {{time}}.",
      "created_at": "2025-04-10 11:00:00"
    }
  ]
}

Template fields

Email template

Field Type Description
id integer Template ID — use as template_id in Send Email
name string Template display name
subject string Default email subject (may contain {{variables}})
source string custom = created by you, starter = platform default

SMS template

Field Type Description
id integer Template ID — use as template_id in Send SMS
name string Template name
message string SMS body (may contain {{variables}})
created_at string Creation timestamp

Using templates in sends

Pass the id as template_id:

{
  "to": "+12125551234",
  "template_id": 7,
  "variables": {
    "name": "Maria",
    "time": "10:00 AM"
  }
}

See Send SMS → template example and Send Email → template example.