Calls module
Endpoints for making and managing phone calls
GET
/calls Returns collection of Live Call resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/calls HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
401 Unauthorized
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": [ { "id": 9925, "clid": "value", "connected_at": 1601258808, "context": "value", "destination": 1, "dst": "12124537768", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 4.13, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 3.33, "dst_ua": "value", "duration": 9298, "min_charge": 3.14, "monitor_state": 1, "parent_id": 1313, "referred_by": "value", "src": "44203846719", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 6.5, "src_ua": "value", "start_time": 1644867112, "state": 0 } ], "total": 59 }
POST
/calls Make a call to number in e164 format
Parameters
JSON body attributes:
to string
Destination number in e164 format
Destination number in e164 format
from string
User ID from which call should originate (Optional)
User ID from which call should originate (Optional)
caller_id string
Caller ID to use for the call. E164 number or 'anonymous' (Optional)
Caller ID to use for the call. E164 number or 'anonymous' (Optional)
Example Request
POST /v1.1/voipstudio/calls HTTP/1.1 Host: l7api.com { "to": "12123455483", "from": "12341", "caller_id": "442036427900" }
Responses
201 Created
400 Validation error
401 Unauthorized
400 Validation error
401 Unauthorized
Example Response
HTTP/1.1 201 OK Content-Type: application/json { "data": { "id": 1055, "clid": "value", "connected_at": 1585422085, "context": "value", "destination": 1, "dst": "12124537768", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 3.5, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.33, "dst_ua": "value", "duration": 9245, "min_charge": 8.13, "monitor_state": 3, "parent_id": 3977, "referred_by": "value", "src": "32179243705", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 7.13, "src_ua": "value", "start_time": 1588893977, "state": 2 }, "links": {} }
GET
/calls/{id} Returns Live Call resource for given Id
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/6 HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
403 Access denied
404 Resource not found
401 Unauthorized
403 Access denied
404 Resource not found
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": { "id": 2551, "clid": "value", "connected_at": 1612444374, "context": "value", "destination": 1, "dst": "44203844711", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 4.13, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 3.5, "dst_ua": "value", "duration": 9277, "min_charge": 5.5, "monitor_state": 2, "parent_id": 5246, "referred_by": "value", "src": "13103345244", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 5.13, "src_ua": "value", "start_time": 1540736027, "state": 1 }, "links": {} }
PATCH
/calls/{id} Transfers existing Call resource to given e164 number
Parameters
Endpoint URL:
{id} integerCall identifier
JSON body attributes:
dst string
Destination number in e164 format
Destination number in e164 format
state string
Change call state, for example Answer ringing call
Change call state, for example Answer ringing call
labels array
action_url string
Attach action URL to this call
Attach action URL to this call
action_text string
Text to be displayed for action_url link
Text to be displayed for action_url link
monitor_state string
Allows to start, pause and resume call monitoring (recording)
Allows to start, pause and resume call monitoring (recording)
Example Request
PATCH /v1.1/voipstudio/calls/30 HTTP/1.1 Host: l7api.com { "dst": "12123455483", "state": "answer", "labels": "abcd", "action_url": "https://my-crm.com/contact/id", "action_text": "Click here for contact details", "monitor_state": "M" }
Responses
301 Moved permanently
400 Validation error
401 Unauthorized
403 Access denied
404 Resource not found
400 Validation error
401 Unauthorized
403 Access denied
404 Resource not found
Example Response
HTTP/1.1 301 OK Content-Type: application/json { "data": { "id": 2601, "clid": "value", "connected_at": 1580460449, "context": "value", "destination": 1, "dst": "44779243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 4.14, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 2.14, "dst_ua": "value", "duration": 9232, "min_charge": 4.1, "monitor_state": 3, "parent_id": 8735, "referred_by": "value", "src": "44203844711", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 4.25, "src_ua": "value", "start_time": 1600572014, "state": 1 }, "links": {} }
DELETE
/calls/{id} Terminates ongoing Live Call
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
DELETE /v1.1/voipstudio/calls/5 HTTP/1.1 Host: l7api.com
Responses
204 Success
401 Unauthorized
403 Access denied
404 Resource not found
401 Unauthorized
403 Access denied
404 Resource not found
Example Response
HTTP/1.1 204 OK
GET
/calls/{id}/trace Returns collection of Call trace resources
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/46/trace HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
401 Unauthorized
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": { "id": 852, "clid": "value", "connected_at": 1636094060, "context": "value", "destination": 0, "dst": "44203844711", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 5.25, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 2.25, "dst_ua": "value", "duration": 8723, "min_charge": 7.13, "monitor_state": 2, "parent_id": 1431, "referred_by": "value", "src": "44203846719", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 8.2, "src_ua": "value", "start_time": 1566494560, "state": 3 }, "links": {} }
GET
/calls/{id}/monitors Returns collection of Call monitor resources
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/80/monitors HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
401 Unauthorized
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": { "id": 1873, "clid": "value", "connected_at": 1560813574, "context": "value", "destination": 1, "dst": "44203844711", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.25, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 6.25, "dst_ua": "value", "duration": 8520, "min_charge": 3.2, "monitor_state": 3, "parent_id": 6018, "referred_by": "value", "src": "13103345244", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 5.17, "src_ua": "value", "start_time": 1544220679, "state": 3 }, "links": {} }
GET
/webcalls Returns Webcall resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/webcalls HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
401 Unauthorized
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": [ { "id": 4767, "calldate": "2017-03-13 11:30:11", "charge": 8.11, "from": "44203844711", "from_charge": 8.33, "from_duration": 6673, "from_rate": 4.13, "to": "44203846719", "to_charge": 3.11, "to_duration": 6086, "to_rate": 8.2 } ], "total": 59 }
POST
/webcalls Make a webcall from e164 number to other e164 number or extemsion
Parameters
JSON body attributes:
from string
Source number in e164 format
Source number in e164 format
to string
Destination number in e164 format or extension
Destination number in e164 format or extension
Example Request
POST /v1.1/voipstudio/webcalls HTTP/1.1 Host: l7api.com { "from": "12123455483", "to": "12123455483" }
Responses
201 Created
400 Validation error
401 Unauthorized
400 Validation error
401 Unauthorized
Example Response
HTTP/1.1 201 OK Content-Type: application/json { "data": { "id": 1350, "calldate": "2018-01-26 09:24:15", "charge": 9.11, "from": "13103345244", "from_charge": 5.13, "from_duration": 9993, "from_rate": 2.17, "to": "13103345244", "to_charge": 6.14, "to_duration": 567, "to_rate": 7.2 }, "links": {} }
POST
/leadcalls Make a leadcall from user to e164 number
Parameters
JSON body attributes:
caller_id string
Caller ID
Caller ID
to string
Destination number in e164 format or extension
Destination number in e164 format or extension
tts string
Example Request
POST /v1.1/voipstudio/leadcalls HTTP/1.1 Host: l7api.com { "caller_id": "12123455483", "to": "12123455483", "tts": "abcd" }
Responses
201 Created
400 Validation error
401 Unauthorized
400 Validation error
401 Unauthorized
Example Response
HTTP/1.1 201 OK Content-Type: application/json { "data": { "id": 3098, "clid": "value", "connected_at": 1529625647, "context": "value", "destination": 1, "dst": "44203846719", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 9.11, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.14, "dst_ua": "value", "duration": 1519, "min_charge": 7.1, "monitor_state": 2, "parent_id": 606, "referred_by": "value", "src": "44779243705", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 7.17, "src_ua": "value", "start_time": 1680309729, "state": 3 }, "links": {} }
GET
/mediasessions Returns collection of Media Session resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/mediasessions HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
401 Unauthorized
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": [ { "id": 1177, "call_id": "value", "created_at": "2023-12-26 08:11:19", "dst_id": "value", "dst_ua": "value", "duration": 7120, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2023-12-26 08:13:14", "user": 3893 } ], "total": 59 }
GET
/mediasessions/{id} Returns Media Session resource for given Id
Parameters
Endpoint URL:
{id} integerMediaSession identifier
Example Request
GET /v1.1/voipstudio/mediasessions/49 HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
403 Access denied
404 Resource not found
401 Unauthorized
403 Access denied
404 Resource not found
Example Response
HTTP/1.1 200 OK Content-Type: application/json { "data": { "id": 4322, "call_id": "value", "created_at": "2022-06-21 12:54:30", "dst_id": "value", "dst_ua": "value", "duration": 4710, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2022-06-21 12:43:14", "user": 7647 }, "links": {} }
GET
/calllabels Returns collection of CallLabel resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/calllabels HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
401 Unauthorized
Example Response
POST
/calllabels Creates new CallLabel resource
Parameters
Example Request
POST /v1.1/voipstudio/calllabels HTTP/1.1 Host: l7api.com
Responses
201 Created
400 Validation error
400 Validation error
Example Response
GET
/calllabels/{id} Returns CallLabel resource for given Id
Parameters
Endpoint URL:
{id} integerCallLabel identifier
Example Request
GET /v1.1/voipstudio/calllabels/38 HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
403 Access denied
404 Resource not found
401 Unauthorized
403 Access denied
404 Resource not found
Example Response
PATCH
/calllabels/{id} Updates existing CallLabel resource
Parameters
Endpoint URL:
{id} integerCallLabel identifier
Example Request
PATCH /v1.1/voipstudio/calllabels/95 HTTP/1.1 Host: l7api.com
Responses
200 Success
400 Validation error
404 Resource not found
400 Validation error
404 Resource not found
Example Response
DELETE
/calllabels/{id} Deletes existing CallLabels resources
Parameters
Endpoint URL:
{id} integerCallLabel identifier
Example Request
DELETE /v1.1/voipstudio/calllabels/53 HTTP/1.1 Host: l7api.com
Responses
204 Success
401 Unauthorized
403 Access denied
404 Resource not found
401 Unauthorized
403 Access denied
404 Resource not found
Example Response
HTTP/1.1 204 OK