[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F6EH7RNJF24J1504BQR18Z":3,"skill-same:01M6F6EH7RNJF24J1504BQR18Z":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6F6EH7RNJF24J1504BQR18Z","documenso-webhooks-events",null,"Implement Documenso webhook configuration and event handling.\nUse when setting up webhook endpoints, handling document events,\nor implementing real-time notifications for document signing.\nTrigger with phrases like \"documenso webhook\", \"documenso events\",\n\"document completed webhook\", \"signing notification\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdocumenso-pack\u002Fskills\u002Fdocumenso-webhooks-events\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"documenso","documenso webhooks events","events","webhooks","document","when","for","implementing","with","event","trigger","io","webhook","time","implement","endpoints","up","use","edit","write","read","curl","Bash","real-time","notifications","2026-11-10 10:12:30",false,"---\nname: documenso-webhooks-events\ndescription: |\n  Implement Documenso webhook configuration and event handling.\n  Use when setting up webhook endpoints, handling document events,\n  or implementing real-time notifications for document signing.\n  Trigger with phrases like \"documenso webhook\", \"documenso events\",\n  \"document completed webhook\", \"signing notification\".\nallowed-tools: Read, Write, Edit, Bash(curl:*), Bash(ngrok:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Documenso Webhooks & Events\n\n## Overview\nConfigure and handle Documenso webhooks for real-time document signing notifications.\n\n## Prerequisites\n- Documenso team account (webhooks require teams)\n- HTTPS endpoint for webhook reception\n- Understanding of webhook security\n\n## Supported Events\n\n| Event | Trigger | Description |\n|-------|---------|-------------|\n| `document.created` | Document created | New document added to system |\n| `document.sent` | Document sent | Document sent to recipients |\n| `document.opened` | Document opened | Recipient opened document |\n| `document.signed` | Recipient signed | One recipient completed signing |\n| `document.completed` | All signed | All recipients have signed |\n| `document.rejected` | Document rejected | Recipient rejected document |\n| `document.cancelled` | Document cancelled | Document was cancelled |\n\n## Webhook Setup\n\n### Step 1: Create Webhook in Dashboard\n\n1. Log into Documenso dashboard\n2. Click avatar -> \"Team settings\"\n3. Navigate to \"Webhooks\" tab\n4. Click \"Create Webhook\"\n5. Configure:\n   - **URL**: Your HTTPS endpoint\n   - **Events**: Select events to subscribe\n   - **Secret**: Optional but recommended\n\n### Step 2: Implement Webhook Endpoint\n\n```typescript\nimport express from \"express\";\nimport crypto from \"crypto\";\n\nconst app = express();\n\n\u002F\u002F IMPORTANT: Use raw body parser for signature verification\napp.use(\"\u002Fwebhooks\u002Fdocumenso\", express.raw({ type: \"application\u002Fjson\" }));\n\ninterface DocumensoWebhookPayload {\n  event:\n    | \"document.created\"\n    | \"document.sent\"\n    | \"document.opened\"\n    | \"document.signed\"\n    | \"document.completed\"\n    | \"document.rejected\"\n    | \"document.cancelled\";\n  payload: {\n    id: string;\n    title: string;\n    status: string;\n    createdAt: string;\n    updatedAt: string;\n    documentDataId: string;\n    userId: string;\n    teamId?: string;\n    recipients: Array\u003C{\n      id: string;\n      email: string;\n      name: string;\n      role: string;\n      signingStatus: string;\n      signedAt?: string;\n    }>;\n  };\n  createdAt: string;\n  webhookEndpoint: string;\n}\n\napp.post(\"\u002Fwebhooks\u002Fdocumenso\", async (req, res) => {\n  \u002F\u002F Step 1: Verify webhook secret\n  const receivedSecret = req.headers[\"x-documenso-secret\"] as string;\n  const expectedSecret = process.env.DOCUMENSO_WEBHOOK_SECRET;\n\n  if (expectedSecret && receivedSecret !== expectedSecret) {\n    console.warn(\"Invalid webhook secret\");\n    return res.status(401).json({ error: \"Invalid signature\" });\n  }\n\n  \u002F\u002F Step 2: Parse payload\n  let payload: DocumensoWebhookPayload;\n  try {\n    payload = JSON.parse(req.body.toString());\n  } catch (error) {\n    console.error(\"Invalid JSON payload\");\n    return res.status(400).json({ error: \"Invalid JSON\" });\n  }\n\n  \u002F\u002F Step 3: Log event\n  console.log(`Webhook received: ${payload.event}`);\n  console.log(`Document: ${payload.payload.id} - ${payload.payload.title}`);\n\n  \u002F\u002F Step 4: Handle event\n  try {\n    await handleWebhookEvent(payload);\n    res.status(200).json({ received: true });\n  } catch (error) {\n    console.error(\"Webhook handling error:\", error);\n    res.status(500).json({ error: \"Internal error\" });\n  }\n});\n\nasync function handleWebhookEvent(\n  webhook: DocumensoWebhookPayload\n): Promise\u003Cvoid> {\n  const { event, payload } = webhook;\n\n  switch (event) {\n    case \"document.created\":\n      await onDocumentCreated(payload);\n      break;\n    case \"document.sent\":\n      await onDocumentSent(payload);\n      break;\n    case \"document.opened\":\n      await onDocumentOpened(payload);\n      break;\n    case \"document.signed\":\n      await onDocumentSigned(payload);\n      break;\n    case \"document.completed\":\n      await onDocumentCompleted(payload);\n      break;\n    case \"document.rejected\":\n      await onDocumentRejected(payload);\n      break;\n    case \"document.cancelled\":\n      await onDocumentCancelled(payload);\n      break;\n    default:\n      console.log(`Unhandled event: ${event}`);\n  }\n}\n```\n\n### Step 3: Event Handlers\n\n```typescript\nasync function onDocumentCreated(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document created: ${doc.title}`);\n\n  \u002F\u002F Track in your system\n  await db.documents.create({\n    externalId: doc.id,\n    title: doc.title,\n    status: \"created\",\n    createdAt: new Date(doc.createdAt),\n  });\n}\n\nasync function onDocumentSent(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document sent: ${doc.title}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"sent\", sentAt: new Date() },\n  });\n\n  \u002F\u002F Notify internal users\n  await notifications.send({\n    channel: \"slack\",\n    message: `Document \"${doc.title}\" sent to ${doc.recipients.length} recipients`,\n  });\n}\n\nasync function onDocumentOpened(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  \u002F\u002F Find who opened it\n  const opener = doc.recipients.find(\n    (r) => r.signingStatus === \"NOT_SIGNED\" \u002F\u002F They opened but haven't signed\n  );\n\n  console.log(`Document opened by: ${opener?.email}`);\n\n  \u002F\u002F Track for analytics\n  await analytics.track(\"document_opened\", {\n    documentId: doc.id,\n    recipientEmail: opener?.email,\n  });\n}\n\nasync function onDocumentSigned(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  \u002F\u002F Find who signed\n  const signer = doc.recipients.find((r) => r.signingStatus === \"SIGNED\");\n\n  console.log(`Document signed by: ${signer?.email}`);\n\n  \u002F\u002F Update tracking\n  await db.signatures.create({\n    documentId: doc.id,\n    recipientEmail: signer?.email,\n    signedAt: signer?.signedAt ? new Date(signer.signedAt) : new Date(),\n  });\n\n  \u002F\u002F Check if all have signed\n  const allSigned = doc.recipients.every(\n    (r) => r.role === \"CC\" || r.signingStatus === \"SIGNED\"\n  );\n\n  if (allSigned) {\n    console.log(\"All recipients have signed!\");\n  }\n}\n\nasync function onDocumentCompleted(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document completed: ${doc.title}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"completed\", completedAt: new Date() },\n  });\n\n  \u002F\u002F Download signed document\n  const client = getDocumensoClient();\n  const signedDoc = await client.documents.downloadV0({\n    documentId: doc.id,\n  });\n\n  \u002F\u002F Store signed copy\n  await storage.upload(`signed\u002F${doc.id}.pdf`, signedDoc);\n\n  \u002F\u002F Trigger downstream processes\n  await workflows.trigger(\"document_completed\", {\n    documentId: doc.id,\n    title: doc.title,\n  });\n}\n\nasync function onDocumentRejected(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  const rejecter = doc.recipients.find((r) => r.signingStatus === \"REJECTED\");\n\n  console.log(`Document rejected by: ${rejecter?.email}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"rejected\", rejectedBy: rejecter?.email },\n  });\n\n  \u002F\u002F Alert team\n  await notifications.send({\n    channel: \"slack\",\n    priority: \"high\",\n    message: `Document \"${doc.title}\" rejected by ${rejecter?.email}`,\n  });\n}\n\nasync function onDocumentCancelled(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document cancelled: ${doc.title}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"cancelled\", cancelledAt: new Date() },\n  });\n}\n```\n\n### Step 4: Idempotency\n\n```typescript\n\u002F\u002F Prevent duplicate processing\nconst processedWebhooks = new Set\u003Cstring>();\n\nasync function handleWebhookIdempotent(\n  webhook: DocumensoWebhookPayload\n): Promise\u003Cboolean> {\n  \u002F\u002F Create unique key from event + document + timestamp\n  const key = `${webhook.event}:${webhook.payload.id}:${webhook.createdAt}`;\n\n  \u002F\u002F Check if already processed\n  if (processedWebhooks.has(key)) {\n    console.log(`Duplicate webhook ignored: ${key}`);\n    return false;\n  }\n\n  \u002F\u002F Mark as processed\n  processedWebhooks.add(key);\n\n  \u002F\u002F Cleanup old entries (keep last 10000)\n  if (processedWebhooks.size > 10000) {\n    const oldest = processedWebhooks.values().next().value;\n    processedWebhooks.delete(oldest);\n  }\n\n  \u002F\u002F Process webhook\n  await handleWebhookEvent(webhook);\n  return true;\n}\n\n\u002F\u002F For production, use Redis or database\nimport Redis from \"ioredis\";\n\nconst redis = new Redis(process.env.REDIS_URL);\n\nasync function handleWebhookIdempotentRedis(\n  webhook: DocumensoWebhookPayload\n): Promise\u003Cboolean> {\n  const key = `webhook:${webhook.event}:${webhook.payload.id}:${webhook.createdAt}`;\n\n  \u002F\u002F Try to set key with 7 day expiry\n  const result = await redis.set(key, \"1\", \"EX\", 604800, \"NX\");\n\n  if (!result) {\n    console.log(`Duplicate webhook: ${key}`);\n    return false;\n  }\n\n  await handleWebhookEvent(webhook);\n  return true;\n}\n```\n\n## Local Development\n\n```bash\n# Start ngrok tunnel\nngrok http 3000\n\n# Copy the HTTPS URL (e.g., https:\u002F\u002Fabc123.ngrok.io)\n# Configure this URL in Documenso webhook settings\n# Your endpoint: https:\u002F\u002Fabc123.ngrok.io\u002Fwebhooks\u002Fdocumenso\n```\n\n## Testing Webhooks\n\n```bash\n# Test webhook endpoint locally\ncurl -X POST http:\u002F\u002Flocalhost:3000\u002Fwebhooks\u002Fdocumenso \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-Documenso-Secret: your-secret\" \\\n  -d '{\n    \"event\": \"document.completed\",\n    \"payload\": {\n      \"id\": \"doc_test123\",\n      \"title\": \"Test Document\",\n      \"status\": \"COMPLETED\",\n      \"createdAt\": \"2024-01-01T00:00:00Z\",\n      \"updatedAt\": \"2024-01-01T01:00:00Z\",\n      \"recipients\": [\n        {\n          \"id\": \"rec_123\",\n          \"email\": \"signer@example.com\",\n          \"name\": \"Test Signer\",\n          \"role\": \"SIGNER\",\n          \"signingStatus\": \"SIGNED\"\n        }\n      ]\n    },\n    \"createdAt\": \"2024-01-01T01:00:00Z\",\n    \"webhookEndpoint\": \"https:\u002F\u002Fyourapp.com\u002Fwebhooks\u002Fdocumenso\"\n  }'\n```\n\n## Output\n- Webhook endpoint configured\n- All events handled\n- Idempotency implemented\n- Local testing ready\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| 401 Unauthorized | Wrong secret | Check webhook secret |\n| Webhook not received | URL not HTTPS | Use HTTPS endpoint |\n| Duplicate processing | No idempotency | Add deduplication |\n| Timeout | Slow handler | Use async queue |\n\n## Resources\n- [Documenso Webhooks](https:\u002F\u002Fdocs.documenso.com\u002Fdevelopers\u002Fwebhooks)\n- [ngrok Documentation](https:\u002F\u002Fngrok.com\u002Fdocs)\n- [Webhook Best Practices](https:\u002F\u002Fwebhooks.fyi\u002F)\n\n## Next Steps\nFor performance optimization, see `documenso-performance-tuning`.\n","# Documenso Webhooks & Events\n\n## Overview\nConfigure and handle Documenso webhooks for real-time document signing notifications.\n\n## Prerequisites\n- Documenso team account (webhooks require teams)\n- HTTPS endpoint for webhook reception\n- Understanding of webhook security\n\n## Supported Events\n\n| Event | Trigger | Description |\n|-------|---------|-------------|\n| `document.created` | Document created | New document added to system |\n| `document.sent` | Document sent | Document sent to recipients |\n| `document.opened` | Document opened | Recipient opened document |\n| `document.signed` | Recipient signed | One recipient completed signing |\n| `document.completed` | All signed | All recipients have signed |\n| `document.rejected` | Document rejected | Recipient rejected document |\n| `document.cancelled` | Document cancelled | Document was cancelled |\n\n## Webhook Setup\n\n### Step 1: Create Webhook in Dashboard\n\n1. Log into Documenso dashboard\n2. Click avatar -> \"Team settings\"\n3. Navigate to \"Webhooks\" tab\n4. Click \"Create Webhook\"\n5. Configure:\n   - **URL**: Your HTTPS endpoint\n   - **Events**: Select events to subscribe\n   - **Secret**: Optional but recommended\n\n### Step 2: Implement Webhook Endpoint\n\n```typescript\nimport express from \"express\";\nimport crypto from \"crypto\";\n\nconst app = express();\n\n\u002F\u002F IMPORTANT: Use raw body parser for signature verification\napp.use(\"\u002Fwebhooks\u002Fdocumenso\", express.raw({ type: \"application\u002Fjson\" }));\n\ninterface DocumensoWebhookPayload {\n  event:\n    | \"document.created\"\n    | \"document.sent\"\n    | \"document.opened\"\n    | \"document.signed\"\n    | \"document.completed\"\n    | \"document.rejected\"\n    | \"document.cancelled\";\n  payload: {\n    id: string;\n    title: string;\n    status: string;\n    createdAt: string;\n    updatedAt: string;\n    documentDataId: string;\n    userId: string;\n    teamId?: string;\n    recipients: Array\u003C{\n      id: string;\n      email: string;\n      name: string;\n      role: string;\n      signingStatus: string;\n      signedAt?: string;\n    }>;\n  };\n  createdAt: string;\n  webhookEndpoint: string;\n}\n\napp.post(\"\u002Fwebhooks\u002Fdocumenso\", async (req, res) => {\n  \u002F\u002F Step 1: Verify webhook secret\n  const receivedSecret = req.headers[\"x-documenso-secret\"] as string;\n  const expectedSecret = process.env.DOCUMENSO_WEBHOOK_SECRET;\n\n  if (expectedSecret && receivedSecret !== expectedSecret) {\n    console.warn(\"Invalid webhook secret\");\n    return res.status(401).json({ error: \"Invalid signature\" });\n  }\n\n  \u002F\u002F Step 2: Parse payload\n  let payload: DocumensoWebhookPayload;\n  try {\n    payload = JSON.parse(req.body.toString());\n  } catch (error) {\n    console.error(\"Invalid JSON payload\");\n    return res.status(400).json({ error: \"Invalid JSON\" });\n  }\n\n  \u002F\u002F Step 3: Log event\n  console.log(`Webhook received: ${payload.event}`);\n  console.log(`Document: ${payload.payload.id} - ${payload.payload.title}`);\n\n  \u002F\u002F Step 4: Handle event\n  try {\n    await handleWebhookEvent(payload);\n    res.status(200).json({ received: true });\n  } catch (error) {\n    console.error(\"Webhook handling error:\", error);\n    res.status(500).json({ error: \"Internal error\" });\n  }\n});\n\nasync function handleWebhookEvent(\n  webhook: DocumensoWebhookPayload\n): Promise\u003Cvoid> {\n  const { event, payload } = webhook;\n\n  switch (event) {\n    case \"document.created\":\n      await onDocumentCreated(payload);\n      break;\n    case \"document.sent\":\n      await onDocumentSent(payload);\n      break;\n    case \"document.opened\":\n      await onDocumentOpened(payload);\n      break;\n    case \"document.signed\":\n      await onDocumentSigned(payload);\n      break;\n    case \"document.completed\":\n      await onDocumentCompleted(payload);\n      break;\n    case \"document.rejected\":\n      await onDocumentRejected(payload);\n      break;\n    case \"document.cancelled\":\n      await onDocumentCancelled(payload);\n      break;\n    default:\n      console.log(`Unhandled event: ${event}`);\n  }\n}\n```\n\n### Step 3: Event Handlers\n\n```typescript\nasync function onDocumentCreated(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document created: ${doc.title}`);\n\n  \u002F\u002F Track in your system\n  await db.documents.create({\n    externalId: doc.id,\n    title: doc.title,\n    status: \"created\",\n    createdAt: new Date(doc.createdAt),\n  });\n}\n\nasync function onDocumentSent(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document sent: ${doc.title}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"sent\", sentAt: new Date() },\n  });\n\n  \u002F\u002F Notify internal users\n  await notifications.send({\n    channel: \"slack\",\n    message: `Document \"${doc.title}\" sent to ${doc.recipients.length} recipients`,\n  });\n}\n\nasync function onDocumentOpened(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  \u002F\u002F Find who opened it\n  const opener = doc.recipients.find(\n    (r) => r.signingStatus === \"NOT_SIGNED\" \u002F\u002F They opened but haven't signed\n  );\n\n  console.log(`Document opened by: ${opener?.email}`);\n\n  \u002F\u002F Track for analytics\n  await analytics.track(\"document_opened\", {\n    documentId: doc.id,\n    recipientEmail: opener?.email,\n  });\n}\n\nasync function onDocumentSigned(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  \u002F\u002F Find who signed\n  const signer = doc.recipients.find((r) => r.signingStatus === \"SIGNED\");\n\n  console.log(`Document signed by: ${signer?.email}`);\n\n  \u002F\u002F Update tracking\n  await db.signatures.create({\n    documentId: doc.id,\n    recipientEmail: signer?.email,\n    signedAt: signer?.signedAt ? new Date(signer.signedAt) : new Date(),\n  });\n\n  \u002F\u002F Check if all have signed\n  const allSigned = doc.recipients.every(\n    (r) => r.role === \"CC\" || r.signingStatus === \"SIGNED\"\n  );\n\n  if (allSigned) {\n    console.log(\"All recipients have signed!\");\n  }\n}\n\nasync function onDocumentCompleted(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document completed: ${doc.title}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"completed\", completedAt: new Date() },\n  });\n\n  \u002F\u002F Download signed document\n  const client = getDocumensoClient();\n  const signedDoc = await client.documents.downloadV0({\n    documentId: doc.id,\n  });\n\n  \u002F\u002F Store signed copy\n  await storage.upload(`signed\u002F${doc.id}.pdf`, signedDoc);\n\n  \u002F\u002F Trigger downstream processes\n  await workflows.trigger(\"document_completed\", {\n    documentId: doc.id,\n    title: doc.title,\n  });\n}\n\nasync function onDocumentRejected(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  const rejecter = doc.recipients.find((r) => r.signingStatus === \"REJECTED\");\n\n  console.log(`Document rejected by: ${rejecter?.email}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"rejected\", rejectedBy: rejecter?.email },\n  });\n\n  \u002F\u002F Alert team\n  await notifications.send({\n    channel: \"slack\",\n    priority: \"high\",\n    message: `Document \"${doc.title}\" rejected by ${rejecter?.email}`,\n  });\n}\n\nasync function onDocumentCancelled(\n  doc: DocumensoWebhookPayload[\"payload\"]\n): Promise\u003Cvoid> {\n  console.log(`Document cancelled: ${doc.title}`);\n\n  \u002F\u002F Update status\n  await db.documents.update({\n    where: { externalId: doc.id },\n    data: { status: \"cancelled\", cancelledAt: new Date() },\n  });\n}\n```\n\n### Step 4: Idempotency\n\n```typescript\n\u002F\u002F Prevent duplicate processing\nconst processedWebhooks = new Set\u003Cstring>();\n\nasync function handleWebhookIdempotent(\n  webhook: DocumensoWebhookPayload\n): Promise\u003Cboolean> {\n  \u002F\u002F Create unique key from event + document + timestamp\n  const key = `${webhook.event}:${webhook.payload.id}:${webhook.createdAt}`;\n\n  \u002F\u002F Check if already processed\n  if (processedWebhooks.has(key)) {\n    console.log(`Duplicate webhook ignored: ${key}`);\n    return false;\n  }\n\n  \u002F\u002F Mark as processed\n  processedWebhooks.add(key);\n\n  \u002F\u002F Cleanup old entries (keep last 10000)\n  if (processedWebhooks.size > 10000) {\n    const oldest = processedWebhooks.values().next().value;\n    processedWebhooks.delete(oldest);\n  }\n\n  \u002F\u002F Process webhook\n  await handleWebhookEvent(webhook);\n  return true;\n}\n\n\u002F\u002F For production, use Redis or database\nimport Redis from \"ioredis\";\n\nconst redis = new Redis(process.env.REDIS_URL);\n\nasync function handleWebhookIdempotentRedis(\n  webhook: DocumensoWebhookPayload\n): Promise\u003Cboolean> {\n  const key = `webhook:${webhook.event}:${webhook.payload.id}:${webhook.createdAt}`;\n\n  \u002F\u002F Try to set key with 7 day expiry\n  const result = await redis.set(key, \"1\", \"EX\", 604800, \"NX\");\n\n  if (!result) {\n    console.log(`Duplicate webhook: ${key}`);\n    return false;\n  }\n\n  await handleWebhookEvent(webhook);\n  return true;\n}\n```\n\n## Local Development\n\n```bash\n# Start ngrok tunnel\nngrok http 3000\n\n# Copy the HTTPS URL (e.g., https:\u002F\u002Fabc123.ngrok.io)\n# Configure this URL in Documenso webhook settings\n# Your endpoint: https:\u002F\u002Fabc123.ngrok.io\u002Fwebhooks\u002Fdocumenso\n```\n\n## Testing Webhooks\n\n```bash\n# Test webhook endpoint locally\ncurl -X POST http:\u002F\u002Flocalhost:3000\u002Fwebhooks\u002Fdocumenso \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-Documenso-Secret: your-secret\" \\\n  -d '{\n    \"event\": \"document.completed\",\n    \"payload\": {\n      \"id\": \"doc_test123\",\n      \"title\": \"Test Document\",\n      \"status\": \"COMPLETED\",\n      \"createdAt\": \"2024-01-01T00:00:00Z\",\n      \"updatedAt\": \"2024-01-01T01:00:00Z\",\n      \"recipients\": [\n        {\n          \"id\": \"rec_123\",\n          \"email\": \"signer@example.com\",\n          \"name\": \"Test Signer\",\n          \"role\": \"SIGNER\",\n          \"signingStatus\": \"SIGNED\"\n        }\n      ]\n    },\n    \"createdAt\": \"2024-01-01T01:00:00Z\",\n    \"webhookEndpoint\": \"https:\u002F\u002Fyourapp.com\u002Fwebhooks\u002Fdocumenso\"\n  }'\n```\n\n## Output\n- Webhook endpoint configured\n- All events handled\n- Idempotency implemented\n- Local testing ready\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| 401 Unauthorized | Wrong secret | Check webhook secret |\n| Webhook not received | URL not HTTPS | Use HTTPS endpoint |\n| Duplicate processing | No idempotency | Add deduplication |\n| Timeout | Slow handler | Use async queue |\n\n## Resources\n- [Documenso Webhooks](https:\u002F\u002Fdocs.documenso.com\u002Fdevelopers\u002Fwebhooks)\n- [ngrok Documentation](https:\u002F\u002Fngrok.com\u002Fdocs)\n- [Webhook Best Practices](https:\u002F\u002Fwebhooks.fyi\u002F)\n\n## Next Steps\nFor performance optimization, see `documenso-performance-tuning`.\n",{"name":5,"author":49,"license":15,"version":50,"description":51,"allowed-tools":52},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Implement Documenso webhook configuration and event handling.\nUse when setting up webhook endpoints, handling document events,\nor implementing real-time notifications for document signing.\nTrigger with phrases like \"documenso webhook\", \"documenso events\",\n\"document completed webhook\", \"signing notification\".\n","Read, Write, Edit, Bash(curl:*), Bash(ngrok:*)","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdocumenso-pack\u002Fskills\u002Fdocumenso-webhooks-events",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill documenso-webhooks-events",{"tool":68,"command":69},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill documenso-webhooks-events",{"tool":71,"command":72},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill documenso-webhooks-events","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fdocumenso-pack\u002Fskills\u002Fdocumenso-webhooks-events\u002FSKILL.md",true,[],[77,110,144,167,193,220],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":90,"publishedAt":109},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[85],{"categoryNo":86,"categoryName":87,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,27,107,108],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":120,"publishedAt":44},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[117],{"categoryNo":118,"categoryName":119,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000009","前端开发",[121,122,97,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,36,102,138,139,140,141,25,142,143],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","single-file","simple","ui components","multi","jsx","suite",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":148,"sourceHtmlUrl":149,"categories":150,"keywords":155,"publishedAt":44},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[151,154],{"categoryNo":152,"categoryName":153,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":118,"categoryName":119,"taxonomyType":88,"taxonomyTypeDesc":89},[156,157,158,125,159,160,122,161,95,162,135,163,164,165,166,27,25],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":171,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":44},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[175,176,177,178,179,180,181,182,36,183,184,185,186,187,188,189,27,190,191,192,25,24],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":81,"licenseFileUrl":197,"sourceHtmlUrl":198,"categories":199,"keywords":203,"publishedAt":44},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[200],{"categoryNo":201,"categoryName":202,"taxonomyType":88,"taxonomyTypeDesc":89},"01JBSEEDCAT000000000000023","Skill与智能体开发",[204,205,206,207,208,209,210,211,212,213,214,215,216,217,27,25,218,24,219],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":224,"sourceHtmlUrl":225,"categories":226,"keywords":228,"publishedAt":44},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[227],{"categoryNo":201,"categoryName":202,"taxonomyType":88,"taxonomyTypeDesc":89},[222,229,230,231,232,233,234,162,235,236,36,237,23,238,239,25,240],"google","browser automation","gemini","automation","auth","code","library","management","only","query","Citation","source"]