Skip to main content
POST
/
templates
/
{template_id}
/
send
Send using template
curl --request POST \
  --url https://api.hixbe.com/sms/templates/{template_id}/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Hixbe-Version: <hixbe-version>' \
  --data '
{
  "to": "8801712345678",
  "variables": {
    "customer_name": "John",
    "order_id": "12345",
    "delivery_date": "Jan 20"
  },
  "from": "HIXBE",
  "route": "transactional"
}
'
{
  "id": "msg_abc123xyz",
  "to": "8801712345678",
  "from": "HIXBE",
  "body": "Your OTP is 391202. Valid for 5 minutes.",
  "status": "delivered",
  "created_at": "2026-01-15T10:30:00Z",
  "route": "transactional",
  "segments": 1,
  "cost": 0.5,
  "scheduled_at": "2026-01-15T14:30:00Z",
  "sent_at": "2026-01-15T10:30:05Z",
  "delivered_at": "2026-01-15T10:30:15Z",
  "error_code": "number_unreachable"
}
Send SMS using a template with variable substitution.

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. Format: Authorization: Bearer sk_live_xxxxx

Headers

Hixbe-Version
string
default:2026-01-01
required

API version in YYYY-MM-DD format. Using the latest version ensures access to newest features.

Pattern: ^\d{4}-\d{2}-\d{2}$

Path Parameters

template_id
string
required

Template ID

Body

application/json
to
string
required

Recipient phone number

Example:

"8801712345678"

variables
object
required

Key-value pairs for template variables

Example:
{
"customer_name": "John",
"order_id": "12345",
"delivery_date": "Jan 20"
}
from
string

Sender ID

Example:

"HIXBE"

route
enum<string>
Available options:
otp,
transactional,
promotional
Example:

"transactional"

Response

Message sent using template

SMS message object with delivery status and metadata

id
string
required

Unique message identifier

Example:

"msg_abc123xyz"

to
string
required

Recipient phone number in international format

Example:

"8801712345678"

from
string
required

Sender ID (alphanumeric or numeric)

Example:

"HIXBE"

body
string
required

Message content

Example:

"Your OTP is 391202. Valid for 5 minutes."

status
enum<string>
required

Current message status

Available options:
queued,
sent,
delivered,
failed,
expired
Example:

"delivered"

created_at
string<date-time>
required

Message creation timestamp

Example:

"2026-01-15T10:30:00Z"

route
enum<string>

Message route used for delivery

Available options:
otp,
transactional,
promotional
Example:

"transactional"

segments
integer

Number of SMS segments (1 segment = 160 chars)

Required range: x >= 1
Example:

1

cost
number

Message cost in account currency

Required range: x >= 0
Example:

0.5

scheduled_at
string<date-time> | null

Scheduled delivery time (ISO 8601 format)

Example:

"2026-01-15T14:30:00Z"

sent_at
string<date-time> | null

Timestamp when message was sent to carrier

Example:

"2026-01-15T10:30:05Z"

delivered_at
string<date-time> | null

Timestamp when message was delivered

Example:

"2026-01-15T10:30:15Z"

error_code
string | null

Error code if delivery failed

Example:

"number_unreachable"