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/85/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": 1758, "company": "value", "created_at": "value", "dialler_source_id": 5056, "email": "value", "ext": "value", "first_name": "value", "global": true, "group_name": "value", "internal": true, "last_call_at": "2022-04-28 18:24:23", "last_name": "value", "mobile": "value", "mobile_1": "value", "mobile_2": "value", "nb_call_attempts": 1857, "next_call_at": "2022-04-28 18:31:23", "notes": "value", "outcome_id": 9478, "rel_user_id": 4955, "tel": "value", "tel_1": "value", "tel_2": "value", "type": 2, "user_id": 5880 }, "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": 5249, "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": 5985, "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/18 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": 5600, "name": "value" }, "links": {} }
PATCH
/queuegroups/{id} Updates existing QueueGroup resource
Parameters
Endpoint URL:
{id} integerQueueGroup identifier
Example Request
PATCH /v1.1/voipstudio/queuegroups/10 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": 2170, "name": "value" }, "links": {} }
DELETE
/queuegroups/{id} Deletes existing QueueGroups resources
Parameters
Endpoint URL:
{id} integerQueueGroup identifier
Example Request
DELETE /v1.1/voipstudio/queuegroups/32 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/38 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": 8468, "active": true, "created_at": "value", "customer": 5592, "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": 435, "location_id": 419, "groups": "abcd" }, { "id": 5516, "location_id": 419, "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": 9200, "active": true, "created_at": "value", "customer": 412, "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} Returns User resource for given Id
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/30 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": 8038, "active": true, "created_at": "value", "customer": 4876, "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} Deletes existing User resource
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
DELETE /v1.1/voipstudio/users/37 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": 4.13, "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/11/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": 9148, "active": true, "created_at": "value", "customer": 7921, "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}/cdrs Returns collection of Cdr resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/18/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": 5895, "active": true, "created_at": "value", "customer": 1984, "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/61/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": 8449, "active": true, "created_at": "value", "customer": 5869, "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}/calls Returns collection of Call resources for given user
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
GET /v1.1/voipstudio/users/13/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": 4951, "active": true, "created_at": "value", "customer": 6535, "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
/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": 9864, "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": 977, "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/11 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": 8495, "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/91 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": 4140, "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/96 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": 911, "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": 3626, "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/11 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": 9076, "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/44 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": 2710, "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/21 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/5/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": 5583, "active": true, "created_at": "value", "customer": 7943, "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}/audio Reset existing User audio resource
Parameters
Endpoint URL:
{id} integerUser identifier
Example Request
DELETE /v1.1/voipstudio/users/36/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/29/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": 9556, "active": true, "created_at": "value", "customer": 7521, "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/40/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": 9096, "active": true, "created_at": "value", "customer": 5150, "email": "value", "first_name": "value", "is_initial": true, "is_root": true, "last_name": "value", "roles": "value", "two_factor_auth": 0, "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 |