ClickUp Webhooks & Events
Overview
ClickUp webhooks send HTTP POST notifications when resources change. Register webhooks via API, subscribe to specific events, and receive payloads with history_items showing what changed.
Webhook Endpoints
POST /api/v2/team/{team_id}/webhook Create webhook
GET /api/v2/team/{team_id}/webhook Get webhooks
PUT /api/v2/webhook/{webhook_id} Update webhook
DELETE /api/v2/webhook/{webhook_id} Delete webhook
Create a Webhook
async function createWebhook(teamId: string, endpoint: string, events: string[]) {
return clickupRequest(`/team/${teamId}/webhook`, {
method: 'POST',
body: JSON.stringify({
endpoint, // Your HTTPS URL
events, // Array of event names
space_id: null, // Optional: limit to specific space
folder_id: null, // Optional: limit to specific folder
list_id: null, // Optional: limit to specific list
task_id: null, // Optional: limit to specific task
}),
});
}
// Subscribe to task and list events
const webhook = await createWebhook('1234567', 'https://myapp.com/webhooks/clickup', [
'taskCreated',
'taskUpdated',
'taskDeleted',
'taskStatusUpdated',
'taskAssigneeUpdated',
'taskDueDateUpdated',
'taskCommentPosted',
'taskTimeTrackedUpdated',
'listCreated',
'listUpdated',
'listDeleted',
]);
// Response:
// { "id": "wh_abc123", "webhook": { "id": "...", "endpoint": "...", "events": [...] } }
Available Events
| Category |
Events |
| Task |
taskCreated, taskUpdated, taskDeleted, taskStatusUpdated, taskAssigneeUpdated, taskDueDateUpdated, taskTagUpdated, taskMoved, taskCommentPosted, taskCommentUpdated, taskTimeTrackedUpdated, taskTimeEstimateUpdated, taskPriorityUpdated |
| List |
listCreated, listUpdated, listDeleted |
| Folder |
folderCreated, folderUpdated, folderDeleted |
| Space |
spaceCreated, spaceUpdated, spaceDeleted |
| Goal |
goalCreated, goalUpdated, goalDeleted, keyResultCreated, keyResultUpdated, keyResultDeleted |
Webhook Payload Format
{
"event": "taskUpdated",
"webhook_id": "wh_abc123",
"task_id": "abc123",
"history_items": [
{
"id": "hist_001",
"type": 1,
"date": "1695000000000",
"field": "status",
"parent_id": "abc123",
"data": {},
"source": null,
"user": { "id": 183, "username": "john", "email": "john@example.com" },
"before": { "status": "to do", "color": "#d3d3d3", "type": "open" },
"after": { "status": "in progress", "color": "#4194f6", "type": "custom" }
}
]
}
Webhook Handler (Express)
import express from 'express';
const app = express();
app.use(express.json());
app.post('/webhooks/clickup', async (req, res) => {
const { event, webhook_id, task_id, history_items } = req.body;
// Immediately acknowledge (ClickUp expects 200 within 30s)
res.status(200).json({ received: true });
// Process asynchronously
try {
await processClickUpEvent(event, task_id, history_items);
} catch (err) {
console.error(`Failed to process ${event} for task ${task_id}:`, err);
}
});
async function processClickUpEvent(
event: string,
taskId: string,
historyItems: any[]
) {
switch (event) {
case 'taskCreated':
console.log(`New task: ${taskId}`);
break;
case 'taskStatusUpdated': {
const change = historyItems[0];
console.log(`Task ${taskId}: ${change.before.status} -> ${change.after.status}`);
// Trigger downstream actions (e.g., notify Slack, update external system)
break;
}
case 'taskCommentPosted':
console.log(`New comment on task ${taskId}`);
break;
case 'taskTimeTrackedUpdated':
console.log(`Time tracked updated on task ${taskId}`);
break;
default:
console.log(`Unhandled event: ${event}`);
}
}
Idempotency (Prevent Duplicate Processing)
const processedEvents = new Map<string, number>();
function isDuplicate(webhookId: string, historyItemId: string): boolean {
const key = `${webhookId}:${historyItemId}`;
if (processedEvents.has(key)) return true;
processedEvents.set(key, Date.now());
// Clean old entries every 1000 events
if (processedEvents.size > 10000) {
const cutoff = Date.now() - 3600000; // 1 hour
for (const [k, v] of processedEvents) {
if (v < cutoff) processedEvents.delete(k);
}
}
return false;
}
List and Manage Webhooks
# List all webhooks for a workspace
TEAM_ID="1234567"
curl -s "https://api.clickup.com/api/v2/team/${TEAM_ID}/webhook" \
-H "Authorization: $CLICKUP_API_TOKEN" | jq '.webhooks[] | {id, endpoint, events}'
# Delete a webhook
curl -s -X DELETE "https://api.clickup.com/api/v2/webhook/WH_ID" \
-H "Authorization: $CLICKUP_API_TOKEN"
Error Handling
| Issue |
Cause |
Solution |
| Webhook not firing |
Endpoint not HTTPS |
Webhooks require HTTPS URLs |
| Duplicate events |
No idempotency |
Track history_item IDs |
| Timeout (no 200) |
Slow processing |
Respond 200 immediately, process async |
| Webhook auto-disabled |
Repeated failures |
ClickUp disables after many 5xx responses |
Resources
Next Steps
For performance optimization, see clickup-performance-tuning.
Source: jeremylongshore/claude-code-plugins-plus-skills → plugins/saas-packs/clickup-pack/skills/clickup-webhooks-events/SKILL.md
1---2name: clickup-webhooks-events3description: "'Create and manage ClickUp webhooks for real-time event notifications. Use when setting up webhook listeners for task/list/space events, implementing two-way sync, or handling ClickUp event payloads. Trigger: \"clickup webhook\", \"clickup events\", \"clickup notifications\", \"clickup real-time\", \"clickup event listener\", \"clickup webhook create\". '"4allowed-tools: "Read, Write, Edit, Bash(curl:*)"5category: backend-and-data6source_repo: jeremylongshore/claude-code-plugins-plus-skills7source_path: "plugins/saas-packs/clickup-pack/skills/clickup-webhooks-events/SKILL.md"8source_url: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/HEAD/plugins/saas-packs/clickup-pack/skills/clickup-webhooks-events/SKILL.md9metadata:10 source: https://skillmd.com/skills/thedixitjain/clickup-webhooks-events11---1213# ClickUp Webhooks & Events1415## Overview1617ClickUp webhooks send HTTP POST notifications when resources change. Register webhooks via API, subscribe to specific events, and receive payloads with `history_items` showing what changed.1819## Webhook Endpoints2021```22POST /api/v2/team/{team_id}/webhook Create webhook23GET /api/v2/team/{team_id}/webhook Get webhooks24PUT /api/v2/webhook/{webhook_id} Update webhook25DELETE /api/v2/webhook/{webhook_id} Delete webhook26```2728## Create a Webhook2930```typescript31async function createWebhook(teamId: string, endpoint: string, events: string[]) {32 return clickupRequest(`/team/${teamId}/webhook`, {33 method: 'POST',34 body: JSON.stringify({35 endpoint, // Your HTTPS URL36 events, // Array of event names37 space_id: null, // Optional: limit to specific space38 folder_id: null, // Optional: limit to specific folder39 list_id: null, // Optional: limit to specific list40 task_id: null, // Optional: limit to specific task41 }),42 });43}4445// Subscribe to task and list events46const webhook = await createWebhook('1234567', 'https://myapp.com/webhooks/clickup', [47 'taskCreated',48 'taskUpdated',49 'taskDeleted',50 'taskStatusUpdated',51 'taskAssigneeUpdated',52 'taskDueDateUpdated',53 'taskCommentPosted',54 'taskTimeTrackedUpdated',55 'listCreated',56 'listUpdated',57 'listDeleted',58]);5960// Response:61// { "id": "wh_abc123", "webhook": { "id": "...", "endpoint": "...", "events": [...] } }62```6364## Available Events6566| Category | Events |67|----------|--------|68| **Task** | `taskCreated`, `taskUpdated`, `taskDeleted`, `taskStatusUpdated`, `taskAssigneeUpdated`, `taskDueDateUpdated`, `taskTagUpdated`, `taskMoved`, `taskCommentPosted`, `taskCommentUpdated`, `taskTimeTrackedUpdated`, `taskTimeEstimateUpdated`, `taskPriorityUpdated` |69| **List** | `listCreated`, `listUpdated`, `listDeleted` |70| **Folder** | `folderCreated`, `folderUpdated`, `folderDeleted` |71| **Space** | `spaceCreated`, `spaceUpdated`, `spaceDeleted` |72| **Goal** | `goalCreated`, `goalUpdated`, `goalDeleted`, `keyResultCreated`, `keyResultUpdated`, `keyResultDeleted` |7374## Webhook Payload Format7576```json77{78 "event": "taskUpdated",79 "webhook_id": "wh_abc123",80 "task_id": "abc123",81 "history_items": [82 {83 "id": "hist_001",84 "type": 1,85 "date": "1695000000000",86 "field": "status",87 "parent_id": "abc123",88 "data": {},89 "source": null,90 "user": { "id": 183, "username": "john", "email": "john@example.com" },91 "before": { "status": "to do", "color": "#d3d3d3", "type": "open" },92 "after": { "status": "in progress", "color": "#4194f6", "type": "custom" }93 }94 ]95}96```9798## Webhook Handler (Express)99100```typescript101import express from 'express';102103const app = express();104app.use(express.json());105106app.post('/webhooks/clickup', async (req, res) => {107 const { event, webhook_id, task_id, history_items } = req.body;108109 // Immediately acknowledge (ClickUp expects 200 within 30s)110 res.status(200).json({ received: true });111112 // Process asynchronously113 try {114 await processClickUpEvent(event, task_id, history_items);115 } catch (err) {116 console.error(`Failed to process ${event} for task ${task_id}:`, err);117 }118});119120async function processClickUpEvent(121 event: string,122 taskId: string,123 historyItems: any[]124) {125 switch (event) {126 case 'taskCreated':127 console.log(`New task: ${taskId}`);128 break;129 case 'taskStatusUpdated': {130 const change = historyItems[0];131 console.log(`Task ${taskId}: ${change.before.status} -> ${change.after.status}`);132 // Trigger downstream actions (e.g., notify Slack, update external system)133 break;134 }135 case 'taskCommentPosted':136 console.log(`New comment on task ${taskId}`);137 break;138 case 'taskTimeTrackedUpdated':139 console.log(`Time tracked updated on task ${taskId}`);140 break;141 default:142 console.log(`Unhandled event: ${event}`);143 }144}145```146147## Idempotency (Prevent Duplicate Processing)148149```typescript150const processedEvents = new Map<string, number>();151152function isDuplicate(webhookId: string, historyItemId: string): boolean {153 const key = `${webhookId}:${historyItemId}`;154 if (processedEvents.has(key)) return true;155 processedEvents.set(key, Date.now());156157 // Clean old entries every 1000 events158 if (processedEvents.size > 10000) {159 const cutoff = Date.now() - 3600000; // 1 hour160 for (const [k, v] of processedEvents) {161 if (v < cutoff) processedEvents.delete(k);162 }163 }164 return false;165}166```167168## List and Manage Webhooks169170```bash171# List all webhooks for a workspace172TEAM_ID="1234567"173curl -s "https://api.clickup.com/api/v2/team/${TEAM_ID}/webhook" \174 -H "Authorization: $CLICKUP_API_TOKEN" | jq '.webhooks[] | {id, endpoint, events}'175176# Delete a webhook177curl -s -X DELETE "https://api.clickup.com/api/v2/webhook/WH_ID" \178 -H "Authorization: $CLICKUP_API_TOKEN"179```180181## Error Handling182183| Issue | Cause | Solution |184|-------|-------|----------|185| Webhook not firing | Endpoint not HTTPS | Webhooks require HTTPS URLs |186| Duplicate events | No idempotency | Track history_item IDs |187| Timeout (no 200) | Slow processing | Respond 200 immediately, process async |188| Webhook auto-disabled | Repeated failures | ClickUp disables after many 5xx responses |189190## Resources191192- [ClickUp Webhooks Guide](https://developer.clickup.com/docs/webhooks)193- [Task Webhook Payloads](https://developer.clickup.com/docs/webhooktaskpayloads)194- [List Webhook Payloads](https://developer.clickup.com/docs/webhooklistpayloads)195- [Create Webhook API](https://clickup.com/api/clickupreference/operation/CreateWebhook/)196197## Next Steps198199For performance optimization, see `clickup-performance-tuning`.200201---202203**Source:** [`jeremylongshore/claude-code-plugins-plus-skills`](https://github.com/jeremylongshore/claude-code-plugins-plus-skills) → `plugins/saas-packs/clickup-pack/skills/clickup-webhooks-events/SKILL.md`