{"record":{"id":"26b505d5f63c08ea","repo":"paperclipai/paperclip","slug":"webhook-endpoint-endpointkey-is-not-declared","errorCode":null,"errorMessage":"Webhook endpoint '${endpointKey}' is not declared by this plugin","messagePattern":"Webhook endpoint '(.+?)' is not declared by this plugin","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/plugins.ts","lineNumber":2736,"sourceCode":"      res.status(400).json({ error: \"Plugin manifest is missing\" });\n      return;\n    }\n\n    const capabilities = manifest.capabilities ?? [];\n    if (!capabilities.includes(\"webhooks.receive\")) {\n      res.status(400).json({\n        error: \"Plugin does not have the webhooks.receive capability\",\n      });\n      return;\n    }\n\n    // Step 4: Validate the endpointKey exists in the manifest's webhook declarations\n    const declaredWebhooks = manifest.webhooks ?? [];\n    const webhookDecl = declaredWebhooks.find(\n      (w) => w.endpointKey === endpointKey,\n    );\n    if (!webhookDecl) {\n      res.status(404).json({\n        error: `Webhook endpoint '${endpointKey}' is not declared by this plugin`,\n      });\n      return;\n    }\n\n    // Step 5: Extract request data\n    const requestId = randomUUID();\n    const rawHeaders: Record<string, string> = {};\n    for (const [key, value] of Object.entries(req.headers)) {\n      if (typeof value === \"string\") {\n        rawHeaders[key] = value;\n      } else if (Array.isArray(value)) {\n        rawHeaders[key] = value.join(\", \");\n      }\n    }\n\n    // Use the raw buffer stashed by the express.json() `verify` callback.\n    // This preserves the exact bytes the provider signed, whereas","sourceCodeStart":2718,"sourceCodeEnd":2754,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/routes/plugins.ts#L2718-L2754","documentation":"404 from the plugin webhook ingestion route. Fires when the endpointKey in the URL does not match any webhook declaration in the plugin manifest's webhooks list — the endpoint key was never declared by this plugin.","triggerScenarios":"Thrown at server/src/routes/plugins.ts:2714 when the library encounters an invalid state.","commonSituations":"Occurs when the webhook URL references an endpoint key that the plugin did not declare in its manifest webhook endpoints.","solutions":["Check the plugin manifest for the exact list of declared webhook endpoint keys and use one of those.","Fix the endpoint key in the webhook URL; it is case-sensitive and must match the manifest declaration."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}