Introduction

The iLeads API lets you send SMS, receive delivery reports, manage contact lists and send verification codes – directly from your own systems. Every action is a POST request to a single URL; the request’s root element determines the action.

Base URLs

Productionhttps://api.ileads.co.il/api
Testhttps://api.ileads.co.il/api/test

The test URL returns the same response as a real request but doesn’t perform the action – useful for validating requests during development.

Format

Send XML or JSON; the response is returned in the same format. Set the header accordingly: Content-Type: application/xml or Content-Type: application/json.

Response structure

Every response includes a status field – 0 means success and any other value is an error code (see Error codes). The message field explains the result. The response root element varies by action.

Conventions

  • Phone numbers: formatted as 5xxxxxxxx or 05xxxxxxxx.
  • Dates: formatted as dd/mm/yy hh:mm.
  • Attributes in JSON: an XML attribute (e.g. the id of phone) is written in JSON under "$", and the value itself under "_". See the example in Send SMS.

Security

Connections must use TLS 1.2 or higher.
Keep your API key on the server only – never in code that runs in a browser or an app. Revoke a leaked key in the dashboard right away.

Postman

All actions are ready to try in Postman: download the collection. After importing, set the apiKey and username variables.

Authentication

Every request is sent with an API key in the Authorization header, using the Bearer scheme.

Creating a key

  1. Log in to the iLeads dashboard and open the API page.
  2. Click New key and name it – for example after the site or system that will use it.
  3. The key is shown only once – store it securely. It cannot be retrieved later.

Rules

  • API keys start with ilsk_.
  • Up to 5 active keys per account, all working concurrently – use a separate key per system, and rotate keys without downtime.
  • Each key is valid for 24 months from creation. A reminder e-mail is sent 60 and 14 days before it expires.
  • Revoking a key in the dashboard deactivates it immediately.
  • Every request also carries the account username, in user.username (XML: <user><username>). You’ll find it in the dashboard on the API page. A request without a username, or with another account’s username, is refused with code 409.
  • You can lock a key to your servers’ IP addresses (optional, up to 10 IPv4 or IPv6 addresses): in the dashboard, API page → IP addresses next to the key. A locked key works only from those addresses; a request from any other address is refused with code 411. The reply names the address the request came from.
Have an older API token? It keeps working during the transition, together with the username in user. We recommend replacing it with an API key.

Access and limits

A regular API key is meant for websites: lead alerts, a message to the customer who left details or ordered, and verification codes (OTP). Bulk sending needs full API access, given only with iLeads approval.

Regular key (default)

  • Available actions: send SMS, send and validate OTP codes, balance, delivery and incoming reports, and sender verification.
  • Up to 5 recipients per message. A request with more recipients, or a send to a contact list, is refused with code 408.
  • Bulk actions – bulk, contact lists, campaigns and push URLs – are refused with code 407.
  • The exact same text sent to 50 different numbers within an hour looks like a campaign: sending pauses (code 410) until the iLeads team reviews and releases it. Lead alerts, order confirmations and OTP codes differ from each other, so they are never paused.

Full API access

Need bulk sending, or your own system for wide sending? Contact iLeads. After approval, every action is available to the account, with no recipient limit.

In every case, a form lead alert – from the script or the WordPress plugin – goes to at most 5 numbers.

Verify a sender number

POSThttps://api.ileads.co.il/api<verify_phone>

Verify a phone number for use as a message source (sender). A mobile receives a verification link; a landline gets call-verification instructions.

Parameters

NameTypeDescription
verify_phonerequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
phonerequiredstringA valid mobile or landline number to verify. May contain multiple fields.

Get verified phones

POSThttps://api.ileads.co.il/api<getVerifiedPhones>

Get all verified numbers in the account.

Parameters

NameTypeDescription
getVerifiedPhonesrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
is_subsint1 – include your sub-accounts’ verified numbers. Otherwise, omit the field.

Send SMS

POSThttps://api.ileads.co.il/api<sms>

Send one message to one or many recipients – individual numbers, contact lists, or both.

Parameters

NameTypeDescription
smsrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
sourcerequiredstringSender name or number. Up to 11 characters – digits (no + sign) and English letters. The source must be verified.
destinationsrequiredobjectContains the recipients. May contain multiple phone and cl_id fields.
phonerequiredstringRecipient phone number. Formatted as 5xxxxxxxx or 05xxxxxxxx.
phone@idstringAttribute of phone – your own external ID, used to query the delivery report (DLR) later. Leave empty if not needed.
cl_idstringID of a contact list to send to.
messagerequiredstringThe message content. Up to 1005 characters.
timingstringScheduled send time. If omitted, the message is sent immediately. Format: dd/mm/yy hh:mm
tagstringFor Google’s automatic SMS verification – adds a tag to the beginning of the message. For example, tag=# with message=Hello world is sent as "<#>Hello world".
add_dynamicstring1 – send using the contact list’s dynamic fields. Only one cl_id and no single phone tags are allowed. In the message use [DYNAMIC_FIELD1], [DYNAMIC_FIELD2], etc.
add_unsubscribeintOpt-out option: 3 – remove by link, 2 – remove by reply SMS. Any other value – none.
temp_blstringFilter out recipients who received a message in the last X days (1–14).
includes_internationalint1 – recipients include international numbers, 0 – they don’t.
campaign_namestringCampaign name shown in system reports. Up to 50 characters.
linksobjectContains links to shorten inside the message. May contain multiple link fields.
linkstringA link to shorten. Must have an id attribute. In the message, write [link-id] where the short link should appear.

Send bulk SMS

POSThttps://api.ileads.co.il/api<bulk>

Send different messages to different recipients in a single request – for example, a personal message per customer.

Parameters

NameTypeDescription
bulkrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
messagesrequiredarrayArray of sms objects. Up to 2500 messages per request.
sms → sourcerequiredstringSender name or number. Up to 11 characters – digits and English letters.
sms → destinationsrequiredobjectThe recipients of this message.
sms → phonerequiredstringRecipient phone number. Formatted as 5xxxxxxxx or 05xxxxxxxx. Optional id attribute for delivery reports.
sms → messagerequiredstringThe message content. Up to 1005 characters.
sms → linksobjectLinks to shorten in this message (link with an id attribute; use [link-id] in the message).
cl_idstringContact list ID.
timingstringScheduled send time. Format: dd/mm/yy hh:mm
add_unsubscribeint3 – remove by link, 2 – remove by reply SMS.
temp_blstringFilter out recipients who received a message in the last X days (1–14).
includes_internationalint1 – includes international numbers.
campaign_namestringCampaign name in reports. Up to 50 characters.

Get balance

POSThttps://api.ileads.co.il/api<balance>

Check the remaining message balance of the account.

Parameters

NameTypeDescription
balancerequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).

Send OTP code

POSThttps://api.ileads.co.il/api<send_otp>

Send a 6-digit one-time code by SMS. The code is generated and stored by the system for later validation.

Parameters

NameTypeDescription
send_otprequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.
sourcerequiredstringThe sender name or number shown to the recipient.
app_idintDistinguishes between several applications using the service. Default: 1.
max_triesintNumber of attempts to enter the code, 3–5. Default: 3.
valid_timeintCode validity in minutes, 1–15. Default: 5.
textstringCustom text – must include [code]. Default: "the code is [code]".

Validate OTP code

POSThttps://api.ileads.co.il/api<validate_otp>

Check whether the code entered by the user is valid for the number.

A wrong code returns status 12 (Unverified code).

Parameters

NameTypeDescription
validate_otprequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.
coderequiredintThe 6-digit code to validate.
app_idintThe same app_id used when sending the code. Default: 1.
service_typestringsms or whatsapp. Default: sms.

Receiving updates (Push)

Instead of pulling reports, you can receive them automatically at your URL as soon as they arrive.

  • Updates are sent as a POST request in application/x-www-form-urlencoded format, using the same field names as the API responses.
  • Respond with 200 OK. Any other response delays the pushes, and after several failures pushing stops.
  • Set the URL in the web interface, or via Add push URL.

Delivery report (dlr)

Fields: external_id, status (see DLR statuses), he_message, en_message, date, phone, operaor (the field is spelled this way), shipment_id.

HTTP
POST https://your-site.com/ileads/dlr
Content-Type: application/x-www-form-urlencoded

external_id=1234&status=102&he_message=הגיע+ליעד&en_message=Delivered
&date=01/04/26 16:05:05&phone=9725xxxxxxxx&operaor=Cellcom&shipment_id=12345678

Incoming SMS (incoming_sms)

Fields: message, date, phone (sender), dest (your number).

Text
message=This+is+a+sample+message&date=01/04/26 16:05:05
&phone=9725xxxxxxxx&dest=9725xxxxxxxx

Blacklist (blacklist)

Fields: message, date, dest.

Text
message=נחסם+מנוי&date=01/04/26 16:05:05&dest=9725xxxxxxxx

Add push URL

POSThttps://api.ileads.co.il/api<push_url>

Set the URL updates are pushed to. It can also be set from the web interface.

An existing URL is never replaced. If a URL is already set for that type, status 517 is returned and nothing changes.

Parameters

NameTypeDescription
push_urlrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
typerequiredstringPush type: dlr, incoming_sms, blacklist, dlr_whatsapp, incoming_whatsapp.
urlrequiredstringA public http/https URL.

Delivery reports (DLR)

POSThttps://api.ileads.co.il/api<dlr>

Retrieve the delivery status of messages by the external id you attached when sending.

Date range – up to 1 week. Up to 1000 external IDs per request.

Parameters

NameTypeDescription
dlrrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
transactionsrequiredobjectContains the IDs to check. May contain multiple external_id fields.
external_idrequiredstringThe id you sent as the phone attribute when submitting the SMS.
fromrequiredstringStart of the range. Format: dd/mm/yy hh:mm
torequiredstringEnd of the range. Format: dd/mm/yy hh:mm

Delivery reports by date

POSThttps://api.ileads.co.il/api<dlrByDate>

Retrieve delivery reports by date range, without an external id.

Date range – up to 1 week.

Parameters

NameTypeDescription
dlrByDaterequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
transactionsrequiredobjectContains external_id.
external_idrequiredstringMay contain the value null.
fromrequiredstringStart of the range. Format: dd/mm/yy hh:mm
torequiredstringEnd of the range. Format: dd/mm/yy hh:mm

Incoming SMS

POSThttps://api.ileads.co.il/api<incoming>

Retrieve received SMS messages (recipient replies).

A range of up to 1 week, up to 1 year back.

Parameters

NameTypeDescription
incomingrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
fromrequiredstringStart of the range. Format: dd/mm/yy hh:mm
torequiredstringEnd of the range. Format: dd/mm/yy hh:mm

Create contact list

POSThttps://api.ileads.co.il/api<newCL>

Create one or more lists, including numbers and dynamic fields.

Parameters

NameTypeDescription
newCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
clrequiredobjectDetails of the list to create. May contain multiple cl elements.
cl → namerequiredstringList name.
destinationsrequiredobjectThe numbers to add to the list.
destinationrequiredobjectDetails of a single number.
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.
df1 … df6stringDynamic fields for the number (e.g. first name, last name, city).

Remove contact list

POSThttps://api.ileads.co.il/api<removeCL>

Remove one or more lists by ID.

Parameters

NameTypeDescription
removeCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
clrequiredobjectContains the IDs of the lists to remove.
idrequiredstringList ID.

Add numbers to a list

POSThttps://api.ileads.co.il/api<addNumCL>

Add numbers to an existing list.

Parameters

NameTypeDescription
addNumCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
clrequiredobjectDetails of the list to update. May contain multiple cl elements.
idrequiredintList ID.
destinationsrequiredobjectThe numbers to add.
destinationrequiredobjectDetails of a single number.
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.
df1 … df6stringDynamic fields for this number in this list.

Remove numbers from a list

POSThttps://api.ileads.co.il/api<rmNumCL>

Remove numbers from an existing list.

Parameters

NameTypeDescription
rmNumCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
clrequiredobjectDetails of the list to update.
idrequiredintList ID.
destinationsrequiredobjectThe numbers to remove.
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.

Get all contact lists

POSThttps://api.ileads.co.il/api<getCL>

Get all lists in the account, including empty ones.

Parameters

NameTypeDescription
getCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).

Get contact list by ID

POSThttps://api.ileads.co.il/api<getCLbyID>

Get the numbers of a specific list.

Parameters

NameTypeDescription
getCLbyIDrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
clrequiredobjectContains the list ID.
idrequiredintList ID.

Get blacklist

POSThttps://api.ileads.co.il/api<blacklist>

Get blocked numbers by date range.

Parameters

NameTypeDescription
blacklistrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
fromrequiredstringStart of the range. Format: dd/mm/yy hh:mm
torequiredstringEnd of the range. Format: dd/mm/yy hh:mm

Remove from blacklist

POSThttps://api.ileads.co.il/api<rmNumBL>

Remove numbers from the blacklist, with a reason.

Parameters

NameTypeDescription
rmNumBLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
phonesrequiredobjectContains the phone numbers.
phonerequiredstringA number to remove.
reasonrequiredstringThe reason for removal.

Add to blacklist

POSThttps://api.ileads.co.il/api<addNumBL>

Add numbers to the blacklist – messages will not be sent to them.

Parameters

NameTypeDescription
addNumBLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
phonesrequiredobjectContains the phone numbers.
phonerequiredstringA number to add.

Cancel campaign

POSThttps://api.ileads.co.il/api<cancel>

Cancel a scheduled send by campaign ID.

Parameters

NameTypeDescription
cancelrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
campaign_idrequiredintThe campaign ID.

Cancel campaigns by name

POSThttps://api.ileads.co.il/api<cancel>

Cancel all scheduled campaigns with a given name.

Parameters

NameTypeDescription
cancelrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
campaign_namerequiredstringThe campaign name.

Voice message (TTS)Requires activation

POSThttps://api.ileads.co.il/api<sms>

The text is converted into a recorded voice call to the recipient. Identical to Send SMS, with an additional tts object. The call source is a system number.

Available on accounts where it has been enabled. Contact us to enable it.

Parameters

NameTypeDescription
smsrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
sourcerequiredstringSender name or number (for SMS). Calls come from a system number.
destinationsrequiredobjectThe recipients.
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.
messagerequiredstringThe text to read out. Up to 1005 characters.
ttsrequiredobjectCall settings.
tts → typerequiredint2 – SMS to regular phones and a voice call to Kosher phones. 3 – both SMS and a call to everyone. 4 – voice call only to everyone.
tts → rateintSpeech rate, -10 to 10 (0 is normal).
tts → repeatintTimes the message plays in a call. Default: 2.
tts → voicestringymMale – male voice (default), ymFemale – female voice.

Voice delivery reportsRequires activation

POSThttps://api.ileads.co.il/api<ttsDlr>

Delivery reports of voice (TTS) campaigns.

Available on accounts where it has been enabled. Contact us to enable it.
Date range – up to 1 week.

Parameters

NameTypeDescription
ttsDlrrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
shipment_idstringThe campaign ID. Digits only.
fromrequiredstringStart of the range (required). Format: dd/mm/yy hh:mm
torequiredstringEnd of the range (required). Format: dd/mm/yy hh:mm

Get birthday campaignsRequires activation

POSThttps://api.ileads.co.il/api<get_birthday_campaigns>

Get the birthday campaigns (automatic messages sent on the recipient’s birthday).

Available on accounts where it has been enabled. Contact us to enable it.

Parameters

NameTypeDescription
get_birthday_campaignsrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).

Edit birthday campaignRequires activation

POSThttps://api.ileads.co.il/api<edit_birthday_campaign>

Update the message of a birthday campaign.

Available on accounts where it has been enabled. Contact us to enable it.

Parameters

NameTypeDescription
edit_birthday_campaignrequiredobjectRoot element. Contains all other elements.
userrequiredobjectAccount details. Contains username.
usernamerequiredstringThe account username, as shown in the dashboard on the API page. Must belong to the key’s account (otherwise code 409).
campaign_idrequiredstringThe campaign ID to edit.
messagerequiredstringThe new message.

Error codes

The value returned in the status field of every response.

CodeMeaning
0Success. The message field varies by action, e.g. "SMS will be sent".
1There was a problem parsing your XML.
2A required field is missing. The message field names the missing field.
3Username or password is incorrect and the API token is invalid.
4Not enough credit.
5No permission to send SMS at this time.
6Process failure.
7You cannot send in this format – send a group using bulk. Contact support for details.
8All numbers are on a blocked list.
9At least one of the destinations is too short or too long.
10Username or password is incorrect and the API token has expired.
11The API token is valid but doesn’t match the username, or a newer token exists and should be used instead.
12When sending SMS: not enough money. When validating an OTP code: unverified code.
401The API key is invalid or was revoked.
402The API key has expired. Create a new key in the dashboard.
403This action is not available with an API key (or a contact-list send with a key that has a message quota). With status 406, 407, 408, 410 or 411 – see that code.
406The account is inactive because the balance ran out. Only balance and reports work until a package is bought.
407This action needs full API access (bulk sending). Contact iLeads.
408More than 5 recipients in one message, or a contact-list send, with a regular key.
409The request has no username, or the username does not match the API key.
410Sending is paused: the same text went to many numbers, like a campaign. Contact iLeads support.
411The request came from an IP address that is not allowed for this key. Add the address in the dashboard (API page → IP addresses), or remove the lock.
429The API key's message quota is used up.
502Action type not valid.
503Username does not exist in your account.
504Current token not found.
510Invalid verify_phone request – no phones to verify.
511You don’t have permission for this function.
515Unverified source. See “Verify a sender number”.
517A push URL already exists for this type.
714Invalid content in parameter temp_bl.
715All numbers have been temporarily blocked.
933Phone or reason not valid.
944Some of the numbers are not in the blacklist.
955Campaign already cancelled.
966Campaign already sent.
970Campaigns were not cancelled. Contact support.
977Campaign does not belong to the customer or does not exist.
980Invalid link.
981Error creating hash.
986Add unsubscribe error – invalid value.
988The contact list entered does not exist.
989The message is too long or too short, or the campaign name is too long.
990Amount must be smaller than your credits.
991The amount must contain only digits.
992The source is too long or too short.
993The password is too long or too short.
994Username already exists.
995The username is too long or too short.
996The name is too long or too short.
997Not a valid command sent.
998There was an unknown error in the request.
999Contact support.

DLR statuses

The value returned in the status field of each transaction in delivery reports and pushes.

StatusMeaning
-1Sent – no delivery confirmation
0Delivered
1Failed
2Timeout
3Failed
4Failed – cellular
5Failed
6Failed
7No balance
14Failed – cellular, after store & forward
15Kosher number
16No permission for this sending time
17Blocked for advertising messages
18Invalid message
101Not delivered
102Delivered
103Expired
104Deleted
105Not delivered
106Not delivered
107Not delivered
108Rejected
109–132Not delivered
201Blocked by request
747Subscriber is outside local network coverage
998No permission
999Unknown error