@@ -94,3 +94,292 @@ export async function action({ request }: ActionFunctionArgs) {
94
94
}
95
95
}
96
96
```
97
+
98
+ ### Common properties
99
+
100
+ When you create a webhook alert, you'll receive different payloads depending on the type of alert. All webhooks share some common properties:
101
+
102
+ <ParamField path = " id" type = " string" >
103
+ A unique identifier for this webhook event
104
+ </ParamField >
105
+
106
+ <ParamField path = " created" type = " datetime" >
107
+ When this webhook event was created
108
+ </ParamField >
109
+
110
+ <ParamField path = " webhookVersion" type = " string" >
111
+ The version of the webhook payload format
112
+ </ParamField >
113
+
114
+ <ParamField path = " type" type = " string" >
115
+ The type of alert webhook. One of: ` alert.run.failed ` , ` alert.deployment.success ` , or ` alert.deployment.failed `
116
+ </ParamField >
117
+
118
+ ### Run Failed Alert
119
+
120
+ This webhook is sent when a run fails. The payload is available on the ` object ` property:
121
+
122
+ <ParamField path = " object.task.id" type = " string" >
123
+ Unique identifier for the task
124
+ </ParamField >
125
+
126
+ <ParamField path = " object.task.filePath" type = " string" >
127
+ File path where the task is defined
128
+ </ParamField >
129
+
130
+ <ParamField path = " object.task.exportName" type = " string" >
131
+ Name of the exported task function
132
+ </ParamField >
133
+
134
+ <ParamField path = " object.task.version" type = " string" >
135
+ Version of the task
136
+ </ParamField >
137
+
138
+ <ParamField path = " object.task.sdkVersion" type = " string" >
139
+ Version of the SDK used
140
+ </ParamField >
141
+
142
+ <ParamField path = " object.task.cliVersion" type = " string" >
143
+ Version of the CLI used
144
+ </ParamField >
145
+
146
+ <ParamField path = " object.run.id" type = " string" >
147
+ Unique identifier for the run
148
+ </ParamField >
149
+
150
+ <ParamField path = " object.run.number" type = " number" >
151
+ Run number
152
+ </ParamField >
153
+
154
+ <ParamField path = " object.run.status" type = " string" >
155
+ Current status of the run
156
+ </ParamField >
157
+
158
+ <ParamField path = " object.run.createdAt" type = " datetime" >
159
+ When the run was created
160
+ </ParamField >
161
+
162
+ <ParamField path = " object.run.startedAt" type = " datetime" >
163
+ When the run started executing
164
+ </ParamField >
165
+
166
+ <ParamField path = " object.run.completedAt" type = " datetime" >
167
+ When the run finished executing
168
+ </ParamField >
169
+
170
+ <ParamField path = " object.run.isTest" type = " boolean" >
171
+ Whether this is a test run
172
+ </ParamField >
173
+
174
+ <ParamField path = " object.run.idempotencyKey" type = " string" >
175
+ Idempotency key for the run
176
+ </ParamField >
177
+
178
+ <ParamField path = " object.run.tags" type = " string[]" >
179
+ Associated tags
180
+ </ParamField >
181
+
182
+ <ParamField path = " object.run.error" type = " object" >
183
+ Error information
184
+ </ParamField >
185
+
186
+ <ParamField path = " object.run.isOutOfMemoryError" type = " boolean" >
187
+ Whether the run was an out-of-memory error
188
+ </ParamField >
189
+
190
+ <ParamField path = " object.run.machine" type = " string" >
191
+ Machine preset used for the run
192
+ </ParamField >
193
+
194
+ <ParamField path = " object.run.dashboardUrl" type = " string" >
195
+ URL to view the run in the dashboard
196
+ </ParamField >
197
+
198
+ <ParamField path = " object.environment.id" type = " string" >
199
+ Environment ID
200
+ </ParamField >
201
+
202
+ <ParamField path = " object.environment.type" type = " string" >
203
+ Environment type (STAGING or PRODUCTION)
204
+ </ParamField >
205
+
206
+ <ParamField path = " object.environment.slug" type = " string" >
207
+ Environment slug
208
+ </ParamField >
209
+
210
+ <ParamField path = " object.organization.id" type = " string" >
211
+ Organization ID
212
+ </ParamField >
213
+
214
+ <ParamField path = " object.organization.slug" type = " string" >
215
+ Organization slug
216
+ </ParamField >
217
+
218
+ <ParamField path = " object.organization.name" type = " string" >
219
+ Organization name
220
+ </ParamField >
221
+
222
+ <ParamField path = " object.project.id" type = " string" >
223
+ Project ID
224
+ </ParamField >
225
+
226
+ <ParamField path = " object.project.ref" type = " string" >
227
+ Project reference
228
+ </ParamField >
229
+
230
+ <ParamField path = " object.project.slug" type = " string" >
231
+ Project slug
232
+ </ParamField >
233
+
234
+ <ParamField path = " object.project.name" type = " string" >
235
+ Project name
236
+ </ParamField >
237
+
238
+ ### Deployment Success Alert
239
+
240
+ This webhook is sent when a deployment succeeds. The payload is available on the ` object ` property:
241
+
242
+ <ParamField path = " object.deployment.id" type = " string" >
243
+ Deployment ID
244
+ </ParamField >
245
+
246
+ <ParamField path = " object.deployment.status" type = " string" >
247
+ Deployment status
248
+ </ParamField >
249
+
250
+ <ParamField path = " object.deployment.version" type = " string" >
251
+ Deployment version
252
+ </ParamField >
253
+
254
+ <ParamField path = " object.deployment.shortCode" type = " string" >
255
+ Short code identifier
256
+ </ParamField >
257
+
258
+ <ParamField path = " object.deployment.deployedAt" type = " datetime" >
259
+ When the deployment completed
260
+ </ParamField >
261
+
262
+ <ParamField path = " object.tasks" type = " array" >
263
+ Array of deployed tasks with properties: id, filePath, exportName, and triggerSource
264
+ </ParamField >
265
+
266
+ <ParamField path = " object.environment.id" type = " string" >
267
+ Environment ID
268
+ </ParamField >
269
+
270
+ <ParamField path = " object.environment.type" type = " string" >
271
+ Environment type (STAGING or PRODUCTION)
272
+ </ParamField >
273
+
274
+ <ParamField path = " object.environment.slug" type = " string" >
275
+ Environment slug
276
+ </ParamField >
277
+
278
+ <ParamField path = " object.organization.id" type = " string" >
279
+ Organization ID
280
+ </ParamField >
281
+
282
+ <ParamField path = " object.organization.slug" type = " string" >
283
+ Organization slug
284
+ </ParamField >
285
+
286
+ <ParamField path = " object.organization.name" type = " string" >
287
+ Organization name
288
+ </ParamField >
289
+
290
+ <ParamField path = " object.project.id" type = " string" >
291
+ Project ID
292
+ </ParamField >
293
+
294
+ <ParamField path = " object.project.ref" type = " string" >
295
+ Project reference
296
+ </ParamField >
297
+
298
+ <ParamField path = " object.project.slug" type = " string" >
299
+ Project slug
300
+ </ParamField >
301
+
302
+ <ParamField path = " object.project.name" type = " string" >
303
+ Project name
304
+ </ParamField >
305
+
306
+ ### Deployment Failed Alert
307
+
308
+ This webhook is sent when a deployment fails. The payload is available on the ` object ` property:
309
+
310
+ <ParamField path = " object.deployment.id" type = " string" >
311
+ Deployment ID
312
+ </ParamField >
313
+
314
+ <ParamField path = " object.deployment.status" type = " string" >
315
+ Deployment status
316
+ </ParamField >
317
+
318
+ <ParamField path = " object.deployment.version" type = " string" >
319
+ Deployment version
320
+ </ParamField >
321
+
322
+ <ParamField path = " object.deployment.shortCode" type = " string" >
323
+ Short code identifier
324
+ </ParamField >
325
+
326
+ <ParamField path = " object.deployment.failedAt" type = " datetime" >
327
+ When the deployment failed
328
+ </ParamField >
329
+
330
+ <ParamField path = " object.error.name" type = " string" >
331
+ Error name
332
+ </ParamField >
333
+
334
+ <ParamField path = " object.error.message" type = " string" >
335
+ Error message
336
+ </ParamField >
337
+
338
+ <ParamField path = " object.error.stack" type = " string" >
339
+ Error stack trace (optional)
340
+ </ParamField >
341
+
342
+ <ParamField path = " object.error.stderr" type = " string" >
343
+ Standard error output (optional)
344
+ </ParamField >
345
+
346
+ <ParamField path = " object.environment.id" type = " string" >
347
+ Environment ID
348
+ </ParamField >
349
+
350
+ <ParamField path = " object.environment.type" type = " string" >
351
+ Environment type (STAGING or PRODUCTION)
352
+ </ParamField >
353
+
354
+ <ParamField path = " object.environment.slug" type = " string" >
355
+ Environment slug
356
+ </ParamField >
357
+
358
+ <ParamField path = " object.organization.id" type = " string" >
359
+ Organization ID
360
+ </ParamField >
361
+
362
+ <ParamField path = " object.organization.slug" type = " string" >
363
+ Organization slug
364
+ </ParamField >
365
+
366
+ <ParamField path = " object.organization.name" type = " string" >
367
+ Organization name
368
+ </ParamField >
369
+
370
+ <ParamField path = " object.project.id" type = " string" >
371
+ Project ID
372
+ </ParamField >
373
+
374
+ <ParamField path = " object.project.ref" type = " string" >
375
+ Project reference
376
+ </ParamField >
377
+
378
+ <ParamField path = " object.project.slug" type = " string" >
379
+ Project slug
380
+ </ParamField >
381
+
382
+ <ParamField path = " object.project.name" type = " string" >
383
+ Project name
384
+ </ParamField >
385
+
0 commit comments