1. Telebroad | Support Center
  2. Solution home
  3. Legacy API Documentation
  4. REST API - GET Requests
Open navigation

GET/people (Legacy)

  Articles in this support section discuss Telebroad's legacy APIs. To learn about the current version of Telebroad APIs, which offer additional authentication options and support for advanced features, please go to https://developers.telebroad.com/.



Function and Response Fields


The GET/people method returns a list of contacts in the user's phone book. 


The response returns either company (corporate) or all (including personal) contacts, depending on the type parameter.


The response returns  the following fields:


  • ID - the particular ID of each contact in the phonebook.
  • title -  the title of the contact. When creating a contact in the phonebook, "Mr." is the default choice.
  • fname - the first name of the contact.
  • lname - the last name of the contact.
  • organization - the name of the organization of the contact.
  • username - the username of the contact's Telebroad account (usually this is identical to the contact's email).
  • email - the contact's email address.
  • pbx_line - the PBX line to dial the contact. This is like a short phone number that works only from inside the PBX system.
  • chat_channel - a specific chat address for the contact.
  • extension - the contact's extension.
  • home - the contact's home phone number.
  • work - the contact's work phone number.
  • mobile - the contact's mobile phone number.
  • fax - the contact's fax number.
  • website - the contact's website information.
  • photo - if a company contact has uploaded a photo of himself, this field will contain the path to the photo. 
  • status - a value of 1 indicates the (corporate) contact is available.
  • status_msg - the availability message of the (corporate) contact set for himself in the Teleconsole. 
  • contactType - either "corporate" or "personal".
  • public - a value of 1 means the contact is public. A value of 0 means it is not.
  • owned - a value of 1 means the contact is owned by the user. It was created by him and can be edited by him. A value of 0 means the contact was created and is owned by someone else.


Parameters


All parameters go in the header.


Parameter
Type
Operation
type
string
"corporate" value will return only the user's corporate contacts.

An empty value will return both personal and corporate contacts.
limit
integer
Specify the number of records to be returned by the request.
offset
integer
Specify the number of records to be returned by the request.

Example


To get the list of company contacts for the requesting user with a limit of two records, use this syntax:


HTTPS method: GET


webserv.telebroad.com/api/teleconsole/rest/people?type=corporate&limit=2


Response:


{

    "error":null,

        "result":[

            {"id":-13691,

            "title":"Mr.",

            "fname":"Kathy",

            "lname":"Watts",

            "organization":"Telebroad",

            "username":"KathyAWatts@inbound.plus",

            "email":"KathyAWatts@inbound.plus",

            "pbx_line":"1113835",

            "chat_channel":"private_chat_

            3cae23ffe5affee5e632112665901637",

            "extension":"1113835",

            "home":"",

            "work":"16466991356",

            "mobile":"",

            "fax":"",

            "website":"",

            "photo":"https:\/\/telebroad.com\/cdn\

            /avatar\/0f\/da\

            /c5c5ecc77f32aa531007a17f9f3c04efd205.png","

            "status":"1",

            "status_msg":"Available",

            "contactType":"corporate",

            "public":1,

            "owned":0

        },

            {"id":"6942",

            "title":"",

            "fname":"Andy",

            "lname":"Thompson",

            "organization":"",

            "username":null,

            "email":"",

            "pbx_line":"",

            "chat_channel":null,

            "extension":"",

            "home":"",

            "work":"917-888-4142",

            "mobile":"",

            "fax":"",

            "website":"",

            "photo":"",

            "status":1,

            "status_msg":"",

            "contactType":"corporate",

            "public":0,

            "owned":1

        }

        ]

}