Note: This version of Teamwork Desk is no longer supported. 
Check out our help docs for the new version of Teamwork Desk here.

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: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST.

Available Events

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

Payloads

Below are example payloads sent, see the Available Events table for which payload is sent for which events.

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






















Examples


<?php define('SECERT_TOKEN', 'bea1ffc4e56d5056b6e0c7ee24b47b5');
$body=f ile_get_contents('php://input');

$sig=h ash_hmac('sha256', $body, SECERT_TOKEN, false);

if ($sig !==$ _SERVER[ 'HTTP_X_DESK_SIGNATURE']) {
  error_log('Bad signature');
  http_response_code( 400);
  exit;

}

error_log('Verified Teamwork Desk Webhook Event: '.$_SERVER['HTTP_X_DESK_EVENT']);

error_log($body);

For more information, see: Generating an API Key