Documentation

Kimisms SMS Documentation

Complete guide to sending SMS via the portal and API, managing contacts, billing, and tracking delivery.

Overview

Kimisms is a corporate bulk SMS platform that enables businesses to send promotional and transactional SMS messages across Kenyan mobile networks — Safaricom, Airtel, and Telkom.

There are three ways to send SMS through Kimisms:

Quick Send

Send a single SMS to one phone number directly from the portal.

Bulk Campaign

Send messages to entire contact groups at once via the portal.

REST API

Integrate SMS into your applications with our developer API.

Message flow

Compose Message Balance Check Float Deduction Provider Routing Delivered

SMS unit calculation

Messages are charged in units based on character length:

CharactersSMS UnitsExample
1 – 1601 unitShort alert or OTP
161 – 3202 unitsMarketing promo
321 – 4803 unitsDetailed notification
481 – 6404 unitsLong-form update
641 – 8005 unitsMulti-part message
801 – 9606 unitsExtended content
Maximum message length is 960 characters (6 SMS units). Each unit is deducted from your sender ID's float balance.

Account Setup

Before you can send SMS, you need to create an account and get set up on the platform.

1 Register your account

Visit the registration page and sign up with your business email address.

2 Verify your email

Check your inbox for an activation email and click the verification link. You cannot log in until your email is verified.

3 Apply for a Sender ID

Navigate to Sender ID → Applications in the portal. Submit an application with your business name and the required KYC documents.

4 Top up your balance

Go to Billing → Topups to add SMS credit. Choose a package and pay via M-Pesa or request an offline top-up.

5 Start sending

Once your Sender ID is approved and you have balance, you're ready to send SMS via Quick Send, Bulk Campaign, or the API.

Sender IDs

A Sender ID is the name or short code that appears as the sender when a recipient receives your SMS. Each Sender ID is tied to a specific network provider.

Types

TypeDescriptionExample
Sender IDAlphanumeric name (up to 12 characters)KIMISMS, MYBRAND
Short CodeNumeric short code for two-way messaging20880, 40100

Campaign types

TypeUse Case
PROMOTIONALMarketing campaigns, offers, product launches
TRANSACTIONALOTPs, payment confirmations, alerts, notifications

Application process

  1. Go to Sender ID → Applications and click Add Application
  2. Fill in: organization name, provider (Safaricom/Airtel/Telkom), proposed sender name, campaign type, and purpose
  3. Upload required KYC documents (business registration, letter of authorization)
  4. Your application goes through review: PENDINGPROVIDERAPPROVED
  5. Once approved, the Sender ID is created and linked to your account
You need a separate Sender ID for each telco provider. If you want to reach Safaricom, Airtel, and Telkom customers, apply for three Sender IDs.

Quick Send

Quick Send lets you send a single SMS to one phone number directly from the portal. Ideal for testing, one-off alerts, or individual notifications.

How to send

1 Navigate to Sending → Quick Send

Open the Quick Send page from the sidebar.

2 Select a Sender ID

Choose the Sender ID to send from. The dropdown shows each sender's name, provider, and available float balance.

3 Enter the recipient number

Type the phone number in international format. The number must match the provider of your selected Sender ID.

4 Compose your message

Type your message (maximum 960 characters). The character count and SMS unit cost are displayed in real time.

5 Send

Click Send Message. The system deducts the SMS units from your float balance and queues the message for delivery.

Required fields

FieldDescriptionValidation
sender_idThe approved Sender ID to send fromMust have sufficient float balance
numberRecipient phone number9-13 digits, must match sender provider
messageSMS body textMax 960 characters
The recipient's network must match the Sender ID's provider. A Safaricom Sender ID can only send to Safaricom numbers. Use Bulk Send with multiple Sender IDs to reach all networks.

Bulk Campaign

Bulk campaigns let you send the same message to hundreds or thousands of contacts at once. Messages are processed asynchronously in the background.

How to send a bulk campaign

1 Prepare your contacts

Create a contact group and upload your recipient list (or add contacts manually).

2 Navigate to Sending → Bulk Blast

Open the Bulk Send page from the sidebar.

3 Select Sender IDs

Select one or more Sender IDs. The system automatically matches each contact to the right Sender ID based on their network provider.

4 Select contact groups

Choose one or more contact groups to send to. You can optionally check Remove Duplicates to avoid sending to the same number twice.

5 Compose or select a template

You have two options:

  • Compose Message — Type your message directly (max 960 characters)
  • Use Template — Select a pre-built message template with dynamic field replacement

6 Send campaign

Click Send. The campaign is created as a Blast record and messages are processed asynchronously. Each contact's SMS units are deducted from the matching Sender ID's float balance.

How provider matching works

When you send a bulk campaign, each contact is automatically routed to the correct provider:

  1. The system reads the contact's phone number prefix
  2. It looks up the provider (Safaricom, Airtel, or Telkom) from the prefix table
  3. It finds a matching Sender ID from your selected list for that provider
  4. If no matching Sender ID is found, that contact is skipped with a FAILED status
Select Sender IDs from all three providers (Safaricom, Airtel, Telkom) to maximize delivery across all Kenyan networks.

Template Messages

Templates let you send personalized messages to each contact by inserting dynamic fields from your contact data.

How it works

When you upload contacts via CSV, additional columns beyond "number" are mapped to field1 through field6. You can reference these fields in your message template.

Example

If your CSV has columns: number, name, amount

  • number → contact phone number
  • name → mapped to field1
  • amount → mapped to field2

Your template message:

Template Hi {name}, your payment of KES {amount} has been received. Thank you for choosing Kimisms.

Each contact will receive a personalized message with their actual name and amount values inserted.

Creating templates

  1. Go to Contacts → Templates
  2. Click Add Template and select the contact group
  3. Compose your message using {field_name} placeholders
  4. Save the template — it's now available when sending bulk campaigns

Contact Groups

Contact groups organize your recipients into segmented lists for targeted messaging.

Creating a group

  1. Go to Contacts → Contact Groups
  2. Click Upload Group
  3. Enter a group name and description
  4. Upload a CSV file with your contacts
  5. The system processes the file in the background and assigns providers automatically based on phone number prefixes

Adding individual contacts

Within a group, click Add Contact to add a single contact manually. Enter the phone number and any custom field values.

CSV Upload Format

Upload contacts in bulk using a CSV file. The system supports up to 7 columns.

CSV requirements

ColumnMappingRequired
numberPhone number (first column, must be named "number")Yes
Column 2Mapped to field1No
Column 3Mapped to field2No
Column 4Mapped to field3No
Column 5Mapped to field4No
Column 6Mapped to field5No
Column 7Mapped to field6No

Example CSV

CSV number,name,company,amount 254712345678,John Doe,Acme Corp,1500 254723456789,Jane Smith,Beta Ltd,2300 254734567890,Bob Wilson,Gamma Inc,850
Phone numbers can be in format 254XXXXXXXXX (12 digits), 0XXXXXXXXX (10 digits), or 7XXXXXXXX (9 digits). The system will detect the provider automatically from the prefix.

Duplicate handling

During upload, you can check Remove Duplicates to automatically remove contacts with duplicate phone numbers. During bulk send, you can also enable deduplication to avoid sending multiple messages to the same number across groups.

Message Templates

Templates are reusable message blueprints tied to specific contact groups. They use field placeholders to personalize messages for each recipient.

Placeholder syntax

Use curly braces with the CSV column header name:

Template syntax Dear {name}, your invoice of KES {amount} for {company} is due on {due_date}. Pay via M-Pesa to 12345.

The column names from your CSV become the placeholder keys. The system maps them to field1field6 internally, but you reference them by their original CSV header name.

Top-up Balance

To send SMS, you need sufficient float balance on your Sender IDs. Top up by purchasing SMS packages.

Top-up process

1 Go to Billing → Topups

Click Add Topup to start.

2 Select Sender ID

Choose which Sender ID you want to add balance to. Available packages will load based on the provider.

3 Choose a package

Select an SMS package. Each package has a rate (price per SMS unit) and you specify how many units to purchase.

4 Choose payment method

Select M-Pesa for instant mobile payment, or Offline for manual bank transfer (admin approval required).

5 Complete payment

For M-Pesa, enter your phone number and confirm the STK push on your phone. Balance is credited instantly once payment is confirmed.

M-Pesa Payment

Kimisms integrates with Safaricom's M-Pesa Lipa Na M-Pesa (STK Push) for instant balance top-ups.

How it works

  1. Select M-Pesa as your payment method during top-up
  2. Enter your M-Pesa phone number in format 254XXXXXXXXX
  3. The system sends an STK push to your phone
  4. Enter your M-Pesa PIN to confirm payment
  5. On successful payment, your float balance is automatically updated

Transaction statuses

PENDING COMPLETED or FAILED
STK push will timeout after a few seconds. If you miss it, you'll need to initiate a new top-up request.

Float & Balance

Float is your SMS credit balance. Each Sender ID maintains its own float balance. When you send a message, the required SMS units are deducted from the relevant Sender ID's float.

Viewing your balance

  • Navbar — The balance dropdown in the top bar shows your total balance and breakdown by provider (Admin+ roles)
  • Billing → Float — View detailed float balances per Sender ID
  • Quick Send form — The Sender ID dropdown shows available balance alongside each option

Balance deduction

Balance is deducted at the time of sending, before the message reaches the network provider. The system uses atomic database operations to prevent race conditions on concurrent sends.

If a message fails to deliver after balance has been deducted, the units are not automatically refunded. Contact support for refund requests.

API Authentication

The Kimisms API uses OAuth 2.0 client credentials flow. You exchange your Client ID and Client Secret for a Bearer token.

Step 1: Generate credentials

  1. Go to Developer → Credentials in the portal
  2. Click Generate Credentials
  3. Copy your Client ID and Client Secret — store them securely
Your Client Secret is only shown in the portal in truncated form. Store it securely when first generated. If lost, you'll need to regenerate your credentials.

Step 2: Get access token

HTTP POST /api/generate-token Content-Type: application/json { "grant_type": "client_credentials", "client_id": "your_client_id_here", "client_secret": "your_client_secret_here" }

Response

JSON { "token_type": "Bearer", "access_token": "eyJhbGciOiJIUzI1NiIs...", "expires_in": 900 }

Use the token in subsequent API requests in the Authorization header:

Header Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Send SMS via API

Send a single SMS message programmatically using a POST request.

Endpoint

HTTP POST /api/send-sms Authorization: Bearer {access_token} Content-Type: application/json

Request body

FieldTypeRequiredDescription
sender_namestringYesYour approved Sender ID name
contactstringYesRecipient phone number (9-13 digits)
messagestringYesSMS body text (max 10,000 chars)
callback_urlstringNoURL to receive delivery status updates

Send SMS — code example

Pythonimport requests # Step 1: Get access token token_resp = requests.post( "https://your-domain.com/api/generate-token", json={ "grant_type": "client_credentials", "client_id": "your_client_id", "client_secret": "your_client_secret", } ) token = token_resp.json()["access_token"] # Step 2: Send SMS sms_resp = requests.post( "https://your-domain.com/api/send-sms", headers={"Authorization": f"Bearer {token}"}, json={ "sender_name": "KIMISMS", "contact": "254712345678", "message": "Your OTP is 482910", "callback_url": "https://your-app.com/callback", } ) print(sms_resp.json())

Success response

JSON { "message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "contact": "254712345678", "status": "INITIATED", "description": "Message queued for delivery", "provider": "Safaricom" }

Idempotency

To prevent duplicate sends, include an Idempotency-Key header with a unique value. Requests with the same key within 24 hours return the cached response instead of sending again.

Header Idempotency-Key: unique-request-id-12345

Delivery Callbacks

If you provide a callback_url when sending via API, Kimisms will send a POST request to your URL when the delivery status changes.

Callback payload

JSON { "message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "contact": "254712345678", "status": "DELIVERED", "description": "Message delivered to handset", "provider": "Safaricom" }

Status values

StatusDescription
INITIATEDMessage created and queued for processing
SENTMessage dispatched to the network provider
DELIVEREDMessage confirmed delivered to the recipient's handset
FAILEDMessage failed to deliver (insufficient balance, invalid number, provider error)

Status progression

INITIATED SENT DELIVERED

A message can transition to FAILED from any prior status.

Error Handling

The API returns standard HTTP status codes with JSON error bodies.

Status CodeMeaningCommon Cause
400Bad RequestMissing or invalid fields in the request body
401UnauthorizedInvalid or expired access token
403ForbiddenInvalid credentials or insufficient permissions
429Too Many RequestsRate limit exceeded — wait and retry
500Server ErrorInternal error — contact support

Error response format

JSON { "error": "Invalid sender_name", "description": "No approved Sender ID found matching 'MYSENDER'" }

Delivery Reports

Track the performance of your SMS campaigns with detailed delivery reports.

Accessing reports

  • Reports → Blasts — View all campaigns (Quick, Bulk, API sends) with total SMS counts
  • Reports → SMS Logs — Drill into individual message statuses with filters

Report metrics

MetricDescription
Total MessagesTotal number of SMS logs in the campaign
DeliveredMessages confirmed delivered to recipient handsets
SentMessages dispatched to the provider but not yet confirmed
InitiatedMessages queued but not yet dispatched
FailedMessages that failed at any stage
Success RatePercentage of delivered messages vs total: (delivered / total) × 100
Telco BreakdownMessage count per provider (Safaricom, Airtel, Telkom)

SMS Logs

SMS logs provide a detailed record of every message sent through the platform.

Log fields

FieldDescription
NumberRecipient phone number
Sender IDThe Sender ID used to send the message
MessageSMS content
StatusCurrent delivery status (INITIATED, SENT, DELIVERED, FAILED)
UnitsNumber of SMS units consumed
RefProvider message ID for tracking
Created AtTimestamp when the message was created

Filtering logs

Use the search and filter options to narrow down logs by status, provider, date range, or phone number.

Status Tracking

Each SMS has a complete status history. Click on any SMS log entry to view the full timeline of status changes.

Status log timeline

Each status change is recorded with:

  • Status — The new status value
  • Description — Details about the change (provider response, error message)
  • Timestamp — When the status change occurred

Common failure reasons

ReasonDescriptionResolution
Insufficient balanceNot enough float on the Sender IDTop up your balance
No matching senderNo Sender ID for the recipient's providerApply for a Sender ID on that network
Invalid numberPhone number format is incorrectCheck the number format (9-13 digits)
Provider errorThe telco rejected the messageCheck message content and sender status