API documentation

LiraX API for telephony

General information about APIs#

API allows you to connect any of your software products (SPP) to LiraX.

Integration with LiraX solves several business problems:

  • getting the name of the caller by phone number;
  • obtaining the manager number assigned to the client;
  • displaying information about an incoming call directly inside the RFP;
  • saving the history of all calls and links to conversation recordings within the WPP;
  • creating a Contact:
  • Creating a task for a Contact and a manager;
  • Creating a note for a Contact;
  • Creating an Agreement for contact;
  • Agreement Update
  • making outgoing calls directly from the RPP interface.

The integration should be two-way. Therefore, some of the requests LiraX sends to the RPP towards the specified entry points, and some of the requests, on the contrary, the RPP sends to LiraX towards the single entry point.

Interaction is carried out using the HTTPS protocol. Authorization is carried out at the LiraX or VPP address, respectively, and using the authorization key obtained during the integration setup process.

Principle of authorization and interaction#

HTTPS:

  • Requests to LiraX are accepted only over HTTPS. This provides a sufficient level of security for systems to interact over the Internet.
  • З for the security of your data, please implement accepting requests on the WPP side also using HTTPS.

Key (token):

  • Additionally, a special key (token) is used to authorize each request to LiraX. You can obtain it in the integration settings.
  • Please implement accepting requests on the WPP side also using a key (token). Generate the key and paste it into the appropriate field in the integration settings section.
  • Keys are created once when you set up the integration. If necessary, you can change the key on your side and update it in the LiraX interface.

Requests from LiraX to the WFP:

  • Requests must be sent to the address specified in the integration settings for receiving messages, for example https://domain/LiraX.
  • In the request body, you must always pass a special key in the special "token" field.
  • Requests are sent in the application/x-www-form-urlencoded format

Requests from WFP to LiraX:

  • The WFP should send all requests to the address specified in the integration settings.
  • In the message body, the VPP must transmit the key (token) specified by you in the web cabinet.
  • Requests are sent in the application/x-www-form-urlencoded format

Answers

  • All responses to LiraX requests must be sent by the WFP in JSON format in the response body.
  • LiraX sends all responses to WPP requests in JSON format in the response body.

List of API commands#

From runway to LiraX:

  • makeCall (POST, GET)
  • killCall (POST, GET)
  • make2Calls (POST)
  • AskQuestion (POST)
  • AddTag (POST)
  • DelTag (POST)
  • get_sip_route_in (POST)
  • set_sip_route_in (POST)
  • getUserSips (POST)
  • IsFreeUsers (POST)
  • IsCalling (POST)
  • AddCampaign (POST)
  • AddPhoneCampaign (POST)
  • checkContact (POST)
  • getContact (POST)
  • getStatInfo (POST)
  • createTask (POST)
  • AddTaskResult (POST)
  • GetTask (POST)
  • createNote (POST)
  • createDeal (POST)
  • updateDeal (POST)
  • addBlackPhone (POST, GET)
  • addBlackIP (POST, GET)
  • getStages (POST)
  • getShops (POST)
  • getUserStatuses (POST)
  • getUsers (POST)
  • initStatuses (POST)
  • sendMsg (POST)
  • send_cloud_message (POST)
  • sendSMS (POST)
  • checkSMS (POST)
  • EncodePhone (POST)
  • DecodePhone (POST)
  • set_call_lost (POST)
  • get_makecall_data(POST)
  • get_calls
  • set_webhook
  • Download call history

From LiraX to the runway:

  • staton (POST)
  • smsDelivered (POST)
  • smsReceived (POST)
  • contact (POST)
  • event (POST)
  • record (POST)

*All requests with Content-Type: application/x-www-form-urlencoded

API commands and examples of available scripts#

Teams from WPP to LiraX#

makeCall#

The command is needed to initiate a call from the manager to the client. As a result of successful execution of the command, LiraX will first make a call to the manager's phone, and then connect him to the client.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case makeCallstring
fromshort number of the employee making the outgoing callstring
tonumber to which the outgoing call is madestring
tokenliraX token set in the integration settingsstring
idshopOptional parameter specifying the store ID from which the call will be madeinteger(the list of IDs can be obtained using the GetShops function)

Example query:

POST https://api.lirax.net/general

cmd=makeCall
from=101
to=19101234567
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"id_makecall":"$id_makecall"}OK, $id_makecall – used when receiving the makecall_finished webhook
400Incorrect parameters passed
401Invalid token passed

killCall#

The command is needed to forcefully end a call from a manager to a client.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case killCallstring
Call_idid call received in the makecall_finished eventstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=killCall
Call_id=101234234234s3
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

make2Calls#

The command is needed to connect two subscribers. As a result of successful execution of the command, LiraX will first make a call to the phone to1, and then connect it to to2. From is needed for correct call routing.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case make2Callsstring
fromshort number of the employee on whose behalf outgoing calls are madestring
to1number to which the first call is madestring
to2the number to which the second call is made or the URL of the audio file (mp3, wav) in case you only need to play the audio filestring
speechThe text that should be spoken after picking up the phone to1. The text should consist of the language code (“uk “, “en “, “ru “) and the text itselfstringOptional
atempoOptional parameter specifying the playback speed from 0.5 to 2.0stringOptional
timeoutTime in minutes (if more than 10, attempts will be repeated every 10 minutes until both subscribers pick up the phone). Default 0 – only one attemptstringOptional
successtimeTime in seconds – How many seconds the conversation must last to be considered successful. Default 0stringOptional
notbeforeTime in hours – Until what time you cannot call. Default is 08stringOptional
notafterTime in hours – After what hour you cannot call, Default 20stringOptional
tryNumber of attempts to call back to the first party with an interval of 10 minutesintegerOptional, default =1
vtimeTime in hours and minutes – hh:mm. The parameter can be used for IVRstringOptional
vdateDate – ”dd. mm. YYYY”, ”today” or ”tomorrow”. The parameter can be used for IVRstringOptional
vmoneyThe value of the amount of money is a float of type 0.00 with two digits after the dot. The parameter can be used for IVRstringOptional
tokenliraX token set in the integration settingsstring
idshopOptional parameter specifying the store ID from which the call will be madeinteger(the list of IDs can be obtained using the GetShops function)
FirstInternalOptional parameter indicating that the first leg is an internal call if =1integerOptional
SecondInternalOptional parameter indicating that the second leg is an internal call if =1integerOptional
SpeechNoWaitOptional parameter, if =1, specifies that speech is played instead of beeps when calling party to2integerOptional

Example query:

POST https://api.lirax.net/general

cmd=make2Calls
from=101
to1=19101234561
to2=19101234567
speech=en Hello Customer
timeout=60
successtime=30
notbefore=18
notafter=21
token=202cb962ac59075b964b07152d234b70
cmd=make2Calls
from=201
to1=19101234567
to2=https://www.test.mp3/tttt.mp3
timeout=60
successtime=30
notbefore=18
notafter=21
try=4
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"id_make2calls":"$id_make2calls"}OK, $id_make2calls – used when receiving the make2calls_finished webhook
400Incorrect parameters passed
401Invalid token passed

AskQuestion#

The command is needed to ask the subscriber a question and get an answer. As a result of successful execution of the command, LiraX will first make a call to the phone to1, and then play the greeting "hello", if necessary, it is possible to additionally play up to 4 messages "text1-4" in the selected language (pauses are required if necessary). Next, the question is played, if the voice recognition option is enabled, it expects the correct words in the answer "ok", if there is no recognition, we expect the button to be pressed. "From" is needed for correct call routing. The reaction is similar to the make2calls command

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case AskQuestionstring
fromshort number of the employee on whose behalf outgoing calls are madestring
to1number to which the first call is madestring
tokenliraX token set in the integration settingsstring
helloOptional parameter, the sentence must be a greeting (like Congratulations)string
text1Optional parameter, Message 0string
text2Optional parameter, Message 0string
text3Optional parameter, Message 0string
text4Optional parameter, Message 0string
byeOptional parameter, Goodbye message, works after the questionstring
askReport a questionString
okWords between spaces that we expect to receive in a positive answer (for example: yes ok)String
cburlOptional parameter, URL for webhook with make2calls_finished message, which transmits data with subscriber responseString

Example query:

POST https://api.lirax.net/general
cmd=AskQuestion
from=101
cburl=https://mydomain.co/
to1=19101234561
token=202cb962ac59075b964b07152d234b70
hello=ru Congratulations
text1=ru A new service is offered
ask=ru If you want it, say so.
ok=ru i wish so much.
bye=ru Goodbye

Answer options:

HTTP codeBodyDescription
200{"id_make2calls":"$id_make2calls"}OK, $id_make2calls – used when receiving the make2calls_finished webhook
400Incorrect parameters passed
401Invalid token passed

AddTag#

The team adds a tag to the contact.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case AddTagstring
anicontact phone numberstringOptional
tagtagstringOptional
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=AddTag
ani=19101234567
tag=OK
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

DelTag#

The command removes a tag from a contact.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case DelTagstring
anicontact phone numberstringOptional
tagtagstringOptional
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=DelTag
ani=19101234567
tag=OK
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

get_sip_route_in#

The command is needed to define a list of sip numbers for the phone extension.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case get_sip_route_instring
tokenliraX token set in the integration settingsstring
phoneInternal numberstringExample: 302

Example query:

POST https://api.lirax.net/general
cmd=get_sip_route_in
phone=302
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{
"N":2,
"description":"route_in_sip. ",
"results":[
{
"sip_name":"Test",
"sip_number":"1115",
"user_name":"User",
"ext":"222",
"priority":"0",
"time_plan":"1"
},
{
"sip_name":"Test1",
"sip_number":"1156",
"user_name":"User1",
"ext":"223",
"priority":"0",
"time_plan":"1"
}
]
}
OK, if there are no SIP numbers we will get “N”:0,
N-number of SIP numbers,
sip_name sIP name,
sip_number – sIP number,
user_name – Username,
ext – user's extension number,
priority – current SIP priority,
time_plan – id weekly plan (work=1, evening=2, night=3, holiday=4)
400Incorrect parameters passed
401Invalid token passed
402Internal error

set_sip_route_in#

The command is needed to set the priority of the sip number for the phone extension number.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case set_sip_route_instring
tokenliraX token set in the integration settingsstring
phoneInternal numberstringExample: 302
sip_numbersIP numberstringExample: 1115
time_planid weekly plan (work=1, evening=2, night=3, holiday=4)stringExample: 1
prioritysIP priority for extension numberstringExample: 1

Example query:

POST https://api.lirax.net/general
cmd=set_sip_route_in
phone=302
sip_number=1115
priority=0
time_plan=1
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"result":"1"}OK, if the update is successful, result=1, if there is no update, result=0
400Incorrect parameters passed
401Invalid token passed
402Internal error

getUserSips#

The command is needed to determine whether there are available phones for the ext.

The team caches data and updates it once an hour.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case getUserSipsstring
tokenliraX token set in the integration settingsstring
extInternal numberstringExample: 302
webIf set to > 0, then only webphones are returnedintegerOptional

Example query:

POST https://api.lirax.net/general
cmd=getUserSips
ext=302
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"user_sips":[{"phone":"10000", "user_id":"1111", "ext":"302"}]}OK, if there are no available sips we will get {"user_sips":[]}
400Incorrect parameters passed
401Invalid token passed

IsFreeUsers#

The command is needed to determine whether it is possible for a user on a web phone to answer a call.

The command checks: - whether the Web phone is turned on; - whether there is no conversation with the user and returns the first free number

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case IsFreeUsersstring
tokenliraX token set in the integration settingsstring
phonesList of internal or SIP phone numbersstringExample: 1212121,
1212123, 302
amoIf set to 1, then numbers are used as amocrm user_idstringOptional

Example query:

POST https://api.lirax.net/general
cmd=IsFreeUsers
Phones=1212121,1212123,302
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"result":"phoneFromPhones", "sip":"sip_number", "ext":"number"}OK, if all numbers are busy we will receive {"result":null}
400Incorrect parameters passed
401Invalid token passed

IsCalling#

The command checks if there is a conversation with a SIP number and returns the first number without a conversation (checks registration)

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case IsFreeUsersstring
tokenliraX token set in the integration settingsstring
phonesList of internal or SIP phone numbersstringExample: 1212121,
1212123

Example query:

POST https://api.lirax.net/general
cmd=IsCalling
Phones=1212121,1212123
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"result":"phoneFromPhones", "ext":"number"}OK, if all numbers are busy we will receive {"result":null}
400Incorrect parameters passed
401Invalid token passed

AddCampaign#

The command is needed to Create or set up a campaign to call subscribers or send SMS.

When calling subscribers, the call first goes to the user, and then to the subscriber.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case AddCampaignstring
fromshort number of the employee on whose behalf the campaign is being conductedstring
extemployee's short number, on which the call will be received by employees (by default it is equal to from)stringOptional
daysList of days (0-Sunday, 6-Saturday)stringDefault: 1, 2, 3, 4, 5
timeTime rangestringDefault: 10:00-18:00
pddPost-processing time (seconds)integerDefault: 5
preview_timeoutOutgoing call delay after employee picks up the phone (default 0)integerOptional
trynumber of attemptsintegerDefault: 1
tokenliraX token set in the integration settingsstring
typeCampaign type 1 - Telephone, 2 - SMSintegerDefault: 1
phonesList of phone numbers (if the list is empty, the campaign stops)stringExample: 12121234567,
12121234568
messageMessage text, for type=1 the first word must be language {en, uk, ru, …} (in this case it will call the subscriber first and preview_timeout is ignored)stringRequired for type=2
idshopOptional parameter specifying the store ID from which the call will be madeintegerOptional (the list of IDs can be obtained with the GetShops function)

Note: For type=1, the number of simultaneous calls is defined in the campaign settings in the user's account.

For preview mode, the call goes to the user first, and then to the subscriber, with message!=NULL the opposite

Example query:

POST https://api.lirax.net/general
cmd=AddCampaign
from=101
days=1,2
time=10:00-11:00
timeout=60
pdd=30
try=2
idshop=2
type=2
message=Hello
Phones=12121234567,12121234568,12121234569
token=202cb962ac59075b964b07152d234b70
or
cmd=AddCampaign
from=101
days=1,2
time=10:00-11:00
timeout=60
pdd=30
try=2
idshop=2
type=1
message=en Hello
Phones=12121234567,12121234568,12121234569
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

AddPhoneCampaign#

The command is needed to add phone numbers to a campaign for calling subscribers or sending SMS.

when calling subscribers, the call first goes to the user, and then to the subscriber for preview mode, with message!=NULL the opposite

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case AddPhoneCampaignstring
fromshort number of the employee on whose behalf the campaign is being conductedstring
tokenliraX token set in the integration settingsstring
phonesList of phone numbersstringExample: 12121234567,
12121234568

Example query:

POST https://api.lirax.net/general

cmd=AddPhoneCampaign
from=101
Phones=12121234567,12121234568,12121234569
token=202cb962ac59075b964b07152d234b70

checkContact#

The command is needed to create a new or update an existing contact, the Contact Name and Responsible Employee are updated.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case checkContactstring
extshort number of the employee responsible for the contactstring
aniContact's primary phone numberstring
namecontact Namestring
add_phoneList of additional phonesstringOptional
emailsEmail liststringOptional
tokenliraX token set in the integration settingsstring
trackidGoogle tracking id for sitestringOptional
clientidGoogle Client idstringOptional
sitenameSite namestringOptional
sourceSourcestringOptional
stypeSource type (MediumstringOptional
campainCampaignstringOptional
TermKeywordstringOptional
tagTag (tag is inserted if available)stringOptional

Example query:

POST https://api.lirax.net/general
cmd=checkContact
ext=101
ani=19101234567
Name=Dima
token=202cb962ac59075b964b07152d234b70
add_phone=380123456789,380234567890,380112345678
emails=a@a.com,b@b.com

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

getContact#

The command is needed to obtain information about an existing contact and its Responsible Employee.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case getContactstring
anicontact phone numberstringOptional
emaile-mailstringOptional
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=getContact
ani=19101234567
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"result":{"name":"Dmytro", "mainphone":"12345678901", "responsible":"209", "sip":"111"}}OK
Name - Contact name,
mainphone – the first contact phone number,
responsible - the extension number of the person in charge,
sip - sip responsible person number
400Incorrect parameters passed
401Invalid token passed

getStatInfo#

The command is needed to get statistics of calls to employees for a period of no more than a month. The command can be used no more than once an hour.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case getStatInfostring
StartDate in the format “YYYY-MM-DD HH:MM:SS” - start of the intervalstring
StopDate in the format “YYYY-MM-DD HH:MM:SS” - end of intervalstringOptional, if absent, then in 24 hours
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=getStatInfo
Start=2021:01:01 00:00:00
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{
"results":[
{
"description":"stat_info. ",
"stat":[
{
"login":"alex",
"name":"Alexei",
"count_incoming":"0",
"count_incoming_unique":"0",
"count_incoming_answered":"0",
"count_incoming_answered_unique":"0",
"count_incoming_lost":"0",
"count_incoming_lost_unique":"0",
"count_outgoing":"10",
"count_outgoing_unique":"4",
"count_outgoing_answered":"5",
"count_outgoing_answered_unique":"2",
"count_outgoing_lost":"5",
"count_outgoing_lost_unique":"4",
"incoming_duration_talk":"0",
"outgoing_duration_talk":"765"
}
]
}
]
}
OK
400Incorrect parameters passed
401Invalid token passed

createTask#

The command is needed to create a New Task for the Responsible Employee and Contact. If the contact does not exist, a new one is created

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case createTaskstring
extshort number of the employee responsible for the contactstring
departmentDepartment Namestringoptional
anicontact phone numberstringRequired ani or email
emaile-mail contactstringRequired ani or email
tokenliraX token set in the integration settingsstring
webhookURL to inform about the resultsstringThe text will be added at the end.
textTask textstring
dateTask completion dateDateOptional, Default current time +1sec.
Example: "2017-01-01 17:00:00", must be greater than the current date and less than two years in the future
typeTypeInteger1, 2, 3 (Follow-up, Meeting, Call)

Example query:

POST https://api.lirax.net/general
cmd=createTask
ext=101
department=Sales
ani=19101234567
text=Prepare Task
date=2017-01-01 17:00:01
type=1
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"idtask":"22"}OK
400Incorrect parameters passed
401Invalid token passed

AddTaskResult#

A team is needed to add a result to a task, complete a task, or change the responsible person.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case AddTaskResultstringmandatory
extshort number of the employee who added the resultstringmandatory
idtaskId TaskIntegermandatory
newextNew responsiblestringoptional
finishCompleting the taskbooloptional
tokenliraX token set in the integration settingsstring
textResult textstringmandatory

Example query:

POST https://api.lirax.net/general
cmd=AddTaskResult
ext=101
idtask=123123
newext=191
text=The task at stage 1
finish=0
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"idtask":"123123"}OK
400Incorrect parameters passed
401Invalid token passed

GetTask#

A team is needed to add a result to a task, complete a task, or change the responsible person.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case AddTaskResultstringmandatory
task_idId TaskIntegermandatory
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=GetTask
task_id=123123
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{
"task_id":"609",
"type":"Follow-up",
"date_insert":"2014-12-09 14:15:55",
"date_end":"2014-12-09 15:12:07",
"text":"test Task!",
"ext":"101",
"Name":"System",
"coauthors":"1",
"list":[
{
"ext":"504",
"Name":"Sergiy Rybalchenko"
}
]
}
Here type is the type of task;
date_insert – creation date;
date_end – date of execution;
text – task text;
ext – responsible;
Name - name of the person responsible;
coauthors - number of co-performers;
list – list of co-performers
400Incorrect parameters passed
401Invalid token passed

createNote#

The command is needed to create a note for an existing contact from the Responsible Employee.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case createNotestring
extshort number of the employee responsible for the contactstring
anicontact phone numberstring
tokenliraX token set in the integration settingsstring
textNote textstring

Example query:

POST https://api.lirax.net/general
cmd=createNote
ext=101
ani=19101234567
text=News
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

createDeal#

The command is needed to create a New Agreement for the Responsible Employee and an existing contact.

Query parameters:

NameDescriptionData type/formatNote
cmdtransaction type, in this case createDealstring
extshort number of the employee responsible for the contactstring
anicontact phone numberstring
tokenliraX token set in the integration settingsstring
nameName of the dealstring
sumTransaction amountInteger
stageAgreement stageIntegerOnly existing stages are allowed
statusDeal status (optional)Integer0-Active, 1- Successfully Completed, 2- Completed Unsuccessfully

Example query:

POST https://api.lirax.net/general
cmd=createDeal
ext=101
ani=19101234567
name=Prepare Task
sum=3030
stage=1
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"id_deal":$integer}OK ($integer - integer)
400Incorrect parameters passed
401Invalid token passed

updateDeal#

The command is needed to update an existing deal with id_deal for the Responsible Employee and an existing contact.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case updateDealstring
extshort number of the employee responsible for the contactstring
anicontact phone numberstring
tokenliraX token set in the integration settingsstring
id_dealId agreementsInteger
nameName of the dealstring
sumTransaction amountInteger
stageAgreement stageIntegerOnly existing stages are allowed
statusDeal statusInteger0-active, 1- Successfully completed, 2- Failed

Example query:

POST https://api.lirax.net/general
cmd=updateDeal
ext=101
ani=19101234567
id_deal=1910
name=Prepare Task
sum=3030
stage=2
status=0
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed

addBlackPhone#

The command is needed to add a phone number to the blacklist (only numbers).

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case addBlackPhonestring
phonephone numberstringNumbers only
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=addBlackPhone
phone=100111000101
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

listBlackPhone#

The command is needed to get the Blacklist of phones.

Query parameters:

NameDescriptionData type/formatNote
cmdtype of operation, in this case listBlackPhonestring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=listBlackPhone
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"blacklist":["phone1", "phone2", . .. , "phoneN"]}OK
400Incorrect parameters passed
401Invalid token passed

delBlackPhone#

The command is needed to remove a phone number from the Blacklist (only numbers).

Query parameters:

NameDescriptionData type/formatNote
cmdtype of operation, in this case delBlackPhonestring
phonephone numberstringNumbers only
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=delBlackPhone
phone=100111000101
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

listBlackIP#

The command is needed to get the IP address blacklist

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case listBlackIPstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=listBlackIP
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"blacklist":["IP1", "IP2", . .. , "IPN"]}OK
400Incorrect parameters passed
401Invalid token passed

addBlackIP#

The command is needed to add an IP address to the Blacklist.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case addBlackIPstring
IPIP Addressstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=addBlackPhone
IP=100.111.000.101
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

delBlackIP#

The command is needed to remove an IP address from the blacklist.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case delBlackIPstring
IPIP Addressstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general

cmd=delBlackPhone
IP=100.111.000.101
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

getStages#

The command is needed to get a list of Deal Stages sorted by Vortex.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case getStagesstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=getStages
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"stages":[{"stage":$stage, "title":". .. "}, . .. ]}OK
400Incorrect parameters passed
401Invalid token passed

getShops#

The command is needed to get a list of stores.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case getShopsstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=getShops
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"shops":[{"id":$id_shop, "name":". .. "}, . .. ]}OK
400Incorrect parameters passed
401Invalid token passed

getUserStatuses#

The command is needed to get a list of user statuses.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case getUserStatusesstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=getUserStatuses
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"statuses":[{"status":$status, "title":". .. "}, . .. ]}OK
400Incorrect parameters passed
401Invalid token passed

getUsers#

The command is needed to get a list of users

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case getUsersstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=getUsers
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"users":[{"id":$id, "Name":". .. ", "ext":". .. ", "active":"0|1"}, . .. ]}OK
400Incorrect parameters passed
401Invalid token passed

initStatuses#

The command is needed to get the current statuses of operators via webhooks. It is used when enabling the integration. Further statuses will be received if they change; previous statuses should be ignored.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case initStatusesstring
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=initStatuses
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

sendMsg#

The command is needed to send a message to an employee in the corporate messenger.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case sendMsgstring
extshort number of the employee to whom the message is being sentstring
anithe name of the Contact who sent the messagestring
tokenliraX token set in the integration settingsstring
textMessage textstring

Example query:

POST https://api.lirax.net/general
cmd=sendMsg
ext=101
ani=19101234567
text=Prepare Task
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed

send_cloud_message#

The command is needed to send a message to a cloud messenger (Telegram, Viber, Facebook).

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case send_cloud_messagestring
clientCloud Messenger Client IDstringmandatory in the absence of ani
aniClient's phone number (only Telegram is used)mandatory in the absence of a client
tokenliraX token set in the integration settingsstring
textMessage textstring

Example query:

POST https://api.lirax.net/general
cmd=send_cloud_message
client=web_t123123123_00000
text=Prepare Task
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed
402Message not delivered

sendSMS#

The command is needed to send SMS via GSM modem. Requests should be sent no more than once every 5 seconds per modem.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case sendSMSstring
extshort number of the employee who sends the SMSstringNumbers only
providerprovider identifier (phone number in the GSM modem)stringNumbers only
phonePhone number to whom we send the messagestring
tokenliraX token set in the integration settingsstring
textMessage textstring

Example query:

POST https://api.lirax.net/general
cmd=sendSMS
ext=101
phone=19101234567
provider=380123456789
text=Prepare Task
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"id_sms":$id_sms}OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed
402The modem is not connected
403The modem is busy, please try again later.

checkSMS#

The command is needed to check the status of SMS delivery via a GSM modem. Requests should be sent no more than once every 5 seconds per modem.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case checkSMSstring
extshort number of the employee who sends the SMSstringNumbers only
providerprovider identifier (phone number in the GSM modem)stringNumbers only
id_smsId received by the sendSMS commandInteger
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=checkSMS
ext=101
id_sms=1910123
provider=380123456789
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"sms_status":$id_status}OK,
1- transferred to the provider, status unknown;
2- transferred to the provider, delivery is in progress;
3- delivered;
4- Delivery time has expired
400Incorrect parameters passed, or parameters not updated
401Invalid token passed

EncodePhone#

The command is needed to verify the received encrypted number.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case EncodePhonestring
phonePhone numberstringNumbers only
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=EncodePhone
phone=12123123123
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"phone":$encoded}OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed

DecodePhone#

The command is needed to get the decrypted number.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case EncodePhonestring
phonePhone numberstringNumbers only
tokenliraX token set in the integration settingsstring

Example query:

POST https://api.lirax.net/general
cmd=DecodePhone
phone=12123120960170061170799
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{"phone":$decoded}OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed

set_call_lost#

The command is needed to set a phone number as a missed call for CallBack

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case set_call_loststringmandatory
phonePhone numberstringNumbers only, required
extEmployee phone number for CallBackstringNumbers only, required
time_plan1 - Working hours,
2 - Evening,
3 - Night,
4 - Weekend
numbersThe time interval is defined in the weekly plan, by default 1
max_tryMaximum number of attempts to connect to a subscriber (operator not included)numbersDefault 3
intervalInitial interval between attempts in minutes, multiple of 6. Subsequent interval is equal to initial interval multiplied by attempt numbernumbersDefault 6
minutesNumber of minutes of delaynumbersDefault 0
hoursNumber of hours of delaynumbersDefault 0
daysNumber of days of delaynumbersDefault 0
weeksNumber of weeks of delaynumbersDefault 0
monthsNumber of months of delaynumbersDefault 0
infoText that will be spoken to the employee. Format: speech and text. Example: "uk Call Back service for missed call, wait for connection with the subscriber"string
tokenliraX token set in the integration settingsstringmandatory

Example query:

POST https://api.lirax.net/general
cmd=set_call_lost
phone=12123120960
ext=222
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed
402Server problems

get_makecall_data#

The command allows you to get information about the call using id_makecall, obtained by the makecall command.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case get_makecall_datastringmandatory
id_makecallresulting from makecallstringNumbers only, required
tokenliraX token set in the integration settingsstringmandatory

Example query:

POST https://api.lirax.net/general
cmd=get_makecall_data
id_makecall=e5251de22f99e071
token=202cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200{
"id_makecall":"e5251de22f99e071",
"call_start":"2021-10-28 16:02:32", "call_record":"https://files. lirax. net/voicerec. wav",
"duration":"5"
}
OK
400Incorrect parameters passed, or parameters not updated
401Invalid token passed
402Server problems

get_calls#

The command allows call log in json format (maximum 5000) for a time range. You can use the GET method for the command

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case get_callsstringmandatory
date_startStart of rangestringIn SQL format, required
date_finishEnd of rangestringIn SQL format, required
the interval should be less than 48 hours
call_typecall type, {-1, 0, 1}, in accordance {internal, input, output }, if absent, then allnumericaloptional
aniWho called?stringoptional
dnisWhere did they call?stringoptional
offsetSkip the number of lines in the outputnumericaloptional
tokenliraX token set in the integration settingsstringmandatory

Example query:

GET https://api.lirax.net/general?cmd=get_calls&date_start=2023-10-04 10:00:00&date_finish=2023-10-04 11:00:00&token=-----

Answer options:

HTTP codeBodyDescription
200[{"call_id":"6708", "ani":"203", "dnis":"380123123", "start":"2023-10-04 10:21:14", "connect":"2023-10-04 10:21:25", "record":
"https://files. lirax. net/voice_record2/x_10_21_14. wav",
"type":"1", "duration": "163", "disconnect_side":"0", "call_call_center_id":"6" }, {"call_id":"8326", "ani":"380111111", "dnis":"380123123", "start":"2023-10-04 10:04:07", "connect":"", "record":"", "type":"1", "duration":"0", "disconnect_side":"-1", "call_call_center_id":"0" }]
OK
connect – if no response, there will be a blank line
record – url conversation recording
disconnect_side – Who hung up, -1 system (possibly due to timeout), 0 – Who called, 1 – who was called
call_call_center_id – which call center handled the call (if any)
400Incorrect parameters passed, or parameters not updated
401Invalid token passed
402Server problems

set_webhook#

The command allows call log in json format (maximum 5000) for a time range. You can use the GET method for the command

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case set_webhookstringmandatory
type"0" - input, "1" - outputnumericalmandatory
event_typeinit - at the start of the call, trying - at the start of the outgoing leg, connect - when the subscriber picks up the phone, release - at the end of the outgoing leg, disconnect - at the end of the callstringmandatory
jsonJSON template to be used in the webhook body. You can use macros here:
[ani] — who is calling, [dnis] — who is being called, [date] — current time, [starto] — start of the incoming call, [starta] — moment the subscriber picks up the phone, [durationo] — duration of the incoming call, [durationa] — duration of the outgoing call, [anidnis] — operator number for the incoming call, [type] — call type: "-1" — internal, "0" — incoming, "1" — outgoing.
Example:
{"call_type":"[type]", "event_date":"[date]", "number_a":"[ani]", "number_b":"[dnis]", "call_duration": "[durationa]"}
stringmay be missing; if POST method is used then request body will be used as template
header_fieldAn additional header field that LiraX will insert into the webhook
example:
Authorisation: 123123123
stringoptional
methodGET|POSTstringOptional
by default
GET
urlUrl for webhooks
example: https://test. test. test. com/webhook?a=1&b=2
stringmandatory
tokenliraX token set in the integration settingsstringmandatory

Example query:

GET https://api.lirax.net/general?cmd=set_webhook&type=0&event_type=disconnect&url=https://test.test.test.com/webhook?a=1&b=2
&json={"call_type":"[type]","event_date":"[date]","number_a":"[ani]","number_b":"[dnis]","call_duration":"[durationa]"}
&token=-----

Answer options:

HTTP codeBodyDescription
200successfully
400Incorrect parameters passed, or parameters not updated
401Invalid token passed
402Server problems

Download call history#

Authorization via API

Authorizes the user in the system. All API methods can be used only after authorization.

In response to the request, upon successful authorization, in addition to the response body, a cookie file containing the session key is returned, similar to working with a WEB browser. In subsequent requests to API methods, the received cookie must be passed. The session lifetime is 15 minutes.

All requests to the API are made from the user whose attributes were used for authorization via this method. In doing so, we take into account all user rights, i.e. no more data can be obtained through the API than the user himself can see through the system interface. We recommend creating a separate user for the API for more specific settings of the rights of the connected application.

Resource URL

POST

https://lira. lirax. net/api/private/api/auth. php

Parameters

PARAMETERDESCRIPTION
USER_LOGINrequire
User login.
USER_HASHrequire
User password.

Calls

https://lira. lirax. net/services/call_show. php?action=show&date_start=2016-12-06 00:00:00&date_finish=2016-12-13 23:59:59&filter=call_ani_dnis&filter_value=&call_type=&call_connect=&call_export=1

date_start

Date From

date_finish

Date To

filter

Filter by field

possible values:

"call_ani", "call_dnis", "call_ani_dnis", "call_originip", "call_destination", "call_origination", "call_utm_source", "call_utm_medium", "call_utm_campaign", "call_utm_term"

filter_value

Filter value

call_type

possible values:

0 incoming, 1 outgoing

call_connect

possible values:

0 there was no conversation, 1 there was a conversation

Teams from LiraX to the runway#

makecall_finished#

The command reports the completion of the task of creating a call for 2 subscribers.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case makecall_finishedstring
id_makecallId - makecallstring
Call_idCall_id the outgoing arm of the callstringif success=0 empty
successThe subscriber picked up the phone.Integer0|1
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX
cmd=makecall_finished
id_makecall=ef232234feb12
from_LiraX_token=303cb962ac59075b964b07152d234b70
Call_id=b964b07152d
success=1

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

make2calls_finished#

The command reports the completion of the task of creating a call for 2 subscribers.

Query parameters:

NameDescriptionData type/formatNote
cmdthe type of operation, in this case make2calls_finishedstring
id_make2callsId - make2callsstring
successWas the phone picked up?Integer0- there was no one, 1- picked up the phone
duration_successthe duration of the conversation was not less than expected in the successtime parameterInteger0- less than, 1- greater than equal
keysJson array of pressed buttons, ivr_name – IVR name, ivr_entry – IVR menu item, key – selected buttonJsonmay be absent
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX
cmd=make2calls_finished
id_make2calls=ef232234feb12
from_LiraX_token=303cb962ac59075b964b07152d234b70
success=1
keys=[{"ivr_name":"Test","ivr_entry":"0","key":"9"},{"ivr_name":"Test","ivr_entry":"09","key":"7"}]
duration_success=0

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

staton#

The team informs about the statuses of employees.

Query parameters:

NameDescriptionData type/formatNote
cmdtype of operation, in this case statonstring
extliraX employee extension numberstring
statusemployee status identifier in personal accountInteger0- disconnected, 1- free, >1 - busy, value According to setting
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX
cmd=staton
ext=910
from_LiraX_token=303cb962ac59075b964b07152d234b70
status=1

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

smsDelivered#

The team informs about the delivery of SMS.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case smsDeliveredstring
id_smsId SMS, received by the sendSMS commandInteger
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX
cmd=smsDelivered
from_LiraX_token=303cb962ac59075b964b07152d234b70
id_sms=1212

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

smsReceived#

The team informs about receiving an SMS.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case smsReceivedstring
aniSubscriber's phone numberstring
idId SMS, received from the providerInteger
providerProvider name (phone number)string
textMessage textstringIn UTF8
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX
cmd=smsReceived
from_LiraX_token=303cb962ac59075b964b07152d234b70
id_sms=121
ani=38012345679
provider=380112345678
text=Hello

Answer options:

HTTP codeBodyDescription
200OK
400Incorrect parameters passed
401Invalid token passed

contact#

A command to obtain information about the client's name and his responsible employee by his phone number.

Query parameters:

NameDescriptionData type/formatNote
cmdtype of operation, in this case contactstring
phonecontact numberstring
callidunique caller IDstring
diversionexternal LiraX phone number from which the call was receivedstringwhen outgoing is equal to the number of the subscriber
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX
cmd=contact
phone=19101234567
diversion=12101234567
from_LiraX_token=303cb962ac59075b964b07152d234b70
callid=D12D0EB124F4E64AF4EA-1511

Answer options:

HTTP codeBodyDescription
200{ "contact_name": "Ivanov Ivan Ivanovich", "responsible": 103 }responsible — short number of the responsible user; may be absent if there is no responsible user or no short number is set for him/her
400{ "error": "Invalid parameters" }Incorrect parameters passed
401{ "error": "Invalid token" }Invalid token passed

event#

LiraX sends notifications to the WPP about call events: starting, accepting or ending a call, as well as information about the call after it ends.

Query parameters:

NameDescriptionData type/formatNote
cmdtype of operation, in this case eventstring
typecall typein/outincoming / outgoing
eventtype of event associated with the call:
INCOMING - an incoming call has arrived (at this time the manager's phone should start ringing).
ACCEPTED - the call was successfully received (the manager picked up the phone).
COMPLETED - the call is over (the manager or client hung up after the conversation).
CALL_COMPLETED – the call is completely completed.
string
phonecustomer's phone numberstring
diversionexternal LiraX phone number through which the call was received or madestring
extliraX employee's extension number,
in case of CALL_COMPLETED and type=in, contains the number to which the call came
string
callidunique caller IDstring
durationCall duration in secondsintwhen event=COMPLETED, CALL_COMPLETED
call_durationCall duration at the time of the event in secondsintwhen event=COMPLETED, CALL_COMPLETED
is_recordedis the call recorded?0/1when event=COMPLETED, CALL_COMPLETED
statusincoming call status:
Success - successful incoming call
Missed – missed incoming call
outgoing call status:
Success - successful outgoing call
Busy - LiraX got the answer from Zanyato
NotAvailable - LiraX received a response Subscriber is unavailable
NotAllowed - Calls to this direction are prohibited
stringwhen event=COMPLETED, CALL_COMPLETED
record_linklink to the call recording, if LiraX can provide it immediately, if not - the link is sent by the record commandstringwhen event=COMPLETED, CALL_COMPLETED
tidTracking Id
cidClient Id
csSource
cmMedium
ccCampaign
ctTherm
keysLast choice IVR menujsonwhen event= CALL_COMPLETED
From_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX

cmd=event
type=out
event=COMPLETED
phone=19101234567
ext=102
callid=D10D0EB124F4E64AF4EA-1511
duration=124
is_recorded=1
status=Success
record_link=https://link/file.wav
keys=[{"ivr_name":"Test","ivr_entry":"09","key":"4"}]
from_LiraX_token=303cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400{ "error": "Invalid parameters" }Incorrect parameters passed
401{ "error": "Invalid token" }Invalid token passed

record#

The message contains information about the conversation recording.

Query parameters:

NameDescriptionData type/formatNote
cmdoperation type, in this case recordstring
callidunique caller IDstring
record_linklink to call recordingstring
from_LiraX_tokenthe WPP token specified in the integration settingsstring

Example query:

POST https://domain/LiraX

cmd=record
callid=D10D0EB124F4E64AF4EA01511
record_link=https://link/file.wav
from_LiraX_token=303cb962ac59075b964b07152d234b70

Answer options:

HTTP codeBodyDescription
200OK
400{ "error": "Invalid parameters" }Incorrect parameters passed
401{ "error": "Invalid token" }Invalid token passed

ChangeLog#

2021-01-28

make2calls- firstInternal field added

2021-02-18

getContact- added method

2021-02-19

getStatInfo- added method

2021-04-12

AskQuestion- added method

2021-04-13

AddTag- added method

2021-04-13

DelTag- added method

2021-04-14

checkContact — tag field added

2021-08-13

get_sip_route_in — added method

2021-08-13

set_sip_route_in — added method

2021-09-12

SecondInternal in the make2calls function

2021-09-12

SpeechNoWait in the make2calls function

2021-10-26

set_call_lost- added method

2021-10-28

get_makecall_data - added method

2021-11-19

set_call_lost - added info, minutes, hours, days, weeks, months fields

2021-12-30

createTask — added email parameter, if contact does not exist, a new one is created

2022-08-25

Event — call_duration parameter added

2022-11-10

send_cloud_message - added method

2023-10-04

get_calls- added method

2023-10-20

AddTaskResult- added method

2024-09-24

GetTask- added method

2026-09-16

The domain api.lirax.net is used