1 import { Note, Table, Tabs, TabsContent, TabsContentWrapper, TabsList, TabsTrigger, TypeList, Prerequisites } from "docs-ui"
2
3 export const metadata = {
4 title: `Cloud Webhooks Reference`,
5 }
6
7 # {metadata.title}
8
9 In this reference guide, you'll learn how Medusa delivers webhook events to your application, and you'll find the details and payload of every event that Medusa sends.
10
11 <Prerequisites
12 items={[
13 {
14 text: "A Webhook endpoint configured and enabled for your organization. This is the endpoint that receives the events in this reference.",
15 link: "/webhooks/endpoints",
16 }
17 ]}
18 />
19
20 ## Webhooks Overview
21
22 A webhook is an HTTP request that Medusa sends to an endpoint you own when something happens in your organization, such as a build starting or a deployment finishing. Webhooks let you react to changes in Cloud without polling for them.
23
24 Medusa delivers events to the [webhook endpoint configured for your organization](../endpoints/page.mdx). If your organization has no endpoint, or its endpoint is disabled, Medusa doesn't send any events.
25
26 Every event is a `POST` request with a JSON body. Your endpoint must respond with a `2xx` status code within ten seconds, otherwise Medusa treats the delivery as failed and retries it. You can track events delivery [in the Cloud dashboard](../events/page.mdx).
27
28 <Note>
29
30 Refer to the [Webhooks Changelog](../changelog/page.mdx) for dated updates to the webhook events that Medusa delivers.
31
32 </Note>
33
34 ---
35
36 ## Webhook Delivery Details
37
38 Medusa wraps every event in the same envelope. The `data` property holds the event's payload, which differs per event:
39
40 ```json
41 {
42 "id": "whev_01K2M7Q8ZCTVX3H4",
43 "type": "deployment.created",
44 "data": {
45 // The payload of the event.
46 },
47 "created_at": "2026-08-07T09:14:22.000Z"
48 }
49 ```
50
51 <TypeList
52 types={[
53 {
54 name: "id",
55 type: "`string`",
56 description: `The ID of the delivered event. Use it to make your handler idempotent, since Medusa reuses the same ID across retries of the same event.`,
57 },
58 {
59 name: "type",
60 type: "`string`",
61 description: `The name of the event, such as \`deployment.created\`.`,
62 },
63 {
64 name: "data",
65 type: "`object`",
66 description: `The payload of the event. Refer to the event's section for its properties.`,
67 },
68 {
69 name: "created_at",
70 type: "`string`",
71 description: `The date and time Medusa queued the event for delivery, in ISO 8601 format. This is not the date the underlying resource changed.`,
72 },
73 ]}
74 sectionTitle="Delivery Details"
75 />
76
77 ### Webhook Request Headers
78
79 Every delivery includes the following headers:
80
81 <Table>
82 <Table.Header>
83 <Table.Row>
84 <Table.HeaderCell>
85 Header
86 </Table.HeaderCell>
87 <Table.HeaderCell>
88 Description
89 </Table.HeaderCell>
90 </Table.Row>
91 </Table.Header>
92 <Table.Body>
93 <Table.Row>
94 <Table.Cell>
95
96 `X-Medusa-Event`
97
98 </Table.Cell>
99 <Table.Cell>
100 The name of the event, matching the `type` property of the body.
101 </Table.Cell>
102 </Table.Row>
103 <Table.Row>
104 <Table.Cell>
105
106 `X-Medusa-Delivery`
107
108 </Table.Cell>
109 <Table.Cell>
110 The ID of the delivered event, matching the `id` property of the body.
111 </Table.Cell>
112 </Table.Row>
113 <Table.Row>
114 <Table.Cell>
115
116 `X-Medusa-Signature`
117
118 </Table.Cell>
119 <Table.Cell>
120 The signature of the request, which you use to verify that Medusa sent it. Refer to the [Verify Webhook Signatures](#verify-webhook-signatures) section for details.
121
122 </Table.Cell>
123 </Table.Row>
124 <Table.Row>
125 <Table.Cell>
126
127 `User-Agent`
128
129 </Table.Cell>
130 <Table.Cell>
131
132 Always `MedusaCloud-Webhook/1.0`.
133
134 </Table.Cell>
135 </Table.Row>
136 </Table.Body>
137 </Table>
138
139 ### Verify Webhook Signatures
140
141 Medusa signs every request with the secret of your webhook endpoint, and sends the signature in the `X-Medusa-Signature` header:
142
143 ```bash
144 X-Medusa-Signature: t=1786785262,v1=5e9b41...
145 ```
146
147 The header holds two values separated by a comma:
148
149 <Table>
150 <Table.Header>
151 <Table.Row>
152 <Table.HeaderCell>
153 Value
154 </Table.HeaderCell>
155 <Table.HeaderCell>
156 Description
157 </Table.HeaderCell>
158 </Table.Row>
159 </Table.Header>
160 <Table.Body>
161 <Table.Row>
162 <Table.Cell>
163
164 `t`
165
166 </Table.Cell>
167 <Table.Cell>
168
169 The time Medusa signed the request, as a Unix timestamp in seconds.
170
171 </Table.Cell>
172 </Table.Row>
173 <Table.Row>
174 <Table.Cell>
175
176 `v1`
177
178 </Table.Cell>
179 <Table.Cell>
180
181 The HMAC SHA-256 signature, in hexadecimal format.
182
183 </Table.Cell>
184 </Table.Row>
185 </Table.Body>
186 </Table>
187
188 To verify a request, compute the HMAC SHA-256 of the string `{t}.{raw request body}` using your endpoint's secret, then compare the result to `v1`.
189
190 For example:
191
192 <Tabs defaultValue="medusa">
193 <TabsList>
194 <TabsTrigger value="medusa">Medusa Application</TabsTrigger>
195 <TabsTrigger value="node">Node.js</TabsTrigger>
196 </TabsList>
197 <TabsContentWrapper>
198 <TabsContent value="medusa">
199
200 In a Medusa application, verify the signature in a middleware so that your route only runs for requests that Cloud sent.
201
202 Start by registering the middleware on your webhook route in `src/api/middlewares.ts`:
203
204 ```ts title="src/api/middlewares.ts"
205 import { defineMiddlewares } from "@medusajs/framework/http"
206 import {
207 verifyWebhookSignature,
208 } from "./utils/verify-webhook-signature"
209
210 export default defineMiddlewares({
211 routes: [
212 {
213 method: ["POST"],
214 matcher: "/cloud-webhooks",
215 bodyParser: { preserveRawBody: true },
216 middlewares: [verifyWebhookSignature],
217 },
218 ],
219 })
220 ```
221
222 The `preserveRawBody` option of `bodyParser` stores the raw request body in `req.rawBody`, which you need to compute the signature. Learn more in the [Configure Request Body Parser](!docs!/learn/fundamentals/api-routes/parse-body#preserve-raw-body-data-for-webhooks) guide.
223
224 Then, create the middleware in `src/api/utils/verify-webhook-signature.ts`:
225
226 ```ts title="src/api/utils/verify-webhook-signature.ts"
227 import {
228 MedusaNextFunction,
229 MedusaRequest,
230 MedusaResponse,
231 } from "@medusajs/framework/http"
232 import crypto from "crypto"
233
234 export function verifyWebhookSignature(
235 req: MedusaRequest,
236 res: MedusaResponse,
237 next: MedusaNextFunction
238 ) {
239 const header = req.headers["x-medusa-signature"]
240 const secret = process.env.CLOUD_WEBHOOK_SECRET
241
242 if (typeof header !== "string" || !secret) {
243 return res.sendStatus(401)
244 }
245
246 const parts = new URLSearchParams(
247 header.replace(/,/g, "&")
248 )
249 const timestamp = parts.get("t")
250 const signature = parts.get("v1")
251
252 if (!timestamp || !signature || !req.rawBody) {
253 return res.sendStatus(401)
254 }
255
256 const expected = crypto
257 .createHmac("sha256", secret)
258 .update(
259 `${timestamp}.${req.rawBody.toString("utf8")}`,
260 "utf8"
261 )
262 .digest("hex")
263
264 if (
265 expected.length !== signature.length ||
266 !crypto.timingSafeEqual(
267 Buffer.from(expected),
268 Buffer.from(signature)
269 )
270 ) {
271 return res.sendStatus(401)
272 }
273
274 next()
275 }
276 ```
277
278 Your route then handles the event, knowing that the request is verified:
279
280 ```ts title="src/api/cloud-webhooks/route.ts"
281 import {
282 MedusaRequest,
283 MedusaResponse,
284 } from "@medusajs/framework/http"
285
286 export async function POST(
287 req: MedusaRequest,
288 res: MedusaResponse
289 ) {
290 const event = req.body as {
291 id: string
292 type: string
293 }
294
295 // TODO handle the event
296
297 res.sendStatus(200)
298 }
299 ```
300
301 </TabsContent>
302 <TabsContent value="node">
303
304 In a plain Node.js application, pass the raw request body, the `X-Medusa-Signature` header, and your endpoint's secret to the following function:
305
306 ```ts
307 import crypto from "crypto"
308
309 export function isValid(
310 rawBody: string,
311 header: string,
312 secret: string
313 ) {
314 const parts = new URLSearchParams(
315 header.replace(/,/g, "&")
316 )
317 const timestamp = parts.get("t")
318 const signature = parts.get("v1")
319
320 if (!timestamp || !signature) {
321 return false
322 }
323
324 const expected = crypto
325 .createHmac("sha256", secret)
326 .update(`${timestamp}.${rawBody}`, "utf8")
327 .digest("hex")
328
329 if (expected.length !== signature.length) {
330 return false
331 }
332
333 return crypto.timingSafeEqual(
334 Buffer.from(expected),
335 Buffer.from(signature)
336 )
337 }
338 ```
339
340 </TabsContent>
341 </TabsContentWrapper>
342 </Tabs>
343
344 <Note type="warning">
345
346 Compute the signature from the raw request body. If your framework parses the body into an object before your handler runs, the signature won't match.
347
348 </Note>
349
350 You can also compare `t` to the current time and reject requests that are older than the window you accept. For example:
351
352 ```ts
353 export function isRecent(
354 header: string,
355 toleranceInSeconds = 300
356 ) {
357 const parts = new URLSearchParams(
358 header.replace(/,/g, "&")
359 )
360 const timestamp = Number(parts.get("t"))
361
362 if (!timestamp) {
363 return false
364 }
365
366 const ageInSeconds = Date.now() / 1000 - timestamp
367
368 return ageInSeconds < toleranceInSeconds
369 }
370 ```
371
372 Medusa signs every delivery attempt at the time it sends it, so retries of the same event pass this check.
373
374 ### Webhook Retries
375
376 Medusa attempts the first delivery as soon as it queues the event. If your endpoint doesn't respond with a `2xx` status code within ten seconds, Medusa retries the delivery with an exponential backoff, starting at five minutes and doubling after every attempt.
377
378 Medusa will retry within twenty-four hours of the first attempt. After that, it stops retrying and marks the event as failed. You can [track the status of deliveries in the Cloud dashboard](../events/page.mdx).
379
380 A delivery fails when your endpoint responds with a status code outside the `2xx` range, when it doesn't respond within ten seconds, or when Medusa can't reach it. Medusa doesn't follow redirects, so a `3xx` response also counts as a failed delivery.
381
382 ---
383
384 ## Webhook Events
385
386 Medusa sends the following events:
387
388 <Table>
389 <Table.Header>
390 <Table.Row>
391 <Table.HeaderCell>
392 Event
393 </Table.HeaderCell>
394 <Table.HeaderCell>
395 Description
396 </Table.HeaderCell>
397 </Table.Row>
398 </Table.Header>
399 <Table.Body>
400 <Table.Row>
401 <Table.Cell>
402
403 [`build.canceled`](#buildcanceled)
404
405 </Table.Cell>
406 <Table.Cell>
407
408 The build was canceled.
409
410 </Table.Cell>
411 </Table.Row>
412 <Table.Row>
413 <Table.Cell>
414
415 [`build.created`](#buildcreated)
416
417 </Table.Cell>
418 <Table.Cell>
419
420 Medusa created a build for an environment.
421
422 </Table.Cell>
423 </Table.Row>
424 <Table.Row>
425 <Table.Cell>
426
427 [`build.failed`](#buildfailed)
428
429 </Table.Cell>
430 <Table.Cell>
431
432 A build failed.
433
434 </Table.Cell>
435 </Table.Row>
436 <Table.Row>
437 <Table.Cell>
438
439 [`build.succeeded`](#buildsucceeded)
440
441 </Table.Cell>
442 <Table.Cell>
443
444 A build completed successfully.
445
446 </Table.Cell>
447 </Table.Row>
448 <Table.Row>
449 <Table.Cell>
450
451 [`deployment.canceled`](#deploymentcanceled)
452
453 </Table.Cell>
454 <Table.Cell>
455
456 The deployment was canceled.
457
458 </Table.Cell>
459 </Table.Row>
460 <Table.Row>
461 <Table.Cell>
462
463 [`deployment.created`](#deploymentcreated)
464
465 </Table.Cell>
466 <Table.Cell>
467
468 Medusa created a deployment for an environment.
469
470 </Table.Cell>
471 </Table.Row>
472 <Table.Row>
473 <Table.Cell>
474
475 [`deployment.failed`](#deploymentfailed)
476
477 </Table.Cell>
478 <Table.Cell>
479
480 A deployment failed.
481
482 </Table.Cell>
483 </Table.Row>
484 <Table.Row>
485 <Table.Cell>
486
487 [`deployment.succeeded`](#deploymentsucceeded)
488
489 </Table.Cell>
490 <Table.Cell>
491
492 A deployment completed successfully.
493
494 </Table.Cell>
495 </Table.Row>
496 </Table.Body>
497 </Table>
498
499 ---
500
501 ## Webhook Build Events
502
503 Medusa sends these events related to an environment's builds, which happen after you push a commit to the environment's branch.
504
505 ### build.canceled
506
507 Cloud delivers this event when a build is canceled.
508
509 #### Payload
510
511 <TypeList
512 types={[
513 {
514 name: "id",
515 type: "`string`",
516 description: `Unique identifier for this webhook event.`,
517 },
518 {
519 name: "type",
520 type: "`string`",
521 description: `The event type, always "build.canceled".`,
522 },
523 {
524 name: "created_at",
525 type: "`string`",
526 description: `ISO 8601 timestamp of when the event was created.`,
527 },
528 {
529 name: "data",
530 type: "`object`",
531 description: `The payload of the event.`,
532 children: [
533 {
534 name: "build",
535 type: "`object`",
536 description: `The build that was canceled.`,
537 children: [
538 {
539 name: "id",
540 type: "`string`",
541 description: `Unique identifier of the build.`,
542 },
543 {
544 name: "status",
545 type: "`\"canceled\"`",
546 description: `Status of the build at the time of the event.`,
547 },
548 {
549 name: "commit_hash",
550 type: "`string`",
551 description: `Git commit hash that triggered the build.`,
552 },
553 {
554 name: "commit_message",
555 type: "`string`",
556 description: `Git commit message associated with the build. It is an empty string if Medusa doesn't have the message.`,
557 },
558 {
559 name: "commit_author",
560 type: "`string`",
561 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
562 },
563 ],
564 },
565 {
566 name: "organization",
567 type: "`object`",
568 description: `The organization that owns the project.`,
569 children: [
570 {
571 name: "id",
572 type: "`string`",
573 description: `Unique identifier of the organization.`,
574 },
575 {
576 name: "name",
577 type: "`string`",
578 description: `Display name of the organization.`,
579 },
580 ],
581 },
582 {
583 name: "project",
584 type: "`object`",
585 description: `The project the build belongs to.`,
586 children: [
587 {
588 name: "id",
589 type: "`string`",
590 description: `Unique identifier of the project.`,
591 },
592 {
593 name: "name",
594 type: "`string`",
595 description: `Display name of the project.`,
596 },
597 {
598 name: "handle",
599 type: "`string`",
600 description: `URL-safe handle of the project.`,
601 },
602 {
603 name: "repository",
604 type: "`string`",
605 description: `Git repository URL linked to the project.`,
606 },
607 {
608 name: "region",
609 type: "`string`",
610 description: `Deployment region of the project.`,
611 },
612 ],
613 },
614 {
615 name: "environment",
616 type: "`object`",
617 description: `The environment the build targets.`,
618 children: [
619 {
620 name: "id",
621 type: "`string`",
622 description: `Unique identifier of the environment.`,
623 },
624 {
625 name: "name",
626 type: "`string`",
627 description: `Display name of the environment.`,
628 },
629 {
630 name: "handle",
631 type: "`string`",
632 description: `URL-safe handle of the environment.`,
633 },
634 {
635 name: "branch",
636 type: "`string`",
637 description: `Git branch associated with this environment.`,
638 },
639 ],
640 },
641 ],
642 },
643 ]}
644 sectionTitle="build.canceled"
645 />
646
647 #### Example Payload
648
649 ```json
650 {
651 "created_at": "2024-11-12T10:03:00.000Z",
652 "data": {
653 "build": {
654 "commit_author": "Jane Doe",
655 "commit_hash": "a1b2c3d4e5f6",
656 "commit_message": "Add new product feature",
657 "id": "build_01HXYZ5678ABCDEF",
658 "status": "canceled"
659 },
660 "environment": {
661 "branch": "main",
662 "handle": "production",
663 "id": "projenv_01HXYZ7890ABCDEF",
664 "name": "Production"
665 },
666 "organization": {
667 "id": "org_01HXYZ9012ABCDEF",
668 "name": "Acme Corp"
669 },
670 "project": {
671 "handle": "my-storefront",
672 "id": "proj_01HXYZ3456ABCDEF",
673 "name": "My Storefront",
674 "region": "eu-west-1",
675 "repository": "https://github.com/acme/storefront"
676 }
677 },
678 "id": "whev_01HXYZ4567ABCDEF",
679 "type": "build.canceled"
680 }
681 ```
682
683 ### build.created
684
685 Cloud delivers this event when a new build is created for an environment.
686
687 #### Payload
688
689 <TypeList
690 types={[
691 {
692 name: "id",
693 type: "`string`",
694 description: `Unique identifier for this webhook event.`,
695 },
696 {
697 name: "type",
698 type: "`string`",
699 description: `The event type, always "build.created".`,
700 },
701 {
702 name: "created_at",
703 type: "`string`",
704 description: `ISO 8601 timestamp of when the event was created.`,
705 },
706 {
707 name: "data",
708 type: "`object`",
709 description: `The payload of the event.`,
710 children: [
711 {
712 name: "build",
713 type: "`object`",
714 description: `The build that was created.`,
715 children: [
716 {
717 name: "id",
718 type: "`string`",
719 description: `Unique identifier of the build.`,
720 },
721 {
722 name: "status",
723 type: "`\"created\"`",
724 description: `Status of the build at the time of the event.`,
725 },
726 {
727 name: "commit_hash",
728 type: "`string`",
729 description: `Git commit hash that triggered the build.`,
730 },
731 {
732 name: "commit_message",
733 type: "`string`",
734 description: `Git commit message associated with the build. It is an empty string if Medusa doesn't have the message.`,
735 },
736 {
737 name: "commit_author",
738 type: "`string`",
739 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
740 },
741 ],
742 },
743 {
744 name: "organization",
745 type: "`object`",
746 description: `The organization that owns the project.`,
747 children: [
748 {
749 name: "id",
750 type: "`string`",
751 description: `Unique identifier of the organization.`,
752 },
753 {
754 name: "name",
755 type: "`string`",
756 description: `Display name of the organization.`,
757 },
758 ],
759 },
760 {
761 name: "project",
762 type: "`object`",
763 description: `The project the build belongs to.`,
764 children: [
765 {
766 name: "id",
767 type: "`string`",
768 description: `Unique identifier of the project.`,
769 },
770 {
771 name: "name",
772 type: "`string`",
773 description: `Display name of the project.`,
774 },
775 {
776 name: "handle",
777 type: "`string`",
778 description: `URL-safe handle of the project.`,
779 },
780 {
781 name: "repository",
782 type: "`string`",
783 description: `Git repository URL linked to the project.`,
784 },
785 {
786 name: "region",
787 type: "`string`",
788 description: `Deployment region of the project.`,
789 },
790 ],
791 },
792 {
793 name: "environment",
794 type: "`object`",
795 description: `The environment the build targets.`,
796 children: [
797 {
798 name: "id",
799 type: "`string`",
800 description: `Unique identifier of the environment.`,
801 },
802 {
803 name: "name",
804 type: "`string`",
805 description: `Display name of the environment.`,
806 },
807 {
808 name: "handle",
809 type: "`string`",
810 description: `URL-safe handle of the environment.`,
811 },
812 {
813 name: "branch",
814 type: "`string`",
815 description: `Git branch associated with this environment.`,
816 },
817 ],
818 },
819 ],
820 },
821 ]}
822 sectionTitle="build.created"
823 />
824
825 #### Example Payload
826
827 ```json
828 {
829 "created_at": "2024-11-12T10:00:00.000Z",
830 "data": {
831 "build": {
832 "commit_author": "Jane Doe",
833 "commit_hash": "a1b2c3d4e5f6",
834 "commit_message": "Add new product feature",
835 "id": "build_01HXYZ5678ABCDEF",
836 "status": "created"
837 },
838 "environment": {
839 "branch": "main",
840 "handle": "production",
841 "id": "projenv_01HXYZ7890ABCDEF",
842 "name": "Production"
843 },
844 "organization": {
845 "id": "org_01HXYZ9012ABCDEF",
846 "name": "Acme Corp"
847 },
848 "project": {
849 "handle": "my-storefront",
850 "id": "proj_01HXYZ3456ABCDEF",
851 "name": "My Storefront",
852 "region": "eu-west-1",
853 "repository": "https://github.com/acme/storefront"
854 }
855 },
856 "id": "whev_01HXYZ1234ABCDEF",
857 "type": "build.created"
858 }
859 ```
860
861 ### build.failed
862
863 Cloud delivers this event when a build fails.
864
865 #### Payload
866
867 <TypeList
868 types={[
869 {
870 name: "id",
871 type: "`string`",
872 description: `Unique identifier for this webhook event.`,
873 },
874 {
875 name: "type",
876 type: "`string`",
877 description: `The event type, always "build.failed".`,
878 },
879 {
880 name: "created_at",
881 type: "`string`",
882 description: `ISO 8601 timestamp of when the event was created.`,
883 },
884 {
885 name: "data",
886 type: "`object`",
887 description: `The payload of the event.`,
888 children: [
889 {
890 name: "build",
891 type: "`object`",
892 description: `The build that failed.`,
893 children: [
894 {
895 name: "id",
896 type: "`string`",
897 description: `Unique identifier of the build.`,
898 },
899 {
900 name: "status",
901 type: "`\"failed\"`",
902 description: `Status of the build at the time of the event.`,
903 },
904 {
905 name: "commit_hash",
906 type: "`string`",
907 description: `Git commit hash that triggered the build.`,
908 },
909 {
910 name: "commit_message",
911 type: "`string`",
912 description: `Git commit message associated with the build. It is an empty string if Medusa doesn't have the message.`,
913 },
914 {
915 name: "commit_author",
916 type: "`string`",
917 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
918 },
919 ],
920 },
921 {
922 name: "organization",
923 type: "`object`",
924 description: `The organization that owns the project.`,
925 children: [
926 {
927 name: "id",
928 type: "`string`",
929 description: `Unique identifier of the organization.`,
930 },
931 {
932 name: "name",
933 type: "`string`",
934 description: `Display name of the organization.`,
935 },
936 ],
937 },
938 {
939 name: "project",
940 type: "`object`",
941 description: `The project the build belongs to.`,
942 children: [
943 {
944 name: "id",
945 type: "`string`",
946 description: `Unique identifier of the project.`,
947 },
948 {
949 name: "name",
950 type: "`string`",
951 description: `Display name of the project.`,
952 },
953 {
954 name: "handle",
955 type: "`string`",
956 description: `URL-safe handle of the project.`,
957 },
958 {
959 name: "repository",
960 type: "`string`",
961 description: `Git repository URL linked to the project.`,
962 },
963 {
964 name: "region",
965 type: "`string`",
966 description: `Deployment region of the project.`,
967 },
968 ],
969 },
970 {
971 name: "environment",
972 type: "`object`",
973 description: `The environment the build targets.`,
974 children: [
975 {
976 name: "id",
977 type: "`string`",
978 description: `Unique identifier of the environment.`,
979 },
980 {
981 name: "name",
982 type: "`string`",
983 description: `Display name of the environment.`,
984 },
985 {
986 name: "handle",
987 type: "`string`",
988 description: `URL-safe handle of the environment.`,
989 },
990 {
991 name: "branch",
992 type: "`string`",
993 description: `Git branch associated with this environment.`,
994 },
995 ],
996 },
997 ],
998 },
999 ]}
1000 sectionTitle="build.failed"
1001 />
1002
1003 #### Example Payload
1004
1005 ```json
1006 {
1007 "created_at": "2024-11-12T10:05:00.000Z",
1008 "data": {
1009 "build": {
1010 "commit_author": "Jane Doe",
1011 "commit_hash": "a1b2c3d4e5f6",
1012 "commit_message": "Add new product feature",
1013 "id": "build_01HXYZ5678ABCDEF",
1014 "status": "failed"
1015 },
1016 "environment": {
1017 "branch": "main",
1018 "handle": "production",
1019 "id": "projenv_01HXYZ7890ABCDEF",
1020 "name": "Production"
1021 },
1022 "organization": {
1023 "id": "org_01HXYZ9012ABCDEF",
1024 "name": "Acme Corp"
1025 },
1026 "project": {
1027 "handle": "my-storefront",
1028 "id": "proj_01HXYZ3456ABCDEF",
1029 "name": "My Storefront",
1030 "region": "eu-west-1",
1031 "repository": "https://github.com/acme/storefront"
1032 }
1033 },
1034 "id": "whev_01HXYZ3456ABCDEF",
1035 "type": "build.failed"
1036 }
1037 ```
1038
1039 ### build.succeeded
1040
1041 Cloud delivers this event when a build completes successfully.
1042
1043 #### Payload
1044
1045 <TypeList
1046 types={[
1047 {
1048 name: "id",
1049 type: "`string`",
1050 description: `Unique identifier for this webhook event.`,
1051 },
1052 {
1053 name: "type",
1054 type: "`string`",
1055 description: `The event type, always "build.succeeded".`,
1056 },
1057 {
1058 name: "created_at",
1059 type: "`string`",
1060 description: `ISO 8601 timestamp of when the event was created.`,
1061 },
1062 {
1063 name: "data",
1064 type: "`object`",
1065 description: `The payload of the event.`,
1066 children: [
1067 {
1068 name: "build",
1069 type: "`object`",
1070 description: `The build that succeeded.`,
1071 children: [
1072 {
1073 name: "id",
1074 type: "`string`",
1075 description: `Unique identifier of the build.`,
1076 },
1077 {
1078 name: "status",
1079 type: "`\"succeeded\"`",
1080 description: `Status of the build at the time of the event.`,
1081 },
1082 {
1083 name: "commit_hash",
1084 type: "`string`",
1085 description: `Git commit hash that triggered the build.`,
1086 },
1087 {
1088 name: "commit_message",
1089 type: "`string`",
1090 description: `Git commit message associated with the build. It is an empty string if Medusa doesn't have the message.`,
1091 },
1092 {
1093 name: "commit_author",
1094 type: "`string`",
1095 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
1096 },
1097 ],
1098 },
1099 {
1100 name: "organization",
1101 type: "`object`",
1102 description: `The organization that owns the project.`,
1103 children: [
1104 {
1105 name: "id",
1106 type: "`string`",
1107 description: `Unique identifier of the organization.`,
1108 },
1109 {
1110 name: "name",
1111 type: "`string`",
1112 description: `Display name of the organization.`,
1113 },
1114 ],
1115 },
1116 {
1117 name: "project",
1118 type: "`object`",
1119 description: `The project the build belongs to.`,
1120 children: [
1121 {
1122 name: "id",
1123 type: "`string`",
1124 description: `Unique identifier of the project.`,
1125 },
1126 {
1127 name: "name",
1128 type: "`string`",
1129 description: `Display name of the project.`,
1130 },
1131 {
1132 name: "handle",
1133 type: "`string`",
1134 description: `URL-safe handle of the project.`,
1135 },
1136 {
1137 name: "repository",
1138 type: "`string`",
1139 description: `Git repository URL linked to the project.`,
1140 },
1141 {
1142 name: "region",
1143 type: "`string`",
1144 description: `Deployment region of the project.`,
1145 },
1146 ],
1147 },
1148 {
1149 name: "environment",
1150 type: "`object`",
1151 description: `The environment the build targets.`,
1152 children: [
1153 {
1154 name: "id",
1155 type: "`string`",
1156 description: `Unique identifier of the environment.`,
1157 },
1158 {
1159 name: "name",
1160 type: "`string`",
1161 description: `Display name of the environment.`,
1162 },
1163 {
1164 name: "handle",
1165 type: "`string`",
1166 description: `URL-safe handle of the environment.`,
1167 },
1168 {
1169 name: "branch",
1170 type: "`string`",
1171 description: `Git branch associated with this environment.`,
1172 },
1173 ],
1174 },
1175 ],
1176 },
1177 ]}
1178 sectionTitle="build.succeeded"
1179 />
1180
1181 #### Example Payload
1182
1183 ```json
1184 {
1185 "created_at": "2024-11-12T10:05:00.000Z",
1186 "data": {
1187 "build": {
1188 "commit_author": "Jane Doe",
1189 "commit_hash": "a1b2c3d4e5f6",
1190 "commit_message": "Add new product feature",
1191 "id": "build_01HXYZ5678ABCDEF",
1192 "status": "succeeded"
1193 },
1194 "environment": {
1195 "branch": "main",
1196 "handle": "production",
1197 "id": "projenv_01HXYZ7890ABCDEF",
1198 "name": "Production"
1199 },
1200 "organization": {
1201 "id": "org_01HXYZ9012ABCDEF",
1202 "name": "Acme Corp"
1203 },
1204 "project": {
1205 "handle": "my-storefront",
1206 "id": "proj_01HXYZ3456ABCDEF",
1207 "name": "My Storefront",
1208 "region": "eu-west-1",
1209 "repository": "https://github.com/acme/storefront"
1210 }
1211 },
1212 "id": "whev_01HXYZ2345ABCDEF",
1213 "type": "build.succeeded"
1214 }
1215 ```
1216
1217 ---
1218
1219 ## Webhook Deployment Events
1220
1221 Medusa sends these events related to an environment's deployments, which happen after a build succeeds.
1222
1223 ### deployment.canceled
1224
1225 Cloud delivers this event when a deployment is canceled.
1226
1227 #### Payload
1228
1229 <TypeList
1230 types={[
1231 {
1232 name: "id",
1233 type: "`string`",
1234 description: `Unique identifier for this webhook event.`,
1235 },
1236 {
1237 name: "type",
1238 type: "`string`",
1239 description: `The event type, always "deployment.canceled".`,
1240 },
1241 {
1242 name: "created_at",
1243 type: "`string`",
1244 description: `ISO 8601 timestamp of when the event was created.`,
1245 },
1246 {
1247 name: "data",
1248 type: "`object`",
1249 description: `The payload of the event.`,
1250 children: [
1251 {
1252 name: "deployment",
1253 type: "`object`",
1254 description: `The deployment that was canceled.`,
1255 children: [
1256 {
1257 name: "id",
1258 type: "`string`",
1259 description: `Unique identifier of the deployment.`,
1260 },
1261 {
1262 name: "status",
1263 type: "`\"canceled\"`",
1264 description: `Status of the deployment at the time of the event.`,
1265 },
1266 ],
1267 },
1268 {
1269 name: "build",
1270 type: "`object`",
1271 description: `The build associated with this deployment.`,
1272 children: [
1273 {
1274 name: "id",
1275 type: "`string`",
1276 description: `Unique identifier of the build.`,
1277 },
1278 {
1279 name: "commit_hash",
1280 type: "`string`",
1281 description: `Git commit hash of the build.`,
1282 },
1283 {
1284 name: "commit_message",
1285 type: "`string`",
1286 description: `Git commit message of the build. It is an empty string if Medusa doesn't have the message.`,
1287 },
1288 {
1289 name: "commit_author",
1290 type: "`string`",
1291 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
1292 },
1293 ],
1294 },
1295 {
1296 name: "organization",
1297 type: "`object`",
1298 description: `The organization that owns the project.`,
1299 children: [
1300 {
1301 name: "id",
1302 type: "`string`",
1303 description: `Unique identifier of the organization.`,
1304 },
1305 {
1306 name: "name",
1307 type: "`string`",
1308 description: `Display name of the organization.`,
1309 },
1310 ],
1311 },
1312 {
1313 name: "project",
1314 type: "`object`",
1315 description: `The project the deployment belongs to.`,
1316 children: [
1317 {
1318 name: "id",
1319 type: "`string`",
1320 description: `Unique identifier of the project.`,
1321 },
1322 {
1323 name: "name",
1324 type: "`string`",
1325 description: `Display name of the project.`,
1326 },
1327 {
1328 name: "handle",
1329 type: "`string`",
1330 description: `URL-safe handle of the project.`,
1331 },
1332 {
1333 name: "repository",
1334 type: "`string`",
1335 description: `Git repository URL linked to the project.`,
1336 },
1337 {
1338 name: "region",
1339 type: "`string`",
1340 description: `Deployment region of the project.`,
1341 },
1342 ],
1343 },
1344 {
1345 name: "environment",
1346 type: "`object`",
1347 description: `The environment that was being deployed to.`,
1348 children: [
1349 {
1350 name: "id",
1351 type: "`string`",
1352 description: `Unique identifier of the environment.`,
1353 },
1354 {
1355 name: "name",
1356 type: "`string`",
1357 description: `Display name of the environment.`,
1358 },
1359 {
1360 name: "handle",
1361 type: "`string`",
1362 description: `URL-safe handle of the environment.`,
1363 },
1364 {
1365 name: "branch",
1366 type: "`string`",
1367 description: `Git branch associated with this environment.`,
1368 },
1369 ],
1370 },
1371 ],
1372 },
1373 ]}
1374 sectionTitle="deployment.canceled"
1375 />
1376
1377 #### Example Payload
1378
1379 ```json
1380 {
1381 "created_at": "2024-11-12T10:08:00.000Z",
1382 "data": {
1383 "build": {
1384 "commit_author": "Jane Doe",
1385 "commit_hash": "a1b2c3d4e5f6",
1386 "commit_message": "Add new product feature",
1387 "id": "build_01HXYZ5678ABCDEF"
1388 },
1389 "deployment": {
1390 "id": "depl_01HXYZ6789ABCDEF",
1391 "status": "canceled"
1392 },
1393 "environment": {
1394 "branch": "main",
1395 "handle": "production",
1396 "id": "projenv_01HXYZ7890ABCDEF",
1397 "name": "Production"
1398 },
1399 "organization": {
1400 "id": "org_01HXYZ9012ABCDEF",
1401 "name": "Acme Corp"
1402 },
1403 "project": {
1404 "handle": "my-storefront",
1405 "id": "proj_01HXYZ3456ABCDEF",
1406 "name": "My Storefront",
1407 "region": "eu-west-1",
1408 "repository": "https://github.com/acme/storefront"
1409 }
1410 },
1411 "id": "whev_01HXYZ8901ABCDEF",
1412 "type": "deployment.canceled"
1413 }
1414 ```
1415
1416 ### deployment.created
1417
1418 Cloud delivers this event when a new deployment is created for an environment.
1419
1420 #### Payload
1421
1422 <TypeList
1423 types={[
1424 {
1425 name: "id",
1426 type: "`string`",
1427 description: `Unique identifier for this webhook event.`,
1428 },
1429 {
1430 name: "type",
1431 type: "`string`",
1432 description: `The event type, always "deployment.created".`,
1433 },
1434 {
1435 name: "created_at",
1436 type: "`string`",
1437 description: `ISO 8601 timestamp of when the event was created.`,
1438 },
1439 {
1440 name: "data",
1441 type: "`object`",
1442 description: `The payload of the event.`,
1443 children: [
1444 {
1445 name: "deployment",
1446 type: "`object`",
1447 description: `The deployment that was created.`,
1448 children: [
1449 {
1450 name: "id",
1451 type: "`string`",
1452 description: `Unique identifier of the deployment.`,
1453 },
1454 {
1455 name: "status",
1456 type: "`\"created\"`",
1457 description: `Status of the deployment at the time of the event.`,
1458 },
1459 ],
1460 },
1461 {
1462 name: "build",
1463 type: "`object`",
1464 description: `The build associated with this deployment.`,
1465 children: [
1466 {
1467 name: "id",
1468 type: "`string`",
1469 description: `Unique identifier of the build.`,
1470 },
1471 {
1472 name: "commit_hash",
1473 type: "`string`",
1474 description: `Git commit hash of the build.`,
1475 },
1476 {
1477 name: "commit_message",
1478 type: "`string`",
1479 description: `Git commit message of the build. It is an empty string if Medusa doesn't have the message.`,
1480 },
1481 {
1482 name: "commit_author",
1483 type: "`string`",
1484 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
1485 },
1486 ],
1487 },
1488 {
1489 name: "organization",
1490 type: "`object`",
1491 description: `The organization that owns the project.`,
1492 children: [
1493 {
1494 name: "id",
1495 type: "`string`",
1496 description: `Unique identifier of the organization.`,
1497 },
1498 {
1499 name: "name",
1500 type: "`string`",
1501 description: `Display name of the organization.`,
1502 },
1503 ],
1504 },
1505 {
1506 name: "project",
1507 type: "`object`",
1508 description: `The project the deployment belongs to.`,
1509 children: [
1510 {
1511 name: "id",
1512 type: "`string`",
1513 description: `Unique identifier of the project.`,
1514 },
1515 {
1516 name: "name",
1517 type: "`string`",
1518 description: `Display name of the project.`,
1519 },
1520 {
1521 name: "handle",
1522 type: "`string`",
1523 description: `URL-safe handle of the project.`,
1524 },
1525 {
1526 name: "repository",
1527 type: "`string`",
1528 description: `Git repository URL linked to the project.`,
1529 },
1530 {
1531 name: "region",
1532 type: "`string`",
1533 description: `Deployment region of the project.`,
1534 },
1535 ],
1536 },
1537 {
1538 name: "environment",
1539 type: "`object`",
1540 description: `The environment being deployed to.`,
1541 children: [
1542 {
1543 name: "id",
1544 type: "`string`",
1545 description: `Unique identifier of the environment.`,
1546 },
1547 {
1548 name: "name",
1549 type: "`string`",
1550 description: `Display name of the environment.`,
1551 },
1552 {
1553 name: "handle",
1554 type: "`string`",
1555 description: `URL-safe handle of the environment.`,
1556 },
1557 {
1558 name: "branch",
1559 type: "`string`",
1560 description: `Git branch associated with this environment.`,
1561 },
1562 ],
1563 },
1564 ],
1565 },
1566 ]}
1567 sectionTitle="deployment.created"
1568 />
1569
1570 #### Example Payload
1571
1572 ```json
1573 {
1574 "created_at": "2024-11-12T10:06:00.000Z",
1575 "data": {
1576 "build": {
1577 "commit_author": "Jane Doe",
1578 "commit_hash": "a1b2c3d4e5f6",
1579 "commit_message": "Add new product feature",
1580 "id": "build_01HXYZ5678ABCDEF"
1581 },
1582 "deployment": {
1583 "id": "depl_01HXYZ6789ABCDEF",
1584 "status": "created"
1585 },
1586 "environment": {
1587 "branch": "main",
1588 "handle": "production",
1589 "id": "projenv_01HXYZ7890ABCDEF",
1590 "name": "Production"
1591 },
1592 "organization": {
1593 "id": "org_01HXYZ9012ABCDEF",
1594 "name": "Acme Corp"
1595 },
1596 "project": {
1597 "handle": "my-storefront",
1598 "id": "proj_01HXYZ3456ABCDEF",
1599 "name": "My Storefront",
1600 "region": "eu-west-1",
1601 "repository": "https://github.com/acme/storefront"
1602 }
1603 },
1604 "id": "whev_01HXYZ5678ABCDEF",
1605 "type": "deployment.created"
1606 }
1607 ```
1608
1609 ### deployment.failed
1610
1611 Cloud delivers this event when a deployment fails.
1612
1613 #### Payload
1614
1615 <TypeList
1616 types={[
1617 {
1618 name: "id",
1619 type: "`string`",
1620 description: `Unique identifier for this webhook event.`,
1621 },
1622 {
1623 name: "type",
1624 type: "`string`",
1625 description: `The event type, always "deployment.failed".`,
1626 },
1627 {
1628 name: "created_at",
1629 type: "`string`",
1630 description: `ISO 8601 timestamp of when the event was created.`,
1631 },
1632 {
1633 name: "data",
1634 type: "`object`",
1635 description: `The payload of the event.`,
1636 children: [
1637 {
1638 name: "deployment",
1639 type: "`object`",
1640 description: `The deployment that failed.`,
1641 children: [
1642 {
1643 name: "id",
1644 type: "`string`",
1645 description: `Unique identifier of the deployment.`,
1646 },
1647 {
1648 name: "status",
1649 type: "`\"failed\"`",
1650 description: `Status of the deployment at the time of the event.`,
1651 },
1652 ],
1653 },
1654 {
1655 name: "build",
1656 type: "`object`",
1657 description: `The build associated with this deployment.`,
1658 children: [
1659 {
1660 name: "id",
1661 type: "`string`",
1662 description: `Unique identifier of the build.`,
1663 },
1664 {
1665 name: "commit_hash",
1666 type: "`string`",
1667 description: `Git commit hash of the build.`,
1668 },
1669 {
1670 name: "commit_message",
1671 type: "`string`",
1672 description: `Git commit message of the build. It is an empty string if Medusa doesn't have the message.`,
1673 },
1674 {
1675 name: "commit_author",
1676 type: "`string`",
1677 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
1678 },
1679 ],
1680 },
1681 {
1682 name: "organization",
1683 type: "`object`",
1684 description: `The organization that owns the project.`,
1685 children: [
1686 {
1687 name: "id",
1688 type: "`string`",
1689 description: `Unique identifier of the organization.`,
1690 },
1691 {
1692 name: "name",
1693 type: "`string`",
1694 description: `Display name of the organization.`,
1695 },
1696 ],
1697 },
1698 {
1699 name: "project",
1700 type: "`object`",
1701 description: `The project the deployment belongs to.`,
1702 children: [
1703 {
1704 name: "id",
1705 type: "`string`",
1706 description: `Unique identifier of the project.`,
1707 },
1708 {
1709 name: "name",
1710 type: "`string`",
1711 description: `Display name of the project.`,
1712 },
1713 {
1714 name: "handle",
1715 type: "`string`",
1716 description: `URL-safe handle of the project.`,
1717 },
1718 {
1719 name: "repository",
1720 type: "`string`",
1721 description: `Git repository URL linked to the project.`,
1722 },
1723 {
1724 name: "region",
1725 type: "`string`",
1726 description: `Deployment region of the project.`,
1727 },
1728 ],
1729 },
1730 {
1731 name: "environment",
1732 type: "`object`",
1733 description: `The environment that was being deployed to.`,
1734 children: [
1735 {
1736 name: "id",
1737 type: "`string`",
1738 description: `Unique identifier of the environment.`,
1739 },
1740 {
1741 name: "name",
1742 type: "`string`",
1743 description: `Display name of the environment.`,
1744 },
1745 {
1746 name: "handle",
1747 type: "`string`",
1748 description: `URL-safe handle of the environment.`,
1749 },
1750 {
1751 name: "branch",
1752 type: "`string`",
1753 description: `Git branch associated with this environment.`,
1754 },
1755 ],
1756 },
1757 ],
1758 },
1759 ]}
1760 sectionTitle="deployment.failed"
1761 />
1762
1763 #### Example Payload
1764
1765 ```json
1766 {
1767 "created_at": "2024-11-12T10:10:00.000Z",
1768 "data": {
1769 "build": {
1770 "commit_author": "Jane Doe",
1771 "commit_hash": "a1b2c3d4e5f6",
1772 "commit_message": "Add new product feature",
1773 "id": "build_01HXYZ5678ABCDEF"
1774 },
1775 "deployment": {
1776 "id": "depl_01HXYZ6789ABCDEF",
1777 "status": "failed"
1778 },
1779 "environment": {
1780 "branch": "main",
1781 "handle": "production",
1782 "id": "projenv_01HXYZ7890ABCDEF",
1783 "name": "Production"
1784 },
1785 "organization": {
1786 "id": "org_01HXYZ9012ABCDEF",
1787 "name": "Acme Corp"
1788 },
1789 "project": {
1790 "handle": "my-storefront",
1791 "id": "proj_01HXYZ3456ABCDEF",
1792 "name": "My Storefront",
1793 "region": "eu-west-1",
1794 "repository": "https://github.com/acme/storefront"
1795 }
1796 },
1797 "id": "whev_01HXYZ7890ABCDEF",
1798 "type": "deployment.failed"
1799 }
1800 ```
1801
1802 ### deployment.succeeded
1803
1804 Cloud delivers this event when a deployment completes successfully.
1805
1806 #### Payload
1807
1808 <TypeList
1809 types={[
1810 {
1811 name: "id",
1812 type: "`string`",
1813 description: `Unique identifier for this webhook event.`,
1814 },
1815 {
1816 name: "type",
1817 type: "`string`",
1818 description: `The event type, always "deployment.succeeded".`,
1819 },
1820 {
1821 name: "created_at",
1822 type: "`string`",
1823 description: `ISO 8601 timestamp of when the event was created.`,
1824 },
1825 {
1826 name: "data",
1827 type: "`object`",
1828 description: `The payload of the event.`,
1829 children: [
1830 {
1831 name: "deployment",
1832 type: "`object`",
1833 description: `The deployment that succeeded.`,
1834 children: [
1835 {
1836 name: "id",
1837 type: "`string`",
1838 description: `Unique identifier of the deployment.`,
1839 },
1840 {
1841 name: "status",
1842 type: "`\"succeeded\"`",
1843 description: `Status of the deployment at the time of the event.`,
1844 },
1845 ],
1846 },
1847 {
1848 name: "build",
1849 type: "`object`",
1850 description: `The build associated with this deployment.`,
1851 children: [
1852 {
1853 name: "id",
1854 type: "`string`",
1855 description: `Unique identifier of the build.`,
1856 },
1857 {
1858 name: "commit_hash",
1859 type: "`string`",
1860 description: `Git commit hash of the build.`,
1861 },
1862 {
1863 name: "commit_message",
1864 type: "`string`",
1865 description: `Git commit message of the build. It is an empty string if Medusa doesn't have the message.`,
1866 },
1867 {
1868 name: "commit_author",
1869 type: "`string`",
1870 description: `Author of the git commit. It is an empty string if Medusa doesn't have the author.`,
1871 },
1872 ],
1873 },
1874 {
1875 name: "organization",
1876 type: "`object`",
1877 description: `The organization that owns the project.`,
1878 children: [
1879 {
1880 name: "id",
1881 type: "`string`",
1882 description: `Unique identifier of the organization.`,
1883 },
1884 {
1885 name: "name",
1886 type: "`string`",
1887 description: `Display name of the organization.`,
1888 },
1889 ],
1890 },
1891 {
1892 name: "project",
1893 type: "`object`",
1894 description: `The project the deployment belongs to.`,
1895 children: [
1896 {
1897 name: "id",
1898 type: "`string`",
1899 description: `Unique identifier of the project.`,
1900 },
1901 {
1902 name: "name",
1903 type: "`string`",
1904 description: `Display name of the project.`,
1905 },
1906 {
1907 name: "handle",
1908 type: "`string`",
1909 description: `URL-safe handle of the project.`,
1910 },
1911 {
1912 name: "repository",
1913 type: "`string`",
1914 description: `Git repository URL linked to the project.`,
1915 },
1916 {
1917 name: "region",
1918 type: "`string`",
1919 description: `Deployment region of the project.`,
1920 },
1921 ],
1922 },
1923 {
1924 name: "environment",
1925 type: "`object`",
1926 description: `The environment that was deployed to.`,
1927 children: [
1928 {
1929 name: "id",
1930 type: "`string`",
1931 description: `Unique identifier of the environment.`,
1932 },
1933 {
1934 name: "name",
1935 type: "`string`",
1936 description: `Display name of the environment.`,
1937 },
1938 {
1939 name: "handle",
1940 type: "`string`",
1941 description: `URL-safe handle of the environment.`,
1942 },
1943 {
1944 name: "branch",
1945 type: "`string`",
1946 description: `Git branch associated with this environment.`,
1947 },
1948 ],
1949 },
1950 ],
1951 },
1952 ]}
1953 sectionTitle="deployment.succeeded"
1954 />
1955
1956 #### Example Payload
1957
1958 ```json
1959 {
1960 "created_at": "2024-11-12T10:10:00.000Z",
1961 "data": {
1962 "build": {
1963 "commit_author": "Jane Doe",
1964 "commit_hash": "a1b2c3d4e5f6",
1965 "commit_message": "Add new product feature",
1966 "id": "build_01HXYZ5678ABCDEF"
1967 },
1968 "deployment": {
1969 "id": "depl_01HXYZ6789ABCDEF",
1970 "status": "succeeded"
1971 },
1972 "environment": {
1973 "branch": "main",
1974 "handle": "production",
1975 "id": "projenv_01HXYZ7890ABCDEF",
1976 "name": "Production"
1977 },
1978 "organization": {
1979 "id": "org_01HXYZ9012ABCDEF",
1980 "name": "Acme Corp"
1981 },
1982 "project": {
1983 "handle": "my-storefront",
1984 "id": "proj_01HXYZ3456ABCDEF",
1985 "name": "My Storefront",
1986 "region": "eu-west-1",
1987 "repository": "https://github.com/acme/storefront"
1988 }
1989 },
1990 "id": "whev_01HXYZ6789ABCDEF",
1991 "type": "deployment.succeeded"
1992 }
1993 ```