Skip to main content
This guide connects Answering Agent tasks to a ticket system such as ClickUp or Zendesk. The webhook creates each ticket. PATCH /tasks/{task_id} writes ticket changes back. A nightly job with GET /tasks catches anything either side missed.

Before you start

  • Create a dedicated login for the integration, such as integrations@yourcompany.com, on one team with the admin role. Create the API key from that login. See Authenticate.
  • Set up the webhook and store its secret on your server.
  • Store ANSWERING_AGENT_API_KEY and ANSWERING_AGENT_WEBHOOK_SECRET as environment variables.
The examples use this helper:

Create a ticket from each new task

The task.created webhook carries the task in data, the same object GET /tasks/{task_id} returns. It has the title, description, status, assignee, category, priority, customer, and source.
  1. Check the X-Answering-Agent-Secret header. See Check the secret.
  2. Skip the event if you already processed its id.
  3. Respond with a 2xx status within 8 seconds. Do the rest after you respond.
  4. Create the ticket from data. Store data.id, the API task ID, on the ticket.
createTicket stands for your ticket system’s own client. Store the task’s id, and store its status and assignee?.id as the last synced values.

Write ticket changes back

When someone changes a ticket’s status or assignee, send the change with PATCH /tasks/{task_id}. The values you read are the values you send. status is open, in_progress, on_hold, or done. assigned_to takes the same ID as a task’s assignee.id. Map these to your ticket system’s statuses and users in your own config. GET /account lists up to 50 members with their id and name. Set expected_status to the status your sync last saw. If someone changed the task in the dashboard since then, the API returns 409 and changes nothing. Always send assigned_to with a status change. Without it, in_progress, on_hold, and done can assign the task to the integration login, the same as a click in the dashboard.
The task’s activity shows each change as made by the integration login. To copy a ticket comment to the task, send it to POST /tasks/{task_id}/notes as content. Only your team sees the note. Each request adds a note, so send each comment once. Tasks from forms do not take notes. Other errors to handle:
  • 422 (unprocessable) means the dashboard would refuse the same change. The error says why. If your team requires a note to mark a task done, add one with POST /tasks/{task_id}/notes before you send "status": "done".
  • 404 (not_found) on a task that belongs to a repeat conversation merged into an earlier one has an error that names the task to update instead, such as This conversation was merged into conversation-184519. Use that task.

Reconcile every night

A webhook event can be lost. For example, Answering Agent drops an event after its last retry fails, and it sends nothing while the webhook address is cleared. A nightly job fixes both. Page through every task that is not done. Create a ticket for any task you do not have. Search results leave out description, so read the full task first. Copy dashboard changes to tickets that differ.
findTicket, openTicketsNotIn, updateTicketFromTask, and saveTicket stand for your ticket system’s own client. Each page of 50 tasks is one request, and each task you read again is one more. The API allows 120 requests per minute for each person. The helper above waits and retries on 429.