Webhooks
Create webhook
POST
https://SUB_DOMAIN.hugery.com/api/external/v1/webhooks
Request Body
Name | Type | Description |
---|---|---|
events | array | Possible values are: |
url | string |
{
"data": {
"createdAt": 1588858859,
"enabled": true,
"events": [
"messageCreated",
"caseCreated",
"caseAssigned",
"caseClosed",
"caseUnassigned"
],
"id": "c68a92cb-482a-4624-a0a4-1c1099a7909b",
"updatedAt": 1588858859,
"url": "https://webhook.site/77699264-c524-4db7-a9bf-a982a8247123"
},
"status": 201
}
Update webhook
PUT
https://SUB_DOMAIN.hugery.com/api/external/v1/webhooks/:id
Path Parameters
Name | Type | Description |
---|---|---|
id | string | Webhook id |
Request Body
Name | Type | Description |
---|---|---|
events | array | Possible values are: |
url | string |
{
"status": 200,
"data": {
"id": "c68a92cb-482a-4624-a0a4-1c1099a7909b",
"events": [
"messageCreated",
"caseCreated",
"caseAssigned",
"caseClosed",
"caseUnassigned",
"endUserUpdated",
"endUserCreated"
],
"url": "https://webhook.site/08095541-d137-4f40-8dcd-b92ff79a5123",
"enabled": true,
"createdAt": 1588858859,
"updatedAt": 1588859219
}
}
Delete webhook
DELETE
https://SUB_DOMAIN.hugery.com/api/external/v1/webhooks/:id
Path Parameters
Name | Type | Description |
---|---|---|
string |
true
Webhook events
Event: messageCreated
{
"data": {
"aid": 584,
"cases": {
"aid": 52,
"id": "ce30af5f-9941-46e1-88ce-432a82486a5a",
"status": "new",
"updatedAt": 1588864833
},
"createdAt": 1588864832,
"endUser": {
"avatar": "https://static.hugery.com/200x200/bucket-blinger-helpdesk/1588864831223239/99497cc9dd3b7488a6c2a79132cb786a/image.jpg",
"avatarStub": false,
"id": "772aab4f-17df-4dc2-a3c9-2700440f758b",
"name": "Boris",
"nameColor": "#472679",
"updatedAt": 1588864832
},
"id": "30864389-9557-4e96-af71-582fd81982d3",
"messageContents": [
{
"content": "hello",
"file": null,
"id": "af30265f-0e97-4c65-a8db-d0910906ff01",
"status": "delivered",
"type": "text",
"updatedAt": 1588864833
}
],
"preview": {
"content": "123",
"type": "text"
},
"teamMember": null,
"updatedAt": 1588864832
},
"event": "messageCreated"
}
Event: caseCreated
{
"data": {
"aid": 52,
"assignedTeamMember": null,
"closedAt": null,
"conversation": {
"channel": {
"id": "3686476d-9f8d-4967-abb0-c76aa641ac7f",
"label": "Telegram",
"title": "test123bot",
"type": "telegrambot",
"updatedAt": 1587376492
},
"id": "b7bd53ff-311f-4616-81fd-1c5922be3e94"
},
"createdAt": 1588864832,
"endUser": {
"aid": 233,
"avatar": "https://static.hugery.com/200x200/bucket-blinger-helpdesk/1588864831223239/99497cc9dd3b7488a6c2a79132cb786a/image.jpg",
"avatarStub": false,
"channelFields": {
"id": "2681123321",
"language": "en",
"name": "Boris",
"user_name": "username"
},
"createdAt": 1587477016,
"extraFields": [],
"id": "772aab4f-17df-4dc2-a3c9-2700440f758b",
"lastActivityAt": 1588864832,
"name": "Boris",
"nameColor": "#472679",
"updatedAt": 1588864832
},
"id": "ce30af5f-9941-46e1-88ce-432a82486a5a",
"lastMessage": {
"id": "30864389-9557-4e96-af71-582fd81982d3",
"preview": {
"content": "Hello!",
"type": "text"
},
"teamMember": null,
"updatedAt": 1588864832
},
"status": "new",
"team": null,
"updatedAt": 1588864833
},
"event": "caseCreated"
}
Event: caseAssigned
{
"data": {
"aid": 48,
"assignedTeamMember": {
"avatar": "https://static.hugery.com/200x200/bucket-blinger-helpdesk/1586644129928170/4a460cb03ad82baf2dcf079acd549853/image.png",
"id": "d9033c86-a86e-474e-85a3-ccacc21ebc1d",
"name": "Ivan Ivanov",
"nameColor": "#9c791c",
"updatedAt": 1586644134
},
"closedAt": null,
"conversation": {
"channel": {
"id": "1220e87f-2d03-458b-8de1-7b71687d1839",
"label": "WhatsApp",
"title": "Hugery",
"type": "whatsapp",
"updatedAt": 1588259318
},
"id": "bfa7196b-fe1b-4050-adb0-61a5f20d8ebc"
},
"createdAt": 1588261504,
"endUser": {
"aid": 464,
"avatar": null,
"avatarStub": true,
"channelFields": {
"channel": "246dacc7-04dd-4f2f-9001-f56614c27abb",
"conversation": "346b51d7-fa29-4f87-bc61-28b175d93fb6",
"id": "375291231212",
"name": "Boris",
"phoneNumber": "375291231212"
},
"createdAt": 1588261504,
"extraFields": {
"phoneNumber": "375291722482"
},
"id": "5e897527-5023-4332-955e-de3dcff7bf7c",
"lastActivityAt": 1588261504,
"name": "375291722488",
"nameColor": "#27388b",
"updatedAt": 1588261504
},
"id": "56a5febc-4e3e-4d4c-8cbb-50b39691a097",
"lastMessage": {
"id": "c6c5b8e2-35a0-4c73-9c9a-61e1b07716a2",
"preview": {
"content": "Hello!",
"type": "text"
},
"teamMember": null,
"updatedAt": 1588864440
},
"status": "open",
"team": {
"color": "#000",
"id": "a7a76a50-8a4c-4a29-8799-4aeb0164f15f",
"title": "Default",
"updatedAt": 1586213041
},
"updatedAt": 1588864440
},
"event": "caseAssigned"
}
Event: caseUnassigned
{
"data": {
"aid": 52,
"assignedTeamMember": null,
"closedAt": null,
"conversation": {
"channel": {
"id": "3686476d-9f8d-4967-abb0-c76aa641ac7f",
"label": "Telegram",
"title": "mytestbot",
"type": "telegrambot",
"updatedAt": 1587376492
},
"id": "b7bd53ff-311f-4616-81fd-1c5922be3e94"
},
"createdAt": 1588864832,
"endUser": {
"aid": 233,
"avatar": "https://static.hugery.com/200x200/bucket/1588864831223239/99497cc9dd3b7488a6c2a79132cb786a/image.jpg",
"avatarStub": false,
"channelFields": {
"id": "2681123421",
"language": "en",
"name": "Boris",
"user_name": "username"
},
"createdAt": 1587477016,
"extraFields": [],
"id": "772aab4f-17df-4dc2-a3c9-2700440f758b",
"lastActivityAt": 1588864832,
"name": "Boris",
"nameColor": "#472679",
"updatedAt": 1588864832
},
"id": "ce30af5f-9941-46e1-88ce-432a82486a5a",
"lastMessage": {
"id": "63406fbf-dbb9-440c-8db8-fe76946dfc1a",
"preview": {
"content": "Hello!",
"type": "text"
},
"teamMember": null,
"updatedAt": 1588865157
},
"status": "open",
"team": null,
"updatedAt": 1588865286
},
"event": "caseUnassigned"
}
Event: caseClosed
{
"data": {
"aid": 48,
"assignedTeamMember": {
"avatar": "https://static.hugery.com/200x200/bucket/1586644129928170/4a460cb03ad82baf2dcf079acd549853/image.png",
"id": "d9033c86-a86e-474e-85a3-ccacc21ebc1d",
"name": "Ivan Ivanov",
"nameColor": "#9c791c",
"updatedAt": 1586644134
},
"closedAt": 1588865467,
"conversation": {
"channel": {
"id": "1220e87f-2d03-458b-8de1-7b71687d1839",
"label": "WhatsApp",
"title": "Hugery",
"type": "whatsapp",
"updatedAt": 1588259318
},
"id": "bfa7196b-fe1b-4050-adb0-61a5f20d8ebc"
},
"createdAt": 1588261504,
"endUser": {
"aid": 464,
"avatar": null,
"avatarStub": true,
"channelFields": {
"channel": "246dacc7-04dd-4f2f-9001-f56614c27abb",
"conversation": "346b51d7-fa29-4f87-bc61-28b175d93fb6",
"id": "375291231212",
"name": "Boris",
"phoneNumber": "375291231212"
},
"createdAt": 1588261504,
"extraFields": {
"phoneNumber": "375291231212"
},
"id": "5e897527-5023-4332-955e-de3dcff7bf7c",
"lastActivityAt": 1588261504,
"name": "Boris",
"nameColor": "#27388b",
"updatedAt": 1588261504
},
"id": "56a5febc-4e3e-4d4c-8cbb-50b39691a097",
"lastMessage": {
"id": "c6c5b8e2-35a0-4c73-9c9a-61e1b07716a2",
"preview": {
"content": "Hello!",
"type": "text"
},
"teamMember": null,
"updatedAt": 1588864440
},
"status": "closed",
"team": {
"color": "#000",
"id": "a7a76a50-8a4c-4a29-8799-4aeb0164f15f",
"title": "Default",
"updatedAt": 1586213041
},
"updatedAt": 1588864440
},
"event": "caseClosed"
}
Event: endUserCreated
{
"data": {
"aid": 589,
"avatar": "https://static.hugery.com/200x200/bucket/1588865651178356/97a49ee6688b28f1e9523748532cb8fe/image.jpg",
"avatarStub": false,
"channelFields": {
"id": "268171177",
"language": "en",
"name": "Boris",
"user_name": "username"
},
"channelLabel": "Telegram",
"channelType": "telegrambot",
"createdAt": 1588865649,
"extraFields": [],
"id": "b763cdf9-23d5-4cda-aba3-0e861392055e",
"lastActivityAt": 1588865652,
"name": "Boris",
"nameColor": "#541c83",
"qualification": "lead",
"updatedAt": 1588865652
},
"event": "endUserCreated"
}
Event: endUserUpdated
{
"data": {
"aid": 233,
"avatar": "https://static.hugery.com/200x200/bucket-blinger-helpdesk/1588864831223239/99497cc9dd3b7488a6c2a79132cb786a/image.jpg",
"avatarStub": false,
"channelFields": {
"id": "268112332",
"language": "en",
"name": "Boris",
"user_name": "username"
},
"channelLabel": "Telegram",
"channelType": "telegrambot",
"createdAt": 1587477016,
"extraFields": [],
"id": "772aab4f-17df-4dc2-a3c9-2700440f758b",
"lastActivityAt": 1588864832,
"name": "Boris",
"nameColor": "#472679",
"qualification": "lead",
"updatedAt": 1588864832
},
"event": "endUserUpdated"
}
Last updated