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": 7082, "clid": "value", "connected_at": 1542979547, "context": "value", "destination": 2, "dst": "13103345244", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 3.5, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 4.1, "dst_ua": "value", "duration": 8813, "min_charge": 7.14, "monitor_state": 0, "parent_id": 1494, "referred_by": "value", "src": "32179243705", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 3.1, "src_ua": "value", "start_time": 1574345575, "state": 1 } ], "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": 9105, "clid": "value", "connected_at": 1504761571, "context": "value", "destination": 2, "dst": "13103345244", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.13, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 7.2, "dst_ua": "value", "duration": 6538, "min_charge": 4.5, "monitor_state": 3, "parent_id": 5852, "referred_by": "value", "src": "44203844711", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 9.2, "src_ua": "value", "start_time": 1727453318, "state": 0 }, "links": {} }
GET
/calls/{id} Returns Live Call resource for given Id
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/14 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": 4618, "clid": "value", "connected_at": 1501645369, "context": "value", "destination": 2, "dst": "12124537768", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 6.13, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.25, "dst_ua": "value", "duration": 8371, "min_charge": 4.2, "monitor_state": 2, "parent_id": 594, "referred_by": "value", "src": "44203846719", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 2.5, "src_ua": "value", "start_time": 1703299577, "state": 3 }, "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/81 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": 6992, "clid": "value", "connected_at": 1686758215, "context": "value", "destination": 0, "dst": "44203846719", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 5.25, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.5, "dst_ua": "value", "duration": 1439, "min_charge": 6.2, "monitor_state": 2, "parent_id": 919, "referred_by": "value", "src": "12124537768", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 2.2, "src_ua": "value", "start_time": 1570343972, "state": 1 }, "links": {} }
DELETE
/calls/{id} Terminates ongoing Live Call
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
DELETE /v1.1/voipstudio/calls/11 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": 9052, "clid": "value", "connected_at": 1617521239, "context": "value", "destination": 2, "dst": "32179243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.1, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 2.13, "dst_ua": "value", "duration": 152, "min_charge": 3.5, "monitor_state": 0, "parent_id": 5291, "referred_by": "value", "src": "13103345244", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 2.17, "src_ua": "value", "start_time": 1590841722, "state": 2 }, "links": {} }
GET
/calls/{id}/monitors Returns collection of Call monitor resources
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/49/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": 8855, "clid": "value", "connected_at": 1603533404, "context": "value", "destination": 0, "dst": "32179243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.14, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 2.13, "dst_ua": "value", "duration": 7, "min_charge": 3.5, "monitor_state": 0, "parent_id": 4620, "referred_by": "value", "src": "32179243705", "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": 1616735923, "state": 1 }, "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": 275, "calldate": "2022-10-14 16:13:33", "charge": 6.5, "from": "44779243705", "from_charge": 4.2, "from_duration": 8420, "from_rate": 2.25, "to": "44779243705", "to_charge": 3.17, "to_duration": 3186, "to_rate": 6.13 } ], "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": 1085, "calldate": "2019-11-23 19:22:34", "charge": 7.13, "from": "44203846719", "from_charge": 3.2, "from_duration": 5243, "from_rate": 4.14, "to": "32179243705", "to_charge": 9.33, "to_duration": 8440, "to_rate": 8.5 }, "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": 9301, "clid": "value", "connected_at": 1546377186, "context": "value", "destination": 2, "dst": "44779243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.11, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 2.11, "dst_ua": "value", "duration": 4866, "min_charge": 8.25, "monitor_state": 3, "parent_id": 3851, "referred_by": "value", "src": "44779243705", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 5.2, "src_ua": "value", "start_time": 1522884019, "state": 1 }, "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": 8517, "call_id": "value", "created_at": "2022-08-20 21:59:07", "dst_id": "value", "dst_ua": "value", "duration": 6140, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2022-08-20 22:00:26", "user": 6428 } ], "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/47 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": 7785, "call_id": "value", "created_at": "2020-05-26 19:09:31", "dst_id": "value", "dst_ua": "value", "duration": 9864, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2020-05-26 18:56:37", "user": 7937 }, "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/12 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/30 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/54 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