GenericWebhooks
A generic inbound webhook ingests a webhook request scoped to an account.
JSON format
GenericWebhooks are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
event_type | string | false | true | A descriptor of the event type that will trigger the webhook, this will be used by a ZIS JobSpec to identify incoming events, in conjuction with the source_system |
id | string | true | true | The unique identifier of the webhook |
integration | string | true | true | The name of the integration that the webhook belongs to |
password | string | true | true | Credential used along with username to make a request to the created webhook path URL |
path | string | true | true | The URL for the webhook created, used for receiving HTTP requests. Includes a token that uniquely identifies this webhook. |
source_system | string | false | true | A descriptor of the system that will trigger the webhook, this will be used by a ZIS JobSpec to identify incoming events, in conjunction with the event_type |
username | string | true | true | Credential used along with password to make a request to the created webhook path URL |
uuid | string | true | true | The unique identifier of the webhook (deprecated) |
zendesk_account_id | integer | true | true | The Zendesk account id |
Ingest Incoming Webhook Requests
POST /api/services/zis/inbound_webhooks/generic/ingest/{token}
This endpoint is returned as part of the inbound webhook creation process, in the path
with the response. Ingests an incoming webhook request as an event. The ingested event can trigger a ZIS flow. The maximum recommended request payload size is 200KB.
To authorize requests, use basic authentication with the username
and password
from the Create Inbound Webhook endpoint's response.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
token | string | Path | true | The unique token to identify the webhook |
Example body
{
"body": "The smoke is very colorful.",
"subject": "My printer is on fire!"
}
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/inbound_webhooks/generic/ingest/{token} \
-u {username}:{password} \
-X POST \
-H "Content-Type: application/json" \
-d '{"subject": "My printer is on fire!", "body": "The smoke is very colorful."}'
Example response(s)
200 OK
Status 200 OK
401 Unauthorized
Status 401 Unauthorized
"Authentication failed"
Create Inbound Webhook
POST /api/services/zis/inbound_webhooks/generic/{integration}
Creates an inbound webhook that is used to receive HTTP requests.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | The name of the integration that the webhook belongs to |
Example body
{
"event_type": "ticket.NewReply",
"source_system": "slack"
}
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/inbound_webhooks/generic/{integration} \
-H "Authorization: Bearer {access_token}" \
-X POST \
-H "Content-Type: application/json" \
-d '{"source_system": "slack", "event_type": "ticket.NewReply"}'
Example response(s)
201 Created
Status 201 Created
{
"event_type": "ticket.NewReply",
"id": "01FDXQXBGQRZ3XN28WKX559PR2",
"integration": "integrationName",
"password": "$2a$10$vP2yN5pXK.8hbIwJGcXYAefQ3SXOT/xxjERPX4bhMjMsKIUG3LjVi",
"path": "/api/services/zis/inbound_webhooks/generic/ingest/OPwn17vlTjI_c8_IfmRBAcAyx_X4Hx2r5Iy95Pje64-s",
"source_system": "slack",
"username": "SkkCyESWf8ASuzKW",
"uuid": "d339ba7f-4a42-40fc-ae75-0e93315d3d0f",
"zendesk_account_id": 1
}
401 Unauthorized
Status 401 Unauthorized
"Authentication failed"
Show Inbound Webhook By UUID
GET /api/services/zis/inbound_webhooks/generic/{integration}/{uuid}
Returns webhook details by UUID
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | The name of the integration that the webhook belongs to |
uuid | string | Path | true | The webhook's identifier |
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/inbound_webhooks/generic/{integration}/{uuid} \
-H "Authorization: Bearer {access_token}"
Example response(s)
200 OK
Status 200 OK
{
"event_type": "ticket.NewReply",
"id": "01FDXQXBGQRZ3XN28WKX559PR2",
"integration": "integrationName",
"password": "$2a$10$vP2yN5pXK.8hbIwJGcXYAefQ3SXOT/xxjERPX4bhMjMsKIUG3LjVi",
"path": "/api/services/zis/inbound_webhooks/generic/ingest/OPwn17vlTjI_c8_IfmRBAcAyx_X4Hx2r5Iy95Pje64-s",
"source_system": "slack",
"username": "SkkCyESWf8ASuzKW",
"uuid": "d339ba7f-4a42-40fc-ae75-0e93315d3d0f",
"zendesk_account_id": 1
}
404 Not Found
Status 404 Not Found
{
"errors": [
{
"code": "1110",
"detail": "Not Found",
"status": "404"
}
]
}