diff --git a/src/api/routes/webhooks/#webhook_id/index.ts b/src/api/routes/webhooks/#webhook_id/index.ts
new file mode 100644
index 00000000..cc8c0386
--- /dev/null
+++ b/src/api/routes/webhooks/#webhook_id/index.ts
@@ -0,0 +1,32 @@
+import { route } from "@spacebar/api";
+import { Webhook } from "@spacebar/util";
+import { Request, Response, Router } from "express";
+const router = Router();
+
+router.get(
+ "/",
+ route({
+ description: "Returns a webhook object for the given id.",
+ responses: {
+ 200: {
+ body: "APIWebhook",
+ },
+ 404: {},
+ },
+ }),
+ async (req: Request, res: Response) => {
+ const { webhook_id } = req.params;
+ const webhook = await Webhook.findOneOrFail({
+ where: { id: webhook_id },
+ relations: [
+ "user",
+ "guild",
+ "source_guild",
+ "application" /*"source_channel"*/,
+ ],
+ });
+ return res.json(webhook);
+ },
+);
+
+export default router;
|