URL: v3/api/admin/agent

Method: POST

Description : Creates or Updates a agent/admin

Parameters:

Parameter Type Optional/Required Description
email string Required Agent’s email
user_name string Required Agent’s user_name
first_name string Required Agent’s first_name
last_name string Optional Agents last_name
type_ids array Optional Ticket type ids
ext integer Optional Agent’s extension
phone_number integer Optional Agent’s phone_number
country_code integer Optional Agent’s country_code
mobile integer Optional Agent’s mobile
location_id string Optional Agent’s location id
active integer Required Agent’s account activation status
role string Required Agent’s role either admin or agent
department_ids array Optional Agent’s department ids
agent_tzone_id integer Required Agent’s time zone id
permission_ids array Optional Permission ids
team_ids array Optional Agent’s team ids
agent_sign string Optional Agent’s signature

Success Response :

{

"success":true,

"message":"Agent saved successfully"

}

Or

{

"success":true,

"message":"Admin saved successfully"

}

Error Response :

{

"success":false,

"message":{

“user_name”:"The user name has already been taken."

}

}

Or

{

"success":false,

"message":{

“email”:"The email has already been taken."

}

}

Or

{

"success":false,

"message":{

“Mobile”:"The mobile has already been taken."

}

}

 

Tagged: