1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - PUT Requests
Open navigation

PUT/contact

With the PUT/contact request you can create a new personal TeleConsole contact or update an existing one.


Parameters


There are no parameters in the header. All parameters go in the body in JSON Raw format.


All parameters are optional and can be left blank, but obviously you should at least provide a first name and a phone number.


ParameterTypeOperation
id
integer
Use a blank or 0 value to create a new contact.

Use an existing ID (obtained from the GET/contact request) to update an existing contact.
fname
stringThe first name of the contact.
lnamestring

The last name of the contact. 

organization
stringThe organization (company) of the contact.
email
string
The email address of the contact.
number
stringThe phone number (landline) of the contact.
mobile
stringThe mobile phone number of the contact.
fax
stringThe fax number of the contact.
website
stringThe website of the contact.
image
stringAn ASCII string that represents an image for the contact encoded as a base64 format.

If you leave this blank the default image will be used for the contact. The default image is - telebroad.com\/assets\/images\/default_avatar.png.
public
integerUse a  value of 1 to indicate the contact is public. A public contact is made available to other users in the company on their own list of contacts.

Use a value of 0 to indicate the contact is non-public.

Examples


Creating a New Contact


To create a new public contact use the following syntax:


HTTPS method: PUT


Header


webserv.telebroad.com/api/teleconsole/rest/contact


Body


{"id": "", "fname":"Chris", "lname":"Kerr", "organization":"", "email": "c.kerr@assist-care.org","number":"16032219005", "mobile":"16038704032","fax":"","website":"", "image":"", "public": "1"}


Response:


The response returns the ID of the new contact -


error: null,

 result: 77054 

}



Updating an Existing Contact


To update the fax number and organization of the contact you created in the previous example (ID 77054) and make it non-public use the following syntax:


Body


{"id": "77054", "fname":"Chris", "lname":"Kerr", "organization":"Assist Care", "email": "c.kerr@assist-care.org","number":"16032219005", "mobile":"16038704032","fax":"16032219007","website":"", "image":"", "public": "0"}


Response:


A "null" error with the same ID indicates a successful update. 


error: null,

 result: 77054 

}