Agents

Posted on Mar 04, 2016 16:47

With this API call you can manage your Agents.

 

JSON Format

 

Each Agent is represented as JSON object with the following properties:

Name Type Description
 Id  number  The agent's id
 Email  string  The agent's email
 Name  string  The agent's name
 FirstName  string  The agent's first name
 LastName  string  The agent's last name
 CreationDate  string  The agent's creation date
 JobTitle  string  The agent's job title
 Groups  array  The groups this agent is a member of

 

 

Get All Agents

 

GET /api/agents

Get all agents for your account.

 

Example response

[

  {

    "Id": 48,

    "Email": "kate@mywebsite.com",

    "Name": "Kate",

    "FirstName": "Kate",

    "LastName": null,

    "CreationDate": "2012-12-09T19:48:47.827Z",

    "JobTitle": "Support Agent",

    "Groups": [

        5,

        6

    ]

  },

  {

    "Id": 60,

    "Email": "jason@mywebsite.com",

    "Name": "Jason",

    "FirstName": "Jason",

    "LastName": "Bourne",

    "CreationDate": "2013-05-26T22:15:10.337Z",

    "JobTitle": null,

    "Groups": []

  },

]

 

 

Get Agent by Id

 

GET /api/agents/{agent_id}

Get an agent from your account by specified id.

 

Example response

{

    "Id": 60,

    "Email": "jason@mywebsite.com",

    "Name": "Jason",

    "FirstName": "Jason",

    "LastName": "Bourne",

    "CreationDate": "2013-05-26T22:15:10.337Z",

    "JobTitle": null,

    "Groups": []

}

 

 

Create Agent

 

POST /api/agents

Create an agent for your account.

 

Example response

{

    "Id": 123,

    "Email": "tom@mywebsite.com",

    "Name": "Tom",

    "FirstName": null,

    "LastName": null,

    "CreationDate": "2016-03-05T19:55:53.3782514Z",

    "JobTitle": null,

    "Groups": null

}

 

 

 Update Agent

 

PUT /api/agents/{agent_id}

Update an agent from your account by specified id.

 

Example response

{

    "Id": 123,

    "Email": "tom@mywebsite.com",

    "Name": "Tom",

    "FirstName": "Tom",

    "LastName": null,

    "CreationDate": "2016-03-05T19:55:53.3782514Z",

    "JobTitle": "Support Agent",

    "Groups": null

}

 

 

Delete Agent

 

DELETE /api/agents/{agent_id}

Delete an agent from your account by specified id.