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": 67, "clid": "value", "connected_at": 1562696243, "context": "value", "destination": 1, "dst": "32179243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 2.5, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 6.5, "dst_ua": "value", "duration": 7866, "min_charge": 3.2, "monitor_state": 3, "parent_id": 1579, "referred_by": "value", "src": "32179243705", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 5.33, "src_ua": "value", "start_time": 1582302920, "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": 6079, "clid": "value", "connected_at": 1508646728, "context": "value", "destination": 1, "dst": "13103345244", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 5.14, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.25, "dst_ua": "value", "duration": 4612, "min_charge": 4.33, "monitor_state": 3, "parent_id": 7456, "referred_by": "value", "src": "13103345244", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 5.14, "src_ua": "value", "start_time": 1616830607, "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/28 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": 9487, "clid": "value", "connected_at": 1466374568, "context": "value", "destination": 1, "dst": "12124537768", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.25, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 3.14, "dst_ua": "value", "duration": 5159, "min_charge": 8.25, "monitor_state": 3, "parent_id": 9526, "referred_by": "value", "src": "12124537768", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 7.1, "src_ua": "value", "start_time": 1561692077, "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/14 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": 176, "clid": "value", "connected_at": 1590438577, "context": "value", "destination": 0, "dst": "32179243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 3.33, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 4.11, "dst_ua": "value", "duration": 5913, "min_charge": 7.13, "monitor_state": 1, "parent_id": 5283, "referred_by": "value", "src": "44203844711", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 6.33, "src_ua": "value", "start_time": 1502521161, "state": 1 }, "links": {} }
DELETE
/calls/{id} Terminates ongoing Live Call
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
DELETE /v1.1/voipstudio/calls/76 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/24/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": 7259, "clid": "value", "connected_at": 1671086353, "context": "value", "destination": 2, "dst": "44203846719", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.33, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 9.17, "dst_ua": "value", "duration": 8853, "min_charge": 5.17, "monitor_state": 3, "parent_id": 4643, "referred_by": "value", "src": "12124537768", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 5.11, "src_ua": "value", "start_time": 1673187568, "state": 0 }, "links": {} }
GET
/calls/{id}/monitors Returns collection of Call monitor resources
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/75/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": 6045, "clid": "value", "connected_at": 1670761854, "context": "value", "destination": 2, "dst": "12124537768", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 4.1, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 4.11, "dst_ua": "value", "duration": 2937, "min_charge": 9.33, "monitor_state": 3, "parent_id": 5332, "referred_by": "value", "src": "44203844711", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 6.25, "src_ua": "value", "start_time": 1522239555, "state": 2 }, "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": 9499, "calldate": "2016-06-27 18:42:31", "charge": 2.17, "from": "44203846719", "from_charge": 2.25, "from_duration": 1895, "from_rate": 9.5, "to": "44203844711", "to_charge": 8.11, "to_duration": 2734, "to_rate": 3.25 } ], "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": 1254, "calldate": "2021-03-26 23:15:35", "charge": 9.25, "from": "44779243705", "from_charge": 7.11, "from_duration": 6981, "from_rate": 7.11, "to": "12124537768", "to_charge": 4.13, "to_duration": 9727, "to_rate": 6.17 }, "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": 1160, "clid": "value", "connected_at": 1519887563, "context": "value", "destination": 0, "dst": "44203846719", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 2.13, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 6.13, "dst_ua": "value", "duration": 9167, "min_charge": 4.11, "monitor_state": 0, "parent_id": 6468, "referred_by": "value", "src": "44203846719", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 9.25, "src_ua": "value", "start_time": 1546336347, "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": 2967, "call_id": "value", "created_at": "2024-03-03 08:42:57", "dst_id": "value", "dst_ua": "value", "duration": 3032, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2024-03-03 08:33:46", "user": 1968 } ], "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/34 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": 3728, "call_id": "value", "created_at": "2019-03-15 08:42:52", "dst_id": "value", "dst_ua": "value", "duration": 4776, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2019-03-15 08:39:40", "user": 4814 }, "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/75 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/53 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/99 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