curl --location 'https://dev-api-desk.tks.co.th/api/Users/AddAgent' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
}'{
"status": {
"code": "string",
"description": "string",
"httpStatusCode": 0
},
"data": {
"userId": "string",
"agentId": 0,
"fullName": "string",
"fullNameEN": "string",
"nickName": "string",
"nickNameEN": "string",
"email": "string",
"imageUrl": "string",
"rank": {
"rankName": "string",
"rankNameEN": "string",
"imageUrl": "string"
},
"role": "string",
"functions": [
{
"functionId": 0,
"functionCode": "string",
"componentId": 0,
"name": "string",
"levels": 0,
"allowGrant": true,
"allowAdd": true,
"allowEdit": true,
"allowDelete": true,
"allowView": true,
"config": "string",
"isActive": true,
"createdDate": "2019-08-24T14:15:22.123Z",
"updatedDate": "2019-08-24T14:15:22.123Z",
"component": {
"componentId": 0,
"name": "string",
"description": "string",
"isActive": true,
"updatedDate": "2019-08-24T14:15:22.123Z",
"createdDate": "2019-08-24T14:15:22.123Z",
"functions": [
{}
]
},
"roleFunctions": [
{
"roleFunctionId": 0,
"roleId": 0,
"functionId": 0,
"createdDate": "2019-08-24T14:15:22.123Z",
"updatedDate": "2019-08-24T14:15:22.123Z",
"function": {},
"role": {
"roleId": 0,
"companyId": 0,
"roleName": "string",
"rolePriority": 0,
"agentRoles": [
{
"agentId": 0,
"roleId": 0,
"createdDate": "2019-08-24T14:15:22.123Z",
"updatedDate": "2019-08-24T14:15:22.123Z",
"agent": {
"agentId": 0,
"companyId": 0,
"agentCode": "string",
"userId": "string",
"userName": "string",
"fullName": "string",
"fullName_EN": "string",
"firstName": "string",
"firstName_EN": "string",
"lastName": "string",
"lastName_EN": "string",
"titleName": "string",
"titleName_EN": "string",
"employeeStatus": "string",
"employeeStatusName": "string",
"extensionNo": "string",
"nickName": "string",
"nickName_EN": "string",
"imageUrl": "string",
"isActive": true,
"agentRole": {},
"company": {
"companyId": 0,
"companyCode": "string",
"companyName": "string",
"companyName_EN": "string",
"defaultMailService": "string",
"agents": [
{}
],
"buSupports": [
{
"buId": 0,
"buName": "string",
"buNameEN": "string",
"isActive": true,
"companyId": 0,
"company": {},
"tickets": [
{
"activities": [],
"approvals": [],
"comments": [],
"histories": []
}
]
}
],
"contacts": [
{
"contactId": 0,
"companyId": 0,
"contactEmailAddress": "string",
"contactName": "string",
"imageUrl": "string"
}
],
"customFields": [
{
"fieldId": 0,
"companyId": 0,
"fieldName": "string",
"company": {},
"customFieldValues": [
{}
]
}
],
"customers": [
{
"customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
"email": "string",
"name": "string",
"companyId": 0,
"imageUrl": "string",
"isActive": true,
"company": {},
"teamCustomers": [
{}
]
}
],
"departments": [
{
"departmentId": 0,
"companyId": 0,
"departmentCode": "string",
"departmentName": "string",
"departmentName_EN": "string",
"departmentDefaultMailService": "string",
"company": {},
"rateConfiguration": {
"departmentId": 0,
"teamEnable": true,
"department": {}
},
"teamAgents": [
{}
],
"teamCustomers": [
{}
],
"teams": [
{
"categories": [],
"teamAgents": [],
"teamCustomers": [],
"templates": []
}
],
"templates": [
{
"inverseParentTemplate": [],
"templateControls": [],
"tickets": []
}
],
"tickets": [
{
"activities": [],
"approvals": [],
"comments": [],
"histories": []
}
]
}
],
"ranks": [
{
"rankId": 0,
"companyId": 0,
"rankName": "string",
"rankName_EN": "string",
"maxUsers": 0,
"imageUrl": "string",
"company": {},
"rankHistories": [
{}
]
}
],
"roles": [
{}
],
"subscriptionKeys": [
{
"keyId": 0,
"keyValue": "string",
"name": "string",
"description": "string",
"ownerId": 0,
"companyId": 0,
"dateCreated": "2019-08-24T14:15:22.123Z",
"dateExpired": "2019-08-24T14:15:22.123Z",
"isActive": true,
"requestsPerDay": 0,
"allowedScopes": "string",
"clientId": "string",
"lastUsedDate": "2019-08-24T14:15:22.123Z",
"createdBy": "string",
"lastModifiedDate": "2019-08-24T14:15:22.123Z",
"lastModifiedBy": "string"
}
],
"trophies": [
{
"trophyId": 0,
"companyId": 0,
"trophyName": "string",
"trophyDescription": "string",
"trophyCondition": "string",
"trophyImageUrl": "string",
"company": {},
"trophyHistories": [
{}
]
}
]
},
"rankHistories": [
{
"year": 0,
"weekNo": 0,
"agentId": 0,
"rankId": 0,
"agent": {},
"rank": {
"rankId": 0,
"companyId": 0,
"rankName": "string",
"rankName_EN": "string",
"maxUsers": 0,
"imageUrl": "string",
"company": {},
"rankHistories": [
{}
]
}
}
],
"subscriptionKeys": [
{
"keyId": 0,
"keyValue": "string",
"name": "string",
"description": "string",
"ownerId": 0,
"companyId": 0,
"dateCreated": "2019-08-24T14:15:22.123Z",
"dateExpired": "2019-08-24T14:15:22.123Z",
"isActive": true,
"requestsPerDay": 0,
"allowedScopes": "string",
"clientId": "string",
"lastUsedDate": "2019-08-24T14:15:22.123Z",
"createdBy": "string",
"lastModifiedDate": "2019-08-24T14:15:22.123Z",
"lastModifiedBy": "string"
}
],
"teamAgents": [
{
"departmentId": 0,
"teamId": 0,
"agentId": 0,
"agent": {},
"department": {},
"team": {
"teamId": 0,
"departmentId": 0,
"teamCode": "string",
"teamName": "string",
"teamName_EN": "string",
"isActive": true,
"categories": [
{}
],
"department": {},
"teamAgents": [
{}
],
"teamCustomers": [
{}
],
"templates": [
{
"inverseParentTemplate": [],
"templateControls": [],
"tickets": []
}
]
}
}
],
"trophyHistories": [
{
"earnId": 0,
"agentId": 0,
"trophyId": 0,
"dateEarned": "2019-08-24T14:15:22.123Z",
"agent": {},
"trophy": {
"trophyId": 0,
"companyId": 0,
"trophyName": "string",
"trophyDescription": "string",
"trophyCondition": "string",
"trophyImageUrl": "string",
"company": {},
"trophyHistories": [
{}
]
}
}
]
},
"role": {}
}
],
"company": {},
"roleFunctions": [
{}
]
}
}
]
}
],
"team": [
{
"teamId": 0,
"teamCode": "string",
"teamName": "string",
"teamNameEN": "string"
}
],
"department": {
"departmentId": 0,
"departmentCode": "string",
"departmentName": "string",
"departmentNameEN": "string",
"departmentDefaultMailService": "string"
},
"company": {
"companyId": 0,
"companyCode": "string",
"companyName": "string",
"companyNameEN": "string"
}
},
"success": true,
"pagination": {
"page": 0,
"pageSize": 0,
"totalItems": 0,
"totalPages": 0
}
}