User Tools

Site Tools


api:pbx:phonebookgroup:list

API : PBX : Phonebook group list

Introduction

A phonebook group is a named group of phonebook contacts. Other features point at a group by its id, e.g. to route a call depending on whether the caller is in the group.

There are two kinds of groups:

  • Customer groups hold the customers shared contacts. Every user of the customer can see them. Access level MANAGER or above is required to create, rename and delete them.
  • Personal groups belong to one employee and hold that employees personal contacts. The employee manages them, and so does another employee who has the group right readPhonebook (to see them) or writePhonebook (to change them) on the employee.

A contact selects its groups through its groups property when it is created or updated. A shared contact can only be in customer groups, a personal contact only in the personal groups of its own employee.

This request returns the customer groups and/or the personal groups of an employee, sorted by name, each with the number of contacts in it.

Request

URL https://api.telecomx.dk/pbx/phonebookgroup
Method GET
Access level PERSONAL, VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller (customer groups).
ADMIN (customer groups).
Personal groups of another employee require the group right readPhonebook on that employee.
Query customer [optional] Customer to list groups for. Defaults to the users own customer. RESELLER, RESELLER_ADMIN or ADMIN only.
employee [optional] Employee whose personal groups to list. Defaults to the user self.
type [optional] Groups to return:
ALL - customer groups and the employees personal groups (default)
PERSONAL - the employees personal groups
SHARED - the customer groups.
offset [optional] Index of the first item to return, default 0, max 10000.
limit [optional] The number of items to return, default 100, min 1, max 500.

Query examples

https://api.telecomx.dk/pbx/phonebookgroup
https://api.telecomx.dk/pbx/phonebookgroup?type=SHARED
https://api.telecomx.dk/pbx/phonebookgroup?customer=1234567890ABCDEF12345678&type=SHARED
https://api.telecomx.dk/pbx/phonebookgroup?type=PERSONAL&employee=1234567890ABCDEF1234BBBB

Response

JSON object
offset Number Index of the first group returned.
limit Number Number of groups requested. The actual number of returned items may be lower.
total Number Number of groups that can be returned when offset and limit is not considered. This is to be used for paging through the data.
groups Array Array of groups, see definition below.
Phonebook group object
_id Id Unique id of the group.
customer Id Id of the customer the group belongs to.
employee Id Id of the employee owning a personal group, null for a customer group.
name String Name of the group.
notes String Notes about what the group is used for, null if none.
contacts Number Number of contacts in the group.
createdAt Date When the group was created.
updatedAt Date When the group was last changed.

Example

{
  offset: 0,
  limit: 100,
  total: 2,
  groups: [
    {
      _id: '12345678901234567890ABCD',
      customer: '12345678901234567890AAAA',
      employee: null,
      name: 'VIP',
      notes: 'Customers who go straight to the account team',
      contacts: 12,
      createdAt: '2026-10-15T08:12:44.000Z',
      updatedAt: '2026-10-15T08:12:44.000Z'
    },
    {
      ...
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
404 not_found Customer not found
422 type Type is not ALL, PERSONAL or SHARED
500 internal_error <Unspecified>
api/pbx/phonebookgroup/list.txt · Last modified: by Telecom X AI

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki