Customer module
Endpoints
Endpoints for managing customers and users
GET
/contacts/{id}/cdrs Returns collection of Cdr resources for given user
Parameters
Endpoint URL:
{id} integerContact identifier
Example Request
GET /v1.1/voipstudio/contacts/90/cdrs 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": 1462,
"company": "value",
"created_at": "value",
"dialler_source_id": 7471,
"email": "value",
"ext": "value",
"first_name": "value",
"global": true,
"group_name": "value",
"internal": true,
"last_call_at": "2021-07-12 11:24:36",
"last_name": "value",
"mobile": "value",
"mobile_1": "value",
"mobile_2": "value",
"nb_call_attempts": 9317,
"next_call_at": "2021-07-12 11:27:28",
"notes": "value",
"outcome_id": 4557,
"rel_user_id": 5412,
"tel": "value",
"tel_1": "value",
"tel_2": "value",
"type": 2,
"user_id": 6781
},
"links": {}
}
GET
/queuegroups Returns collection of QueueGroup resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/queuegroups 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": 14,
"name": "value"
}
],
"total": 59
}
POST
/queuegroups Creates new QueueGroup resource
Parameters
Example Request
POST /v1.1/voipstudio/queuegroups HTTP/1.1 Host: l7api.com
Responses
201 Created
400 Validation error
400 Validation error
Example Response
HTTP/1.1 201 OK
Content-Type: application/json
{
"data": {
"id": 784,
"name": "value"
},
"links": {}
}
GET
/queuegroups/{id} Returns QueueGroup resource for given Id
Parameters
Endpoint URL:
{id} integerQueueGroup identifier
Example Request
GET /v1.1/voipstudio/queuegroups/43 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": 1116,
"name": "value"
},
"links": {}
}
PATCH
/queuegroups/{id} Updates existing QueueGroup resource
Parameters
Endpoint URL:
{id} integerQueueGroup identifier
Example Request
PATCH /v1.1/voipstudio/queuegroups/46 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
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 2039,
"name": "value"
},
"links": {}
}
DELETE
/queuegroups/{id} Deletes existing QueueGroups resources
Parameters
Endpoint URL:
{id} integerQueueGroup identifier
Example Request
DELETE /v1.1/voipstudio/queuegroups/60 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
DELETE
/customers/{id} Deletes customer account
Parameters
Endpoint URL:
{id} integerResource identifier
Example Request
DELETE /v1.1/voipstudio/customers/95 HTTP/1.1 Host: l7api.com
Responses
204 Success
401 Unauthorized
403 Access denied
401 Unauthorized
403 Access denied
Example Response
HTTP/1.1 204 OK
GET
/users Returns collection of User resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/users 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": 7914,
"active": true,
"created_at": "value",
"customer": 370,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 1,
"visited_apps": "value"
}
],
"total": 59
}
PATCH
/users [BULK] Updates location and/or teams of existing User resources
Parameters
JSON body attributes:
id integer
location_id integer
groups array
Example Request
PATCH /v1.1/voipstudio/users HTTP/1.1
Host: l7api.com
[
{
"id": 296,
"location_id": 249,
"groups": "abcd"
},
{
"id": 1704,
"location_id": 249,
"groups": "abcd"
}
]
Responses
200 Success
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 200 OK
Content-Type: application/json
{
"data": {
"id": 4450,
"active": true,
"created_at": "value",
"customer": 9101,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 0,
"visited_apps": "value"
},
"links": {}
}
GET
/users/{id} Returns User resource for given Id
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/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
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 8271,
"active": true,
"created_at": "value",
"customer": 5045,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 1,
"visited_apps": "value"
},
"links": {}
}
DELETE
/users/{id} Deletes existing User resource
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
DELETE /v1.1/voipstudio/users/87 HTTP/1.1 Host: l7api.com
Responses
204 Success
401 Unauthorized
403 Access denied
401 Unauthorized
403 Access denied
Example Response
HTTP/1.1 204 OK
GET
/me Returns User metadata
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/me HTTP/1.1 Host: l7api.com
Responses
200 Success
401 Unauthorized
403 Access denied
401 Unauthorized
403 Access denied
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
"id": "value",
"balance": 2.5,
"cc": "value",
"cli": "value",
"currency_iso": "value",
"is_root": "value",
"language": "value"
}
],
"total": 59
}
GET
/users/{id}/contacts Returns collection of Contact resources only for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/7/contacts 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": 4886,
"active": true,
"created_at": "value",
"customer": 6635,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 1,
"visited_apps": "value"
},
"links": {}
}
GET
/users/{id}/cdrs Returns collection of Cdr resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/47/cdrs 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": 2645,
"active": true,
"created_at": "value",
"customer": 1616,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 1,
"visited_apps": "value"
},
"links": {}
}
GET
/users/{id}/chatmsgs Returns collection of Chat nessage resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/78/chatmsgs 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": 8321,
"active": true,
"created_at": "value",
"customer": 4522,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 1,
"visited_apps": "value"
},
"links": {}
}
GET
/users/{id}/calls Returns collection of Call resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/7/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": 7701,
"active": true,
"created_at": "value",
"customer": 5804,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 0,
"visited_apps": "value"
},
"links": {}
}
GET
/usergroups Returns collection of UserGroup resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/usergroups 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": 993,
"color": "value",
"name": "value"
}
],
"total": 59
}
POST
/usergroups Creates new UserGroup resource
Parameters
JSON body attributes:
name string
color string
Example Request
POST /v1.1/voipstudio/usergroups HTTP/1.1
Host: l7api.com
{
"name": "abcd",
"color": "abcd"
}
Responses
201 Created
400 Validation error
400 Validation error
Example Response
HTTP/1.1 201 OK
Content-Type: application/json
{
"data": {
"id": 8424,
"color": "value",
"name": "value"
},
"links": {}
}
GET
/usergroups/{id} Returns UserGroup resource for given Id
Parameters
Endpoint URL:
{id} integerUserGroup identifier
Example Request
GET /v1.1/voipstudio/usergroups/70 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": 8602,
"color": "value",
"name": "value"
},
"links": {}
}
PATCH
/usergroups/{id} Updates existing UserGroup resource
Parameters
Endpoint URL:
{id} integerUserGroup identifier
JSON body attributes:
name string
color string
Example Request
PATCH /v1.1/voipstudio/usergroups/61 HTTP/1.1
Host: l7api.com
{
"name": "abcd",
"color": "abcd"
}
Responses
200 Success
400 Validation error
404 Resource not found
400 Validation error
404 Resource not found
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 1564,
"color": "value",
"name": "value"
},
"links": {}
}
DELETE
/usergroups/{id} Deletes existing UserGroups resources
Parameters
Endpoint URL:
{id} integerUserGroup identifier
Example Request
DELETE /v1.1/voipstudio/usergroups/44 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
/usergrouppolicies Returns collection of UserGroup resources
Parameters
No parameters
Example Request
GET /v1.1/voipstudio/usergrouppolicies 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": 1936,
"color": "value",
"name": "value"
}
],
"total": 59
}
POST
/usergrouppolicies Creates new UserGroup resource
Parameters
JSON body attributes:
name string
color string
Example Request
POST /v1.1/voipstudio/usergrouppolicies HTTP/1.1
Host: l7api.com
{
"name": "abcd",
"color": "abcd"
}
Responses
201 Created
400 Validation error
400 Validation error
Example Response
HTTP/1.1 201 OK
Content-Type: application/json
{
"data": {
"id": 9688,
"color": "value",
"name": "value"
},
"links": {}
}
GET
/usergrouppolicies/{id} Returns UserGroup resource for given Id
Parameters
Endpoint URL:
{id} integerUserGroup identifier
Example Request
GET /v1.1/voipstudio/usergrouppolicies/81 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": 2225,
"color": "value",
"name": "value"
},
"links": {}
}
PATCH
/usergrouppolicies/{id} Updates existing UserGroup resource
Parameters
Endpoint URL:
{id} integerUserGroup identifier
JSON body attributes:
name string
color string
Example Request
PATCH /v1.1/voipstudio/usergrouppolicies/4 HTTP/1.1
Host: l7api.com
{
"name": "abcd",
"color": "abcd"
}
Responses
200 Success
400 Validation error
404 Resource not found
400 Validation error
404 Resource not found
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 6808,
"color": "value",
"name": "value"
},
"links": {}
}
DELETE
/usergrouppolicies/{id} Deletes existing UserGroups resources
Parameters
Endpoint URL:
{id} integerUserGroup identifier
Example Request
DELETE /v1.1/voipstudio/usergrouppolicies/64 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
/users/{id}/audio Returns User resource for given Id
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/63/audio 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": 395,
"active": true,
"created_at": "value",
"customer": 830,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 0,
"visited_apps": "value"
},
"links": {}
}
DELETE
/users/{id}/audio Reset existing User audio resource
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
DELETE /v1.1/voipstudio/users/18/audio HTTP/1.1 Host: l7api.com
Responses
204 Success
401 Unauthorized
403 Access denied
401 Unauthorized
403 Access denied
Example Response
HTTP/1.1 204 OK
GET
/users/{id}/smsthreads/{from}/{to} Returns collection of grouped SMS resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/24/smsthreads/{from}/{to} 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": 7188,
"active": true,
"created_at": "value",
"customer": 2800,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 0,
"visited_apps": "value"
},
"links": {}
}
GET
/users/{id}/sms/threads/{from}/{to} Returns collection of grouped SMS resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/30/sms/threads/{from}/{to} 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": 8465,
"active": true,
"created_at": "value",
"customer": 1716,
"email": "value",
"first_name": "value",
"is_initial": true,
"is_root": true,
"last_name": "value",
"roles": "value",
"two_factor_auth": 1,
"visited_apps": "value"
},
"links": {}
}
Models
User
| Attribute | Data type | Description |
| id | integer | Object ID |
| is_initial | boolean | True if the user is the one who created the account. |
| string | The user's email address. | |
| first_name | string | The user's first name. |
| last_name | string | The user's last name. |
| roles | array | List of ACL Roles assigned to this user. |
| active | boolean | True if the user account is active. |
| visited_apps | array | List of applications used by this user. |
| is_root | boolean | True if the user is root Admin account. |
| two_factor_auth | string | Two factor authentication state: D (Disabled), E (Authentication code sent by email) |
| created_at | string | Creation date and time in format YYYY-MM-DD H:I:S in UTC timezone |
| customer_id_id | integer | The identifier of customer associated with this user account. |
| mobile_activated | boolean | True if mobile number for outbound SMS is active. |
| mobile | string | The mobile number associated with this user account. |
| ext | string | The user's extension number. |
| cli | string | The user's default Caller ID. |
| esc_cli | string | The user's Emergency Services Caller ID. |
| cc | string | The user's dialplan country code. |
| area_code | string | The user's dialplan area code. |
| ring_time | string | The duration, in seconds, that the user's phone should ring before the call is directed to the final destination. |
| final_dst_type | string | The component type of unanswered calls destination, one of: U (forward to another User), V (Voicemail), R (Ring Group), I (IVR), Q (Queue), C (Conference room), H (Hang up call) |
| final_dst_id | integer | The identifier of final destination. |
| vm_pin | string | Four digit Voicemail PIN code. |
| vm_to_email | boolean | True if voicemail messages should be sent to the user's email address. |
| vm_emails | array | List of email addresses where voicemail messages should be sent to. |
| vm_tts | string | True if voicemail messages should be converted to text transcript. |
| vm_new | integer | Number of new voicemail messages. |
| vm_old | integer | Number of old voicemail messages. |
| cw | boolean | True if Call Waiting is enabled on the user's account, allowing multiple incoming calls at the same time. |
| dnd | boolean | True if Do Not Disturb is enabled on the user's account, causing incoming calls to be sent directly to the final destination instead of ringing the user's phone. |
| rec_allowed | boolean | True if Ah-hoc Call Recording is allowed on user's account. |
| rec_never_internal | boolean | True if intern calls between extensions should never be recorded. |
| fm | boolean | True if Follow Me (Call Forwarding) is enabled on user's account. |
| fm_only_direct | boolean | True if calls should be forwarded only when coming directly from the user's DDI number. If enabled, calls from queues, IVRs, etc., will not be forwarded. |
| fm_init_ring_time | integer | The duration, in seconds, that the user's phone should ring before the call is forwarded. |
| fm_announcement_enabled | boolean | True if an announcement should be played to the caller before the call is forwarded. |
| fm_confirm_required | boolean | True if confirmation should be required from forwarding destination to accept the call. |
| fm_allowed | boolean | True if Follow Me (Call Forwarding) is allowed on user's account. |
| fm_targets | array | List of Follow Me (Call Forwarding) destinations - phone numbers or SIP URIs. |
| fm_ring_time | string | The duration, in seconds, that the forwarding destination should ring before the call is directed to the Follow Me final destination. |
| fm_strategy | string | Ring Strategy to be used when calling Follow Me destinations. One of: A (Ring All), H (Hunt), M (Memory Hunt) |
| fm_final_dst_type | string | The component type of unanswered calls destination. One of: U (forward to another User), V (Voicemail), R (Ring Group), I (IVR), Q (Queue), C (Conference room), H (Hang up call) |
| fm_final_dst_id | integer | The identifier of final destination component. |
| fm_cli | string | What Caller ID should be used for forwarded calls. One of: R (Remote party Caller ID), L (Local user's Caller ID) |
| nun | string | Network Unavailability Number where calls should be sent to in case user's own phone is off-line. |
| nun_only_direct | boolean | True if calls should be sent to Network Unavailability Number only when coming directly from the user's DDI number. If enabled, calls from queues, IVRs, etc., will not be forwarded. |
| nun_ring_time | integer | The duration, in seconds, that the Network Unavailability Number should ring before the call is directed to the final destination. |
| monitor | string | Status of Automated Call Recording on user's account. One of: N (Call Recording Disabled), A (Record All Calls), I (Record Inbound Calls only), O (Record Outbound Calls only) |
| monitor_transcript | string | Status of Call Recording transcripts and AI analysis. One of: D (Disabled), Y (Generate transcript, summary and sentiment analysis) |
| auto_answer_header | string | True if Auto Answer header should be added to SIP signalling for incoming calls to this user. |
| log_missed_calls | boolean | True if missed call CDRs for this user should be created for unanswered calls from Ring Groups, Queues etc. |
| language | string | User's language used for audio announcements. |
| cnam | boolean | True if CNAM lookups should be performed for incoming calls to this user. |
| email_missed | string | True if missed call email notifications should be sent to this user. |
| call_barge_allowed | boolean | True if this user is allowed to barged in (monitor) other user's calls. Note: for this to work Call Barging Permissions need to be configured too. |
| transfer_cli | string | What Caller ID should be used for blind transfers. One of: R (Remote party Caller ID), L (Local user's Caller ID) |
| nb_sip_locations | integer | Number of registered SIP clients on user's account. |
| pickup_group_id | integer | The identifier of the Pickup Group this user belongs to. |
| location_id | string | The identifier of the Location this user belongs to. |
| vm_announcement_id | integer | The identifier of the Voicemail announcement for this user's account. |
| fm_announcement_id | integer | The identifier of the Follow Me announcement for this user's account. |
| legacy_api_key | string | Deprecated |