Salami Gateway

API Documentation
Back to Dashboard

SMS Apps

SMS Apps are the core configuration entities in the Salami SMS module. Each app binds a messaging provider driver to credentials and settings.

Get App Details

Retrieve details of a specific SMS app.

GET /api/sms/apps/{sms_app}

Authentication

Requires Bearer token.

Path Parameters

Parameter Type Description
sms_app integer SMS App ID

Response

{
  "data": {
    "id": 1,
    "name": "My Twilio App",
    "type": "Twilio",
    "channel": "sms",
    "sms_limit": 100,
    "phone_number": "+254712345678",
    "group_id": null,
    "payment_app_id": null,
    "created_by": 1,
    "updated_by": 1,
    "created_at": "2026-01-15T10:30:00.000000Z",
    "updated_at": "2026-01-15T10:30:00.000000Z"
  }
}

Status Codes

Code Description
200 Success
401 Unauthenticated
404 App not found

Creating SMS Apps

SMS Apps are created through the Salami web dashboard. Navigate to SMS > Apps > Create New App.

Required Fields (All Providers)

Field Type Required Description
name string Yes Unique name for the app
type string Yes Provider/driver identifier (e.g., Twilio, AfricasTalking)

Additional required fields depend on the selected provider. The form dynamically shows provider-specific fields.


Provider Configuration Fields

Each provider requires different credentials. Below are examples for popular providers.

Twilio -- Twilio

Field Type Required Description
account_sid string Yes Twilio Account SID
auth_token string Yes Twilio Auth Token
phone_number string Yes Twilio phone number (sender)

Africa's Talking -- AfricasTalking

Field Type Required Description
api_key string Yes Africa's Talking API key
username string Yes API username
shortcode string Yes Sender shortcode

MessageBird -- MessageBird

Field Type Required Description
access_key string Yes MessageBird access key
phone_number string Yes Sender phone number

Vonage (Nexmo) -- Vonage

Field Type Required Description
api_key string Yes Vonage API key
api_secret string Yes Vonage API secret
phone_number string Yes Sender phone number

Plivo -- Plivo

Field Type Required Description
auth_id string Yes Plivo Auth ID
auth_token string Yes Plivo Auth Token
phone_number string Yes Sender phone number

Amazon SNS -- AmazonSNS

Field Type Required Description
access_key string Yes AWS access key
secret_access string Yes AWS secret access key
region string Yes AWS region (e.g., us-east-1)

Infobip -- Infobip

Field Type Required Description
api_key string Yes Infobip API key
api_link string Yes Infobip API base URL
phone_number string Yes Sender ID

MSync (Phone Gateway) -- MSync

MSync turns an Android phone into an SMS gateway. No API credentials needed -- the phone connects to Salami via the MSync protocol.

Field Type Required Description
phone_number string Yes Phone's number
device_id string No Device identifier

SmsSync (Phone Gateway) -- SmsSync

Similar to MSync but uses the SMSSync protocol.

Field Type Required Description
phone_number string Yes Phone's number

Generic Provider Fields

Many providers use a common set of fields:

Field Type Description
api_link string API endpoint URL
port string SMPP port (for SMPP providers)
username string API username
password string API password
route string SMS route
sms_type string promotional or transactional
account_sid string Account SID
auth_id string Auth ID
auth_token string Auth token
access_key string Access key
secret_access string Secret access key
access_token string Access/bearer token
api_key string API key
api_secret string API secret
phone_number string Sender phone/number
shortcode string Sender shortcode
user_token string User token
project_id string Project/workspace ID
api_token string API token
auth_key string Auth key
device_id string Device identifier
region string Service region
application_id string Application ID
source_addr_ton string SMPP source address TON
source_addr_npi string SMPP source address NPI
dest_addr_ton string SMPP destination address TON
dest_addr_npi string SMPP destination address NPI
c1 - c7 string Custom/extra configuration fields

SMS App Groups

App Groups allow load distribution across multiple SMS Apps.

Get Group Details

POST /api/sms/groups/{group}

Authentication

Requires Bearer token.

Path Parameters

Parameter Type Description
group integer SMS App Group ID

Response

{
  "data": {
    "id": 1,
    "name": "Production SMS Pool",
    "created_by": 1,
    "created_at": "2026-01-15T10:30:00.000000Z"
  }
}

How Load Balancing Works

When sending via a group (POST /api/sms/groups/{group}/send), Salami:

  1. Retrieves all SMS Apps in the group.
  2. Counts pending/processing messages for each app.
  3. Calculates available capacity: sms_limit - pending_count.
  4. Uses a round-robin load balancer weighted by available capacity.
  5. Routes the message through the least-busy app.
  6. If no app has capacity, one is selected randomly.

Creating Groups

Groups are managed through the web dashboard under SMS > App Groups.

Field Type Required Description
name string Yes Group name

After creating a group, assign SMS Apps to it by setting the group_id on each app.


Payment App Linking

SMS Apps can be linked to a Payment App via payment_app_id. When linked, incoming SMS messages are automatically parsed for payment transaction data using the Payment App's driver. This is used for SMS-based transaction extraction (e.g., M-Pesa confirmation SMS parsing).


Channel Selection

When creating an app, the channel field determines the messaging channel:

Value Description
sms Standard text messaging
mms Multimedia messaging
voice Voice calls
whatsapp WhatsApp messaging

Not all providers support all channels. See the Providers documentation for the capabilities matrix.

Status Codes

Code Description
200 Success
401 Unauthenticated
404 App or Group not found
422 Validation error

Related Documentation


Need help? Contact us at support@dgl.co.ke
© 2026 Deadan Group Limited. All rights reserved.
⚡ API Explorer
LIVE
// Response will appear here...