For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Send

The HTTP API enables you to send SMS quickly. To send an SMS, simply call the following URL with the relevant parameters appended to the URL, as shown below:

https://api.textcus.com/api/v2/send?destination={recipient}&source={sender}&dlr={0}&type={0}&message={message}

NB: Please remove the curly bracket in the URL when testing

Endpoint

GET https://api.textcus.com/api/v2/send

GET /send

curl -G https://api.textcus.com/api/v2/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "source=TextCus" \
  --data-urlencode "destination=233244000001" \
  --data-urlencode "message=Your order ORD-1042 has shipped."

Headers

Authorization: Bearer API_KEY

Request Parameters

Below is a list of parameters when issuing an HTTP Request.

Parameters
Type
Description

type

Required

It indicates the type of message. Values for "type" include: 0 : Plain text (GSM 3.38 Character encoding) 1 : Flash (GSM 3.38 Character encoding) 2 : Unicode 3 : Reserved 5 : Plain text (ISO-8859-1 Character encoding) 6 : Unicode Flash 7 : Flash (ISO-8859-1 Character encoding)

source

Required

The source address that should appear in the message. - Max Length of 18 if numeric. - Max Length of 11 if alphanumeric. To prefix the plus sign (+) to the sender’s address when the message is displayed on their mobile phone, please prefix the plus sign to your sender’s address while submitting the message. Note: You need to URL encode the plus sign. The SMSC may enforce additional restrictions on this field.

destination

Required

Recipient phone number Must be a valid MSIDSN Must be in the international telephone number format (may or may not include a plus [+] sign) symbol. e.g. 233241234567 or +233241234567 Multiple mobile numbers need to be separated by a comma (,) (the comma should be URL encoded).

dlr

Required

Indicates whether the client wants a delivery report for this message. The values for "dlr" include: 0 : No delivery report required 1 : Delivery report required

message

Required

The message to be sent. Must be URL encoded.

time

Optional

To schedule the message to be sent sometime or date in the future Format: YYYY-MM-DD HH:MM:SS or UNIX TIMESTAMP The Scheduled time must be at least 10 minutes ahead of the current time in UTC

Sample Requests

How credits are counted

Credits are charged per provider-billed SMS part, per unique valid recipient:

  • GSM-7 text: 160 septets for one part; long messages use 153 septets per concatenated part.

  • Unicode text: 70 UTF-16 units for one part; long messages use 67 units per concatenated part.

  • GSM extension characters such as ^, {, } and € consume two septets.

  • Failed gateway submissions are refunded by part and are excluded from credits_used.

For example, 460 ordinary GSM characters are four parts. Sending that message to three recipients uses 4 × 3 = 12 credits. Your per-credit rate is on the Account API as sms_rate.


Sample Response

Last updated