Skip to content

Commit 1500353

Browse files
committed
update webhook docs
1 parent e377306 commit 1500353

3 files changed

Lines changed: 264 additions & 161 deletions

File tree

en/on-call/integration/webhooks/incident-webhook.mdx

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<Tip>**Plan requirement**: This feature requires an On-call Standard or higher subscription. [Learn more](https://flashcat.cloud/flashduty/price/)</Tip>
2-
31
Configure incident Webhook. When specific operations occur on incidents (such as trigger or close), the system makes an HTTP callback to your configured address. The callback content includes the incident's latest key information, allowing integration with your custom tools.
42

53
<span id="EventTypes"></span>
@@ -14,6 +12,7 @@ The following event types are currently supported; more may be added in the futu
1412
| :----------: | :--------------- |
1513
| i_new | Create incident (auto or manual) |
1614
| i_assign | Assign incident (auto or manual) |
15+
| i_a_rspd | Add responders |
1716
| i_snooze | Manually snooze incident |
1817
| i_wake | Cancel snooze |
1918
| i_ack | Manually acknowledge incident |
@@ -203,7 +202,6 @@ Enter the integration name and description for easy management.
203202

204203
| Config Item | Description |
205204
| :--- | :--- |
206-
| **Managing Team** | Select the team that manages this integration; only team members can edit the integration configuration |
207205
| **Endpoint** | HTTP/HTTPS address to receive callbacks, must start with `http://` or `https://` |
208206
| **TLS Verification** | Enabled by default. When disabled, TLS certificate verification of the target server is skipped; suitable for test environments or self-signed certificates |
209207
| **Headers** | Custom request headers in Key-Value format; multiple headers supported |
@@ -214,6 +212,44 @@ Enter the integration name and description for easy management.
214212
Disabling TLS certificate verification may expose you to man-in-the-middle attacks. Only disable it in test environments or when using self-signed certificates.
215213
</Warning>
216214

215+
### Custom request body
216+
217+
By default, the system pushes the complete JSON data following the [Payload structure](#request-payload) described above. If your receiver requires a specific data format, you can use a **custom request body** to reorganize the push content.
218+
219+
Use `{{field.path}}` syntax to reference any field from the default Payload. The system replaces variables with actual values at push time.
220+
221+
**Variable syntax:**
222+
223+
- Use `.` to separate path levels, e.g. `{{incident.title}}` references the incident title
224+
- Array index access is supported, e.g. `{{incident.responders.0.email}}` references the first responder's email
225+
- When the entire value is a single variable (e.g. `"{{incident.labels}}"`), the original data type is preserved (object, array, number, etc.)
226+
- When a variable is mixed with other text (e.g. `"Incident: {{incident.title}}"`), the variable is converted to a string for concatenation
227+
228+
**Example:**
229+
230+
Transform the default Payload into a custom format for an internal system:
231+
232+
```json
233+
{
234+
"msg_type": "incident",
235+
"event": "{{event_type}}",
236+
"content": {
237+
"id": "{{incident.incident_id}}",
238+
"name": "{{incident.title}}",
239+
"severity": "{{incident.incident_severity}}",
240+
"status": "{{incident.progress}}",
241+
"channel": "{{incident.channel_name}}",
242+
"url": "{{incident.detail_url}}",
243+
"labels": "{{incident.labels}}",
244+
"responders": "{{incident.responders}}"
245+
}
246+
}
247+
```
248+
249+
<Tip>
250+
If a variable path does not exist in the default Payload, the system keeps the original `{{...}}` text without replacement. It is recommended to first check the actual default Payload via invocation history to confirm available field paths.
251+
</Tip>
252+
217253
## 4. Invocation History
218254

219255
Incident Webhook provides a complete invocation history, helping you troubleshoot push delivery and debug callback interfaces.

0 commit comments

Comments
 (0)