Within Teamwork Desk, you can utilize webhooks to interact with your tickets.

The concept of a webhook is simple. A webhook is a HTTP callback: a HTTP POST that occurs when something happens; a simple event-notification via HTTP POST.

Available Events

Event Name
Event Code (X-Desk-Event)
Payload
Agent Created
agent.created
Agent
Agent Updated
agent.updated
Agent
Agent Deleted
agent.deleted
ID Only
Customer Created
customer.created
Customer
Customer Edited
customer.edited
Customer
Customer Deleted
customer.deleted
ID Only
Inbox Created
inbox.created
Inbox
Inbox Edited
inbox.edited
Inbox
Inbox Deleted
inbox.deleted
ID Only
Thread Edited
thread.edited
Thread
Thread Deleted
thread.deleted
ID Only
Agent Reply
ticket.agent.reply
Thread
Customer Reply
ticket.customer.reply
Thread
Ticket Created
ticket.created
Ticket
Ticket Assigned
ticket.assigned
Ticket Assigned
Ticket Unassigned
ticket.unassigned
Ticket Assigned
Ticket Note
ticket.note
Thread
Ticket Moved
ticket.moved
Ticket Moved
Ticket Merged
ticket.merged
Ticket Merged
Ticket Status
ticket.status
Ticket Status
Ticket Priority
ticket.priority
Ticket Priority
Ticket Deleted
ticket.deleted
ID Only
Ticket Tagged
ticket.tag.added
Tag
Ticket Tag Removed
ticket.tag.removed
Tag
Tag Created
tag.created
Tag
Tag Edited
tag.edited
Tag
Tag Deleted
tag.deleted
ID Only

Payloads

Below are a series of example payloads that are sent. See the Available Events table for which payload is sent for each event.

When given, eventCreatorId is the id of the agent that caused this event.



Headers

Webhooks include the following headers:

  • X-Desk-Event: The event name of the webhook, e.g ticket.created
  • X-Desk-Signature: The signature generated by Teamwork Desk using your Secret Token for you to determine if the request is genuine.
  • X-Desk-Delivery: The delivery UUID, this is listed in the Recent Deliveries section of your webhook.
  • User-Agent: The version of the webhooks service used to make this request is included in this header.


Verifying

So you can verify that the request comes from Teamwork Desk we include the X-Desk-Signature header. This header includes the HMAC-SHA256 hex encoded signature of the request which was computed using your Secret Token in your webhook settings.

To verify the request you should compute the HMAC hash and compare it against the X-Desk-Signature header, if they match then you know the request was sent from Teamwork Desk.


Responses

Responses with a status code other than 200 will be considered as a failure. Failures will be reattempted 3 times before permanent failure. After multiple permanent failures we will disable your webhook.

Reattempt #
Delay (mins)
1
1
2
5
3
10

For more information, see: Generating an API Key