+255 734 666 100 help@webline.africa Dar es Salaam, Tanzania
API v3.0

SMS API documentation for fast and reliable application messaging.

Integrate Webline Africa SMS into your applications using a bearer-token authenticated API designed for message sending, automation, and operational delivery tracking.

Authentication

Authenticate every request with a bearer token.

According to the official Webline Africa API Docs page, all API requests require a bearer token passed through the authorization header. The token is obtained from your dashboard.

Authorization Header
Authorization: Bearer YOUR_API_TOKEN
Send SMS

Use the SMS send endpoint for single-recipient delivery.

The official API Docs page presents a `POST` endpoint for sending SMS to a recipient in international number format.

POST Request
POST https://sms.webline.africa/api/v3/sms/send
Query Parameters

Required fields for the send request.

These parameters are shown on the official documentation page for the `send` endpoint.

Parameter Type Required Description
recipient string Yes Phone number in international format, for example `+255734666100`.
sender_id string Yes Sender ID for the message, with the official docs indicating up to 11 characters.
message string Yes Message body content, passed as a URL-encoded value.
Code Examples

Reference examples for common integration paths.

The official API docs show PHP, JavaScript, and Python examples. The samples below mirror the same implementation pattern while keeping the examples clean and easy to adapt.

PHP cURL
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sms.webline.africa/api/v3/sms/send?recipient=%2B255734666100&sender_id=Webline&message=Hello%20from%20Webline",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer YOUR_API_TOKEN"
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
JavaScript Fetch
const url = "https://sms.webline.africa/api/v3/sms/send?recipient=%2B255734666100&sender_id=Webline&message=Hello%20from%20Webline";

const options = {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN"
  }
};

fetch(url, options)
  .then((res) => res.json())
  .then((json) => console.log(json))
  .catch((err) => console.error(err));
Python Requests
import requests

url = "https://sms.webline.africa/api/v3/sms/send"
params = {
    "recipient": "+255734666100",
    "sender_id": "Webline",
    "message": "Hello from Webline"
}
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN"
}

response = requests.post(url, params=params, headers=headers)
print(response.json())
Token source Obtain the bearer token from your Webline Africa dashboard before making API requests.
Recipient format Use international format for phone numbers to match the documented request expectations.
Responses

Understand success and error responses quickly.

The official documentation shows JSON responses for both successful requests and authentication failures.

200 OK
{
  "status": "success",
  "message_id": "12345-abcdef",
  "recipient": "+255734666100",
  "delivery_status": "SENT"
}
401 Unauthorized
{
  "status": "error",
  "message": "Invalid API token."
}

Need help integrating the SMS API?

Contact the Webline Africa team if you need onboarding support, token setup guidance, or help connecting the API to your application workflow.