Agent

You need the Manage Agent & Agent Roles permission to manage agents.

Agents
- Agents Manage
GET global/agents
GET global/agents/{id}
POST global/agents
POST Global/agents/{id}:changePassword
POST Global/agents/{id}:unlock
PUT global/agents/{id}
DELETE global/agents/{id}
Model
Agent JSON Format

Agent is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the agent.
email string Agent login email.
displayName string Different Agents can have the same Display Name. If not display name given, will be set by both first name and last name.
firstName string First name of the agent.
lastName string Last name of the agent.
isAdmin bool Whether the agent is an administrator or not.
isActive bool Whether the agent is active or not.
phone string Phone number of the agent.
title string Title of the agent.
bio string Bio info of the agent. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZone string Time zone of the agent. Value includes all Time Zone Option identifiers, if not selected, will use the time zone selected in site profile.
datetimeFormat string Date & Time format selected by agents to display on the site. Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
createdTime datetime Time when the agent was created.
isLocked bool Whether the account is locked or not.
lockedTime datetime Time when the agent account got locked.
ifCustomizeAvatar bool Whether the agent avatar is customized or not.
customizeAvatar image Customized avatar of agent.
systemAvatarId guid Id of system avatar.
avatar string Avatar of the agent.
permissionIds array The list of permission identifiers.
departmentIds array Id of the selected agents for this department.
roleIds array The selected agents for this role.If not offered, will use role identifier of "AllAgents" as default.
Endpoint
Get the list of Agents

GET global/agents

Parameters:
Name Type In Required Description
keywords string query no Filter by keywords in agent display name and email.
include string query no Allowed values are "department", "role", "systemAvatar", "shift", "permission".
Response:

An array of   Agent

Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

[{"id":"64bb87e4-6940-4d2c-a6e4-176d52b8e9b8","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"]}]
Get a single Agent

GET global/agents/{id}

Parameters:
Name Type In Required Description
include string query no Allowed values are "department", "role", "systemAvatar", "shift", "permission".
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"64bb87e4-6940-4d2c-a6e4-176d52b8e9b8","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"]}
Create a new Agent

POST global/agents

Parameters:
Name Type In Required Description
email string body yes Agent login email.
password string body yes Login password of the agent.
displayName string body yes Different Agents can have the same Display Name. If not display name given, will be set by both first name and last name.
firstName string body yes First name of the agent.
lastName string body yes Last name of the agent.
isAdmin bool body no Whether the agent is an administrator or not.
isActive bool body no Whether the agent is active or not.
phone string body no Phone number of the agent.
title string body no Title of the agent.
bio string body no Bio info of the agent. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZone string body yes Time zone of the agent. Value includes all Time Zone Option identifiers, if not selected, will use the time zone selected in site profile.
datetimeFormat string body yes Date & Time format selected by agents to display on the site. Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
createdTime datetime body no Time when the agent was created.
isLocked bool body no Whether the account is locked or not.
lockedTime datetime body no Time when the agent account got locked.
ifCustomizeAvatar bool body no Whether the agent avatar is customized or not.
customizeAvatar image body no Customized avatar of agent.
systemAvatarId guid body no Id of system avatar.
avatar string body no Avatar of the agent.
permissionIds array body no The list of permission identifiers.
departmentIds array body no Id of the selected agents for this department.
roleIds array body no The selected agents for this role.If not offered, will use role identifier of "AllAgents" as default.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"email":"andy@comm100.com","password":"abc1234.","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b"}'

Response:

 HTTP/1.1 201 Created

{"id":"64bb87e4-6940-4d2c-a6e4-176d52b8e9b8","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"]}
Change the agent's password

POST Global/agents/{id}:changePassword

Parameters:

Name Type In Required Description
password string body yes New password of the agent.
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents/edd568c2-9e9f-416c-b98b-17fb03c1ee52:changePassword \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"password":"Aa5857dksc"}'

Response:

 HTTP/1.1 200 OK

Unlock the agent

POST Global/agents/{id}:unlock

Parameters:

No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents/edd568c2-9e9f-416c-b98b-17fb03c1ee52:unlock \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \

Response:

 HTTP/1.1 200 OK

Update the Agent

PUT global/agents/{id}

Parameters:
Name Type In Required Description
email string body yes Agent login email.
displayName string body yes Different Agents can have the same Display Name. If not display name given, will be set by both first name and last name.
firstName string body yes First name of the agent.
lastName string body yes Last name of the agent.
isAdmin bool body no Whether the agent is an administrator or not.
isActive bool body no Whether the agent is active or not.
phone string body no Phone number of the agent.
title string body no Title of the agent.
bio string body no Bio info of the agent. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content.
timeZone string body yes Time zone of the agent. Value includes all Time Zone Option identifiers, if not selected, will use the time zone selected in site profile.
datetimeFormat string body yes Date & Time format selected by agents to display on the site. Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
createdTime datetime body no Time when the agent was created.
isLocked bool body no Whether the account is locked or not.
lockedTime datetime body no Time when the agent account got locked.
ifCustomizeAvatar bool body no Whether the agent avatar is customized or not.
customizeAvatar image body no Customized avatar of agent.
systemAvatarId guid body no Id of system avatar.
avatar string body no Avatar of the agent.
permissionIds array body no The list of permission identifiers.
departmentIds array body no Id of the selected agents for this department.
roleIds array body no The selected agents for this role.If not offered, will use role identifier of "AllAgents" as default.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b"}'

Response:

 HTTP/1.1 200 OK

{"id":"64bb87e4-6940-4d2c-a6e4-176d52b8e9b8","email":"andy@comm100.com","displayName":"Andy Liao","firstName":"Andy","lastName":"Liao","isAdmin":true,"isActive":true,"phone":"13712345678","title":"Manager","bio":"Hello, I am Andy","timeZone":"Pacific Standard Time","datetimeFormat":"YYYY/MM/DD HH:mm:ss","createdTime":"2020-12-25T06:01:00.913Z","isLocked":true,"lockedTime":"2020-12-25T06:01:00.93Z","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"]}
Remove the Agent

DELETE global/agents/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/global/agents/64bb87e4-6940-4d2c-a6e4-176d52b8e9b8 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content