Skip to content
e-MC

Developers

An HTTP API (REST) and SMPP to connect your systems to the e-MC platform, plus a Phone Number Checker API. The previews below show their structure with fictitious values; the base URL, credentials and full documentation are provided during integration.

  • HTTP API (REST)
  • SMPP
  • Delivery reports
  • Phone Number Checker API

SMS API (HTTP / REST)

The e-MC REST API sends your SMS from your server and returns their delivery status. Here is the structure of a send, with fictitious values.

  • HTTP API. JSON REST API, called from your server.
  • SMS sending. One message to one recipient, or a batch to several recipients in one request. The account balance can be queried through the API.
  • Authentication. HTTP Basic authentication with the credentials provided by e-MC. Without valid credentials, the API returns 401.
  • Delivery reports. Status of one message (DELIVERED, UNDELIV, EXPIRED, PENDING), or of up to 100 messages in a single request.
  • Error handling. Explicit HTTP codes (for example 401, 404, 429 when the rate limit is exceeded, 503) and a detailed error code for delivery failures.
Send an SMSHTTP
POST {{baseUrl}}/sms
Authorization: Basic YOUR_ENCODED_CREDENTIALS
Content-Type: application/json

{
  "from": "YOUR_SENDER_ID",
  "to": "229XXXXXXXXX",
  "content": "Your verification code is 482913"
}
ResponseJSON
HTTP 200

{
  "data": {
    "Success": "Please save this id",
    "messageId": "YOUR_MESSAGE_ID"
  }
}
Get the delivery statusHTTP
GET {{baseUrl}}/sms/YOUR_MESSAGE_ID/status
Authorization: Basic YOUR_ENCODED_CREDENTIALS

{
  "data": {
    "msgid": "YOUR_MESSAGE_ID",
    "status": "DELIVERED",
    "destination_addr": "229XXXXXXXXX",
    "created_at": "YYYY-MM-DD HH:MM:SS",
    "status_at": "YYYY-MM-DD HH:MM:SS"
  }
}

{{baseUrl}} — Base URL provided by e-MC during integration. All values shown are fictitious.

Phone Number Checker API (e-PNC)

The e-PNC API validates an international phone number and returns its country, operator and line type in a single call. It is called from your backend, for example before sending an OTP.

  • Validity. Tells you whether the number is valid and mobile; otherwise, a reason: invalid number, non-mobile line or unreadable format.
  • Country. ISO country code and country name.
  • Operator. The operator network (MTN, Orange, Airtel…), or unknown when it cannot be identified.
  • Line type. mobile, fixed_or_mobile, fixed_line, voip or unknown.
  • Accepted formats. E.164 (recommended), 00 prefix or digits only with the country dial code; spaces are ignored.
  • Authentication and errors. Key sent in the x-api-key header, called from your server only. HTTP codes 400, 401, 402 (no credits left) and 429 (rate limit).
Validate a numberHTTP
POST {{baseUrl}}/[resource]
x-api-key: YOUR_API_KEY
Content-Type: application/json

{
  "phone": "+229XXXXXXXXX"
}
Response: valid mobile numberJSON
HTTP 200

{
  "valid": true,
  "phone_e164": "+229XXXXXXXXX",
  "phone_local": "229XXXXXXXXX",
  "country_code": "BJ",
  "country": "Benin",
  "network": "MTN",
  "type": "mobile",
  "recommended_action": "proceed"
}
Response: invalid numberJSON
HTTP 200

{
  "valid": false,
  "reason": "invalid_number"
}

{{baseUrl}} — Base URL provided by e-MC. The resource path is given in the documentation. All values shown are fictitious.

HTTP API or SMPP?

HTTP API (REST)

Designed for web, mobile and business applications: your code calls the API when an event must trigger an SMS (sign-up, payment, alert).

  • SMS sending
  • Delivery report collection
  • Number check with the e-PNC API
  • Inbound SMS reception

SMPP

Standard protocol for system-to-system connection with a short message centre. It is meant for platforms and messaging systems, for companies that already run an SMPP infrastructure, and for large volumes.

  • System-to-system connection, for platforms and messaging systems
  • Direct integration into an existing SMPP infrastructure
  • Continuous session with our SMSC, suited to large volumes

Illustration: indicative mockup, not contractual.

At a glance

CriterionHTTP API (REST)SMPP
ConnectionHTTP requests issued by your applicationContinuous system-to-system session
Typical useWeb, mobile and business applications: OTP, alerts, notificationsSending platforms, resellers, significant traffic
SMS sendingYesYes
Delivery reportsYesYes
Inbound SMSYesYes
Number checkYes, with the e-PNC APIYes, with the e-PNC API
Account and documentationProvided on requestProvided on request

What the integration lets you do

  • Send SMS

    Through the HTTP API (REST) or SMPP, to Africa and worldwide.

  • Delivery reports

    Collect the status of every message.

  • Check a number

    With the Phone Number Checker (e-PNC) API: validity, country, operator and line type.

  • Receive SMS

    Retrieve inbound SMS from your contacts.

How a send works

  1. 1

    Your system submits the message

    Recipient, sender and text, through the HTTP API or SMPP.

  2. 2

    The platform takes it over

    e-MC picks the route to the recipient's operator according to the configured routing.

  3. 3

    The operator delivers or rejects it

    Each message gets a status and, on failure, an error code.

  4. 4

    You get the result

    The status arrives as a delivery report; recipients' replies come back as inbound SMS.

The previews on this page are deliberately simplified: full parameters, response formats and code examples are in the documentation provided with the account.

Access and authentication

Access to the platform goes through a dedicated account, opened after a discussion with our team.

  • A dedicated account

    HTTP API and SMPP accounts are opened on request, based on your use case and estimated monthly volume.

  • Credentials and documentation

    Your connection credentials and the technical documentation are sent to you when the account is opened. The authentication method is detailed there.

  • Test account

    A test of the SMS API can be set up on request, before going live.

Statuses and error codes

A message goes through several states before it is delivered or rejected. On failure, an error code gives the cause. Excerpt of the reference, currently under review.

CodeGroupNameDescription
0OKNO_ERRORNo Error
1HANDSET ERROREC_UNKNOWN_SUBSCRIBERUnknown Subscriber
5HANDSET ERROREC_UNIDENTIFIED_SUBSCRIBERUnidentified Subscriber
6HANDSET ERROREC_ABSENT_SUBSCRIBER_SMAbsent Subscriber
9HANDSET ERROREC_ILLEGAL_SUBSCRIBERIllegal Subscriber
10OPERATORS_ERRORSEC_BEARER_SERVICE_NOT_PROVISIONEDBearer Service Not Provisioned
See all codes

From preview to production

  1. 1

    Browse the preview

    The examples on this page show the structure of our APIs.

  2. 2

    Request the documentation

    Through the contact form, describing your use case.

  3. 3

    Qualification

    Together we validate the right service, your destination countries and your estimated monthly volume.

  4. 4

    Test account

    A test account is set up on request to validate your integration.

  5. 5

    Integration

    You connect your applications over HTTP API or SMPP, with help from our team.

  6. 6

    Production

    You launch your sends and follow every message through delivery reports.

Frequently asked questions

Can I test before committing?

Yes. A test of the SMS API can be set up on request, so you can validate your project before committing. Use the form and choose “Request a test account”.

Which integration methods do you offer?

An HTTP API (REST) and an SMPP connection.

Where can I find the technical documentation?

HTTP API and SMPP accounts, as well as the documentation, are provided on request. Contact us with your use case.

Can we receive replies by SMS?

Yes, with 2-way SMS: it can use a short code, a long code or a virtual number. See the dedicated page.

Need technical advice?

Our team helps with interoperability with your databases and information system. Describe your architecture and we will tell you which connection mode fits.