Calls module
Endpoints
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": 5171, "clid": "value", "connected_at": 1463296088, "context": "value", "destination": 1, "dst": "32179243705", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 2.14, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 3.13, "dst_ua": "value", "duration": 1894, "min_charge": 6.13, "monitor_state": 2, "parent_id": 1513, "referred_by": "value", "src": "44203846719", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 3.2, "src_ua": "value", "start_time": 1647672112, "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": 282, "clid": "value", "connected_at": 1483683499, "context": "value", "destination": 0, "dst": "13103345244", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 2.1, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 4.1, "dst_ua": "value", "duration": 2367, "min_charge": 2.2, "monitor_state": 2, "parent_id": 3696, "referred_by": "value", "src": "12124537768", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 2.25, "src_ua": "value", "start_time": 1706592536, "state": 1 }, "links": {} }
GET
/calls/{id} Returns Live Call resource for given Id
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
GET /v1.1/voipstudio/calls/95 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": 1443, "clid": "value", "connected_at": 1721423472, "context": "value", "destination": 2, "dst": "12124537768", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.2, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 8.11, "dst_ua": "value", "duration": 590, "min_charge": 6.11, "monitor_state": 3, "parent_id": 5917, "referred_by": "value", "src": "13103345244", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 4.2, "src_ua": "value", "start_time": 1505894578, "state": 0 }, "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/47 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": 9648, "clid": "value", "connected_at": 1683906056, "context": "value", "destination": 0, "dst": "13103345244", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 7.5, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 3.33, "dst_ua": "value", "duration": 2386, "min_charge": 7.25, "monitor_state": 2, "parent_id": 5915, "referred_by": "value", "src": "32179243705", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 6.13, "src_ua": "value", "start_time": 1526116266, "state": 1 }, "links": {} }
DELETE
/calls/{id} Terminates ongoing Live Call
Parameters
Endpoint URL:
{id} integerCall identifier
Example Request
DELETE /v1.1/voipstudio/calls/31 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/7/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": 2492, "clid": "value", "connected_at": 1700701287, "context": "value", "destination": 1, "dst": "44203846719", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 6.11, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.25, "dst_ua": "value", "duration": 9877, "min_charge": 4.33, "monitor_state": 1, "parent_id": 5216, "referred_by": "value", "src": "44203844711", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 9.33, "src_ua": "value", "start_time": 1655735821, "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/91/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": 8812, "clid": "value", "connected_at": 1528302180, "context": "value", "destination": 0, "dst": "44203844711", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 8.14, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.11, "dst_ua": "value", "duration": 138, "min_charge": 2.1, "monitor_state": 2, "parent_id": 9447, "referred_by": "value", "src": "44779243705", "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": 1656397494, "state": 0 }, "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": 3055, "calldate": "2020-04-26 19:50:55", "charge": 8.5, "from": "44203846719", "from_charge": 8.14, "from_duration": 7538, "from_rate": 7.17, "to": "44203844711", "to_charge": 3.14, "to_duration": 1051, "to_rate": 3.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": 4039, "calldate": "2020-11-06 15:30:39", "charge": 9.17, "from": "32179243705", "from_charge": 2.14, "from_duration": 1259, "from_rate": 7.13, "to": "13103345244", "to_charge": 2.25, "to_duration": 9918, "to_rate": 9.33 }, "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": 8275, "clid": "value", "connected_at": 1590341107, "context": "value", "destination": 1, "dst": "44203846719", "dst_call_id": "value", "dst_codec": "value", "dst_connection": 6.33, "dst_contact": "value", "dst_id": "value", "dst_name": "value", "dst_rate": 5.25, "dst_ua": "value", "duration": 9341, "min_charge": 5.17, "monitor_state": 1, "parent_id": 3444, "referred_by": "value", "src": "12124537768", "src_call_id": "value", "src_codec": "value", "src_contact": "value", "src_id": "value", "src_name": "value", "src_rate": 8.1, "src_ua": "value", "start_time": 1618808693, "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": 3570, "call_id": "value", "created_at": "2020-06-03 20:01:13", "dst_id": "value", "dst_ua": "value", "duration": 2513, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2020-06-03 19:46:24", "user": 9078 } ], "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/20 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": 70, "call_id": "value", "created_at": "2020-10-16 03:42:25", "dst_id": "value", "dst_ua": "value", "duration": 3543, "src_id": "value", "src_ua": "value", "status": "value", "type": "value", "updated_at": "2020-10-16 03:48:55", "user": 3204 }, "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/62 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/25 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/35 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