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://app.ileads.co.il/api
Testhttps://app.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.
We recommend restricting access to authorized IP addresses: in the web interface, under the “Settings” tab → “My account”, enable “Authorized IP address check” and add at least one address.

Postman

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

Authentication

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

Creating your first token

  1. Log in to the web interface, open the “Settings” tab and choose “API Token Management”.
  2. Click “Create New Token”.
  3. The token is shown only once – store it securely. It cannot be retrieved later.

Rules

  • Up to 5 active tokens per user, all working concurrently. Each token has a unique name.
  • Each token is valid for 24 months from creation. The expiration date is returned in expiration_date and is not extended.
  • Additional tokens can also be created via the API using an existing valid token – see Generate an API token.
  • Deleting a token in the interface deactivates it immediately.
Creating tokens with a username and password is not supported. Tokens are created only in the web interface, or via the API with an existing token.

Generate an API token

POSThttps://app.ileads.co.il/api<getApiToken>

Create a new token, or retrieve the most recent one, using an existing valid token. A parent account can create a token for one of its sub-accounts.

A token created via the API is automatically named after its creation date and time. Each token’s expiration date is fixed and is not extended when additional tokens are created.

Parameters

NameTypeDescription
getApiTokenrequiredobjectRoot element. Contains all other elements.
user → usernamerequiredstringAdmin (parent) account username – the account whose token is sent with the request.
usernamerequiredstringThe username of the account the token is requested for.
actionrequiredstring"new" – create a new token. "current" – retrieve the most recent token.

Verify a sender number

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
phonerequiredstringA valid mobile or landline number to verify. May contain multiple fields.

Get verified phones

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

Get all verified numbers in the account.

Parameters

NameTypeDescription
getVerifiedPhonesrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
is_subsint1 – include your sub-accounts’ verified numbers. Otherwise, omit the field.

Send SMS

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.ileads.co.il/api<balance>

Check the remaining message balance of the account.

Parameters

NameTypeDescription
balancerequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.

Send OTP code

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
typerequiredstringPush type: dlr, incoming_sms, blacklist, dlr_whatsapp, incoming_whatsapp.
urlrequiredstringA public http/https URL.

Delivery reports (DLR)

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
fromrequiredstringStart of the range. Format: dd/mm/yy hh:mm
torequiredstringEnd of the range. Format: dd/mm/yy hh:mm

Create contact list

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

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

Parameters

NameTypeDescription
newCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.ileads.co.il/api<removeCL>

Remove one or more lists by ID.

Parameters

NameTypeDescription
removeCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
clrequiredobjectContains the IDs of the lists to remove.
idrequiredstringList ID.

Add numbers to a list

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

Add numbers to an existing list.

Parameters

NameTypeDescription
addNumCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.ileads.co.il/api<rmNumCL>

Remove numbers from an existing list.

Parameters

NameTypeDescription
rmNumCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
clrequiredobjectDetails of the list to update.
idrequiredintList ID.
destinationsrequiredobjectThe numbers to remove.
phonerequiredstringFormatted as 5xxxxxxxx or 05xxxxxxxx.

Get all contact lists

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

Get all lists in the account, including empty ones.

Parameters

NameTypeDescription
getCLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.

Get contact list by ID

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

Get the numbers of a specific list.

Parameters

NameTypeDescription
getCLbyIDrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
clrequiredobjectContains the list ID.
idrequiredintList ID.

Get blacklist

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

Get blocked numbers by date range.

Parameters

NameTypeDescription
blacklistrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
fromrequiredstringStart of the range. Format: dd/mm/yy hh:mm
torequiredstringEnd of the range. Format: dd/mm/yy hh:mm

Remove from blacklist

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

Remove numbers from the blacklist, with a reason.

Parameters

NameTypeDescription
rmNumBLrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
phonesrequiredobjectContains the phone numbers.
phonerequiredstringA number to remove.
reasonrequiredstringThe reason for removal.

Add to blacklist

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
phonesrequiredobjectContains the phone numbers.
phonerequiredstringA number to add.

Cancel campaign

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

Cancel a scheduled send by campaign ID.

Parameters

NameTypeDescription
cancelrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
campaign_idrequiredintThe campaign ID.

Cancel campaigns by name

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

Cancel all scheduled campaigns with a given name.

Parameters

NameTypeDescription
cancelrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
campaign_namerequiredstringThe campaign name.

Voice message (TTS)Requires activation

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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

Add sub-accountRequires activation

POSThttps://app.ileads.co.il/api<addSub>

Create a sub-account under your account, with a message balance.

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

Parameters

NameTypeDescription
addSubrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
userDetailsrequiredobjectThe new account details.
userDetails → namerequiredstringAccount name.
userDetails → usernamerequiredstringUsername for the account.
userDetails → passwordrequiredstringPassword for the account.
userDetails → sourcerequiredstringDefault source (sender).
userDetails → amountrequiredintMessage credits to assign. Digits only.
userDetails → otpPhonestringPhone number for OTP authentication.

Update sub-account balanceRequires activation

POSThttps://app.ileads.co.il/api<updateAmountSub>

Update the message balance of a sub-account.

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

Parameters

NameTypeDescription
updateAmountSubrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
userDetailsrequiredobjectThe account to update.
userDetails → usernamerequiredstringThe sub-account username.
userDetails → amountrequiredintMessage credits to assign.
userDetails → amount_intintUpdate a monetary amount (international balance) instead of message credits.

Get sub-account balancesRequires activation

POSThttps://app.ileads.co.il/api<getBlanceSubs>

Get the balance of all sub-accounts.

Available on accounts where it has been enabled. Contact us to enable it.
The element name getBlanceSubs is spelled this way intentionally – it is the name the system expects.

Parameters

NameTypeDescription
getBlanceSubsrequiredobjectRoot element. Contains all other elements.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.

Get birthday campaignsRequires activation

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.

Edit birthday campaignRequires activation

POSThttps://app.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.
userrequiredobjectContains the user element.
usernamerequiredstringThe username of the account by which you are recognized in the system.
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.
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