Team Members

get
List team members

https://SUB_DOMAIN.hugery.com/api/external/v1/team-members
Request
Response
Request
Query Parameters
view
required
string
Posible values are: "enabled", "pending", "deleted".
Response
200: OK
{
"cursor": {
"next": "YToyOntzOjQ6InNvcnQiO2E6Mzp7aTowO2Q6MDtpOjE7aToxNTg2MjEzMDQyMDAwO2k6MjtzOjM2OiJkOTAzM2M4Ni1hODZlLTQ3NGUtODVhMy1jY2FjYzIxZWJjMWQiO31zOjk6ImRpcmVjdGlvbiI7YjoxO30=",
"prev": "YToyOntzOjQ6InNvcnQiO2E6Mzp7aTowO2Q6MDtpOjE7aToxNTg4NjcyNDg3MDAwO2k6MjtzOjM2OiJmNDUyOGQ4Yy05NGI3LTRkYmEtYWUwNS0zM2NiY2NkYzAxMjQiO31zOjk6ImRpcmVjdGlvbiI7YjowO30="
},
"data": [
{
"aid": 1,
"avatar": "https://static.hugery.com/200x200/bucket/1586644129928170/4a460cb03ad82baf2dcf079acd549853/image.png",
"createdAt": 1586213042,
"deletedAt": null,
"email": "email@email.com",
"id": "d9033c86-a86e-474e-85a3-ccacc21ebc1d",
"name": "Ivan Ivanov",
"nameColor": "#9c791c",
"pin": "",
"pinConfirmed": false,
"role": {
"id": "ffa7fce7-655a-4280-998a-5a5e542a359d",
"title": "Super admin",
"updatedAt": 1586213040
},
"status": "enabled",
"teams": [
{
"color": "#000",
"id": "a7a76a50-8a4c-4a29-8799-4aeb0164f15f",
"title": "Default",
"updatedAt": 1586213041
}
],
"updatedAt": 1586644134
}
],
"status": 200
}

get
Show team member

https://SUB_DOMAIN.hugery.com/api/external/v1/team-members/:id
Request
Response
Request
Path Parameters
id
required
string
Team member id
Response
200: OK
{
"data": {
"aid": 1,
"avatar": "https://static.hugery.com/200x200/bucket/1586644129928170/4a460cb03ad82baf2dcf079acd549853/image.png",
"createdAt": 1586213042,
"deletedAt": null,
"email": "email@email.com",
"extraFields": [],
"id": "d9033c86-a86e-474e-85a3-ccacc21ebc1d",
"lastActivityAt": 1588856429,
"name": "Ivan Ivanov",
"nameColor": "#9c791c",
"pin": 0,
"pinConfirmed": false,
"role": {
"id": "ffa7fce7-655a-4280-998a-5a5e542a359d",
"title": "Super admin",
"updatedAt": 1586213040
},
"status": "enabled",
"teams": [
{
"color": "#000",
"id": "a7a76a50-8a4c-4a29-8799-4aeb0164f15f",
"title": "Default",
"updatedAt": 1586213041
}
],
"updatedAt": 1586644134
},
"status": 200
}

post
Create team member

https://SUB_DOMAIN.hugery.com/api/external/v1/team-members
Request
Response
Request
Body Parameters
email
required
string
name
required
string
password
required
string
role
required
string
Role id. See roles endpoint.
teams
required
string
Array of teams.
Response
200: OK
{
"data": {
"aid": 17,
"avatar": null,
"createdAt": 1588858334,
"email": "email@email.com",
"id": "705685f9-8e55-48e5-9492-ed7463abfd91",
"lastActivityAt": 1588858334,
"name": "Ivan Ivanov",
"nameColor": "#472679",
"role": {
"id": "977ec80c-ac1f-4a18-8418-609825732f38",
"title": "Agent",
"updatedAt": 1586213040
},
"status": "enabled",
"teams": [
{
"color": "#000",
"id": "a7a76a50-8a4c-4a29-8799-4aeb0164f15f",
"title": "Default",
"updatedAt": 1586213041
}
],
"updatedAt": 1588858334
},
"status": 201
}

delete
Delete team member

https://SUB_DOMAIN.hugery.com/api/external/v1/team-members/:id
Request
Response
Request
Path Parameters
id
required
string
Response
200: OK
true

post
Restore team member

https://SUB_DOMAIN.hugery.com/api/external/v1/team-members/:id/restore
Request
Response
Request
Path Parameters
id
required
string
Team member id
Response
200: OK
true