Webhook
How to view and edit your Webhook
Request Overview
Actions | Returns | Description |
---|---|---|
|
| Get webhook |
|
| Update webhook |
|
| Get latest webhook logs |
Fields
Webhook Object
Field | Type | Required | Specifics |
---|---|---|---|
|
| The Webhook version which is used | |
|
| Array of Request Headers that will send with every webhook request | |
|
| Indicates if the Webhook is active | |
|
| If your Webhook endpoint returns an error, this counter will be increased until the webhooks gets automatically disabled | |
|
| Your Webhook endpoint URL | |
|
| The secret we use to create a validation hash of the payload. You can use this hash to verify that the received payload has not been tempered with | |
|
| Array of all triggers available | |
|
| Object of all trigger events available for tickets Webhooks Events | |
|
| Object of all trigger events available for customers | |
|
| Object of all trigger events available for tags |
Requests
Get Webhook Data
GET
/api/v1/webhook Returns your webhook
GET /api/v1/webhook HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
200
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"data": {
"version": "V1",
"headers": [
{
"key": "X-MY-CUSTOM-HEADER",
"value": "my custom test value"
}
],
"enabled": true,
"failed_count": 0,
"url": "https://my-webhook-url.com/test",
"secret": "NnhB3ga34IOiqO9rOPcR",
"trigger": {
"ticket": {
"created": true,
"assigned": true,
"deleted": true,
"status_updated": true,
"tags_updated": false,
"customer_message_created": true,
"agent_message_created": false,
"note_created": false
},
"customer": {
"created": false,
"updated": true,
"deleted": false
},
"tag": {
"created": true,
"updated": true,
"deleted": false
}
}
}
}
Update Multiple Webhook Attributes
POST
/api/v1/webhook Update certain attributes of your Webhook
POST /api/v1/webhook HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
{
"webhooks": {
"enabled": false,
"url": "https://my-webhook-url.com/new_url",
"trigger": {
"ticket": {
"created": false,
},
"customer": {
"updated": false,
"deleted": true
}
}
}
}
201
Response
HTTP/1.1 201 OK
Content-Type: application/json
...
{
"data": {
"version": "V1",
"headers": [
{
"key": "X-MY-CUSTOM-HEADER",
"value": "my custom test value"
}
],
"enabled": false,
"failed_count": 0,
"url": "https://my-webhook-url.com/new_url",
"secret": "NnhB3ga34IOiqO9rOPcR",
"trigger": {
"ticket": {
"created": false,
"assigned": true,
"deleted": true,
"status_updated": true,
"tags_updated": false,
"customer_message_created": true,
"agent_message_created": false,
"note_created": false
},
"customer": {
"created": false,
"updated": false,
"deleted": true
},
"tag": {
"created": true,
"updated": true,
"deleted": false
}
}
}
}
Get Latest Error Logs
GET
/api/v1/webhook/logs Returns your latest error logs
GET /api/v1/webhook/logs HTTP/1.1
Authorization: Bearer {{token}}
Hs-Client-Id: {{hs_client_id}}
Host: api.helpspace.com
Content-Type: application/json; charset=utf-8
200
Response
HTTP/1.1 200 OK
Content-Type: application/json
...
{
"data": [
{
"description": "Webhook has been disabled due to many failed requests.",
"created_at": "2022-04-01T15:12:43.000000Z",
"properties": {
"status_code": 404,
"webhook_url": "https://my-webhook-url.com/new_url",
"response_body": "Client error: POST https://my-webhook-url.com/new_url
resulted in a 404 Not Found response:..."
}
},
{
"description": "Webhook request failed.",
"created_at": "2022-04-01T15:12:43.000000Z",
"properties": {
"status_code": 404,
"webhook_url": "https://my-webhook-url.com/new_url",
"response_body": "Client error: POST https://my-webhook-url.com/new_url
resulted in a `404 Not Found` response:..."
}
},
...
]
}