Elixir Elixir Batch Messaging Integration

Legacy Integration: This endpoint is maintained for backward compatibility with existing Elixir-based systems. New integrations should use the SMS API v2 which offers better performance, JSON responses, and delivery reporting.

The Elixir Batch Messaging endpoint accepts HTTP POST requests with form-encoded parameters matching the Elixir SMS platform's API format. It allows sending batch SMS messages to multiple recipients in a single request.

Endpoint

POST https://{host}/api/elixir/batchmessage.aspx

Example deployments: https://desk.sms.com.na (SaaS), https://sms.yourcompany.com (Enterprise OnSite)

Content-Type

Content-Type: application/x-www-form-urlencoded

Authentication

Authentication is handled via the Password form parameter, which should contain your SMSDESK API key. The User parameter is accepted but not validated — it is used only for logging purposes.

Getting Your API Key

  1. Log in to the SMSDESK Portal
  2. Navigate to your SMS Channel settings
  3. Copy your existing API key or generate a new one

Parameters

All parameters are sent as form-encoded fields in the POST body.

Parameter Type Required Description
User string Yes Account username. Not validated — used for logging only.
Password string Yes Your SMSDESK API key (used for authentication)
Message string Yes The SMS message text to send
Numbers string Yes Comma-separated list of recipient phone numbers (e.g., 264811234567,264812345678)

Response Format

The endpoint returns a plain text response (not JSON). The response is a comma-separated list of results, one per recipient:

{sms_id}:{recipient}:{status},{sms_id}:{recipient}:{status},...

Response Fields

Field Description
sms_id Internal SMS message ID (numeric). 0 indicates an error.
recipient The recipient phone number
status Message status: PENDING, DELIVERED, FAILED, or ERROR

Success Response Example

12345:264811234567:PENDING,12346:264812345678:PENDING

Error Response Examples

0:264811234567:ERROR,12346:264812345678:PENDING

The first recipient failed (sms_id=0, status=ERROR) while the second succeeded.

Error: invalid set of parameters. Expecting [User, Password, Message, Numbers]

Returned when one or more required parameters are missing.

Code Examples

cURL

curl -X POST https://{host}/api/elixir/batchmessage.aspx \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "User=myaccount&Password=your-api-key&Message=Hello from Elixir&Numbers=264811234567,264812345678"

Python

import requests

url = "https://{host}/api/elixir/batchmessage.aspx"
data = {
    "User": "myaccount",
    "Password": "your-api-key",
    "Message": "Hello from Python!",
    "Numbers": "264811234567,264812345678"
}

response = requests.post(url, data=data)
print(response.text)
# Output: 12345:264811234567:PENDING,12346:264812345678:PENDING

PHP

<?php
$url = "https://{host}/api/elixir/batchmessage.aspx";
$data = http_build_query([
    "User" => "myaccount",
    "Password" => "your-api-key",
    "Message" => "Hello from PHP!",
    "Numbers" => "264811234567,264812345678"
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
// Output: 12345:264811234567:PENDING,12346:264812345678:PENDING
?>

C# (.NET)

using System.Net.Http;
using System.Collections.Generic;

var client = new HttpClient();
var data = new FormUrlEncodedContent(new Dictionary<string, string>
{
    {"User", "myaccount"},
    {"Password", "your-api-key"},
    {"Message", "Hello from C#!"},
    {"Numbers", "264811234567,264812345678"}
});

var response = await client.PostAsync(
    "https://{host}/api/elixir/batchmessage.aspx", data);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
// Output: 12345:264811234567:PENDING,12346:264812345678:PENDING

JavaScript (Node.js)

const axios = require('axios');
const querystring = require('querystring');

const url = 'https://{host}/api/elixir/batchmessage.aspx';
const data = querystring.stringify({
    User: 'myaccount',
    Password: 'your-api-key',
    Message: 'Hello from Node.js!',
    Numbers: '264811234567,264812345678'
});

const response = await axios.post(url, data, {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
});
console.log(response.data);
// Output: 12345:264811234567:PENDING,12346:264812345678:PENDING

Troubleshooting

Issue Cause Solution
Error: invalid set of parameters One or more required parameters missing Ensure all four parameters are present: User, Password, Message, Numbers
0:{recipient}:ERROR Backend API rejected the message (invalid API key, insufficient credit, etc.) Verify your API key is correct and your account has sufficient SMS credits
Empty response No recipients were processed Check that the Numbers field contains valid phone numbers separated by commas
HTTP 500 error Server-side exception Contact your SMSDESK administrator with the timestamp and request details
Ready to Start? Get your API key from the SMSDESK Portal and start sending batch SMS messages!

← Back to Custom Integrations