Skip to main content

Endpoint

POST https://app.sling.com.ng/api/v2/send-truecaller

Headers

HeaderValue
Acceptapplication/json
AuthorizationBearer {API_TOKEN}
Content-Typeapplication/json

Body parameters

message
string
required
Message text. Up to 3 pages.
sender
string
required
Approved Truecaller sender ID or brand name.
type
string
Sender ID route. Accepted values: transactional or promotional.
callback
string
Public HTTPS URL that receives delivery updates.
instant
boolean
default:"false"
When true, the request waits for immediate processing and the response includes the resolved status and credit_used. When false, the message is queued.
fallback_sms
boolean
default:"false"
When true, Sling falls back to SMS if the message cannot be delivered over Truecaller.
fallback_sms_sender
string
Sender ID used for the SMS fallback when fallback_sms is true. For example, Sling while your Truecaller sender is Brand.
reference
string
Custom message ID.
send_on
string
ISO datetime to schedule the message.

Recipient (provide exactly one)

to
string
Recipient phone number. Accepts local format (without country code, where applicable), country code without +, or E.164 with + prefix — for example 08012345678, 2348012345678, +2348012345678, or +14155552671.
contact
string
Saved contact ID.
contacts
array
Array of saved contact IDs.
group
string
Single group ID.
groups
array
Array of group IDs.
numbers
string
Newline-separated raw phone numbers.

SMS fallback

Set fallback_sms to true and Sling will re-send the message as a standard SMS if delivery over Truecaller is not possible. Use fallback_sms_sender to set the SMS Sender ID for that fallback (for example, Sling when your Truecaller sender is Brand).
{
  "sender": "Brand",
  "to": "08140363233",
  "message": "Hello from Truecaller",
  "type": "transactional",
  "fallback_sms": true,
  "fallback_sms_sender": "Sling"
}

Response fields

status
string
"success" when the message is accepted.
message_id
string
Unique message ID. Use it with Message Status.
sender
string
Sender ID or brand name used for delivery.
message
string
Message text.
recipient
string
Normalized recipient phone number.
credit_used
number
Credits deducted for this message.

Error responses

StatusMeaning
400Missing or invalid request fields
400Insufficient credit
400Sender not approved for Truecaller