Jump to: navigation, search

Contacts API

Operations

The following operations are available for the /contacts URI:

Operation Description Permissions
GET Retrieves a list of all contacts in the system. Currently this includes queues, users, as well as any "custom" contacts added via the provisioning API.
  • Contact Center Admin
  • Agent
POST Creates a new contact of "custom" type. Contact Center Admin
PUT Modifies a contact of "custom" type (other types are read-only). Contact Center Admin
DELETE Removes a contact of "custom" type. Contact Center Admin

Attributes

The following attributes are available for the contact object. Note that the presence or absence of each attribute is determined by resource type (as described in the table below). Note also that any of the attributes can be used to filter the results of the query and can be specified together in a logical "AND" operation. For instance, GET /contacts&type=User will return all users. GET /contacts?firstName=Joe&lastName=Johnson&userName=joej will return all contacts named "Joe Johnson" with the user name "joej."

Attribute Type Description Access Level Resource Type
id String The unique ID of the contact record. GET Custom, Queue, User
name String The name of this contact (for example, this could be the name of a queue or the first name/last name of a user). GET for all

PUT, POST, DELETE for contacts of type "Custom" only

Custom, Queue, User
type String

Possible values are: Custom, Queue, User

GET Custom, Queue, User
phoneNumber String The phone number at which this contact can be reached. GET for all

PUT, POST, DELETE for contacts of type "Custom" only

Custom, Queue, User
userName String The contact's user name. GET User
firstName String The contact's first name. GET User
lastName String The contact's last name. GET User
employeeId String The contact's employee ID. GET User

Example

The following creates a new "custom" contact:

POST /contacts
{
    "name":"Some Contact"
    "type":"Custom"
    "phoneNumber":"xxx-xxx-xxxx"
}

The following retrieves only "custom" contacts:

GET /contacts?type=custom
{
   contacts:[
         {
             "id":"Some unique id",
             "name":"Some Contact",
             "type":"Custom",
             "phoneNumber":"xxx-xxx-xxxx"
         }, etc
   ]
}
This page was last modified on June 10, 2013, at 09:05.

Feedback

Comment on this article:

blog comments powered by Disqus