1. Create Action
- Login to Flashduty console, go to Integration Center - Webhook
- Click to add Custom Action integration
- Configure Action Name—this name will appear as a button in incident details
- Configure Managing Team—select the team that manages this integration; only team members can edit the integration configuration
- Configure Channels—you can configure multiple, but each channel can have at most 5 Custom Actions
- Configure Endpoint and custom Headers
- TLS Verification is enabled by default. If the target service uses a self-signed certificate or a certificate issued by an internal CA, you can disable the TLS Verification toggle so the system will not validate the server certificate
- Save to complete
2. Push Description
Request Method
POST, Content-Type:“application/json”
Request Payload:
| Field | Type | Required | Description |
|---|---|---|---|
| event_time | int64 | Yes | Event timestamp in milliseconds |
| event_type | string | Yes | Event type, fixed value i_custom |
| event_id | string | Yes | Event ID, the same event may retry multiple times due to timeout, receiver needs to deduplicate |
| person | Person | No | Operator, only exists for human actions |
| incident | Incident | Yes | Incident details |
| Field | Type | Required | Description |
|---|---|---|---|
| person_id | int64 | Yes | Person ID |
| person_name | string | Yes | Person name |
| string | Yes | Email address |
| Field | Type | Required | Description |
|---|---|---|---|
| person_id | int64 | Yes | Person ID |
| person_name | string | Yes | Person name |
| string | Yes | Email address | |
| assigned_at | int64 | No | Assignment time |
| acknowledged_at | int64 | No | Acknowledgment time |
| Field | Type | Required | Description |
|---|---|---|---|
| incident_id | string | Yes | Incident ID |
| title | string | Yes | Incident title |
| description | string | No | Incident description |
| impact | string | No | Incident impact |
| root_cause | string | No | Incident root cause |
| resolution | string | No | Incident resolution |
| incident_severity | string | Yes | Severity, enum: Critical, Warning, Info |
| incident_status | string | Yes | Incident status, enum: Critical, Warning, Info, Ok |
| progress | string | Yes | Progress, enum: Triggered, Processing, Closed |
| created_at | int64 | Yes | Created time |
| updated_at | int64 | Yes | Updated time |
| start_time | int64 | Yes | Trigger time, Unix seconds timestamp |
| last_time | int64 | No | Latest event time, latest event push time in associated alerts, Unix seconds timestamp, default 0 |
| end_time | int64 | No | Recovery time, incident auto-recovers when all associated alerts recover, Unix seconds timestamp, default 0 |
| ack_time | int64 | No | First acknowledgment time, incident can be acknowledged by multiple people, this is the earliest acknowledgment time. Unix seconds timestamp, default 0 |
| close_time | int64 | No | Close time, end_time represents incident recovery time, close_time represents progress close time, incident closes when recovered, closing doesn’t affect recovery. Unix seconds timestamp, default 0 |
| snoozed_before | int64 | No | Snooze deadline |
| labels | map[string]string | No | Label KV, both Key and Value are strings. Not present for manual creation, for auto creation it’s the labels of the first grouped alert |
| fields | map[string]interface | No | Custom field KV, Key is string, Value can be any type depending on field type |
| creator | Person | No | Creator info, only exists for manually created incidents |
| closer | Person | No | Closer info, only exists for manually closed incidents |
| responders | []Responder | No | Responders list |
| alerts | Alert | No | Associated alerts |
| alert_cnt | int64 | No | Associated alert count |
| channel_id | int64 | No | Channel ID, 0 means not belonging to any channel |
| channel_name | string | No | Channel name |
| detail_url | string | Yes | Detail URL |
| group_method | string | No | Grouping method, enum: n: no grouping, p: rule-based grouping, i: intelligent grouping |
| Field | Type | Required | Description |
|---|---|---|---|
| alert_id | string | Yes | Alert ID |
| data_source_id | int64 | Yes | Integration ID |
| title | string | Yes | Alert title |
| description | string | No | Alert description |
| alert_key | string | Yes | Alert association key |
| alert_severity | string | Yes | Severity, enum: Critical, Warning, Info |
| alert_status | string | Yes | Alert status, enum: Critical, Warning, Info, Ok |
| progress | string | Yes | Progress, enum: Triggered, Closed |
| created_at | int64 | Yes | Created time |
| updated_at | int64 | Yes | Updated time |
| start_time | int64 | Yes | First trigger time (time of first event received by platform), Unix seconds timestamp |
| last_time | int64 | Yes | Latest event time (time of latest event received by platform), Unix seconds timestamp |
| end_time | int64 | No | Alert recovery time (time platform last received end-type event), Unix seconds timestamp, default 0 |
| close_time | int64 | No | Close time, different from end_time, this is progress close, doesn’t mean alert truly recovered. Unix seconds timestamp, default 0 |
| labels | map[string]string | No | Label KV, both Key and Value are strings |
Request Response
HTTP status code 200 indicates successful push.Request Example
3. Custom Request Body and Value Mapping
Custom request body (custom_body)
By default, the system pushes the complete JSON data following the Payload structure described above. If your receiver requires a specific data format, you can use a custom request body to reorganize the push content. Use{{field.path}} syntax to reference any field from the default Payload. The system replaces variables with actual values at push time.
Variable syntax:
- Use
.to separate path levels, e.g.{{incident.title}}references the incident title - Array index access is supported, e.g.
{{incident.responders.0.email}}references the first responder’s email - When the entire value is a single variable (e.g.
"{{incident.labels}}"), the original data type is preserved (object, array, number, etc.) - When a variable is mixed with other text (e.g.
"Incident: {{incident.title}}"), the variable is converted to a string for concatenation
Value mapping (value_mapping)
Value mapping automatically transforms field values during variable resolution in the custom request body. Value mapping is configured per field path. Example:"severity": "{{incident.incident_severity}}" in the custom request body, when the incident severity is Critical, the severity field in the push result will be P0. Values that do not match any mapping are sent as-is.
4. Use Cases
Restart Host
When host memory or CPU is maxed out, trigger a host restart script to quickly complete the restart.Information Enrichment
When an incident occurs, callback to your service to retrieve Tracing, Logging, topology and other information based on alert details, then proactively call Flashduty Open API to update incident information, such as adding labels or setting custom fields, to assist troubleshooting.Rollback Changes
When an incident occurs, if it’s determined to be caused by a change, directly trigger a callback to your deployment platform to start the rollback process and accelerate incident recovery.Update Status Page
When an incident is confirmed to impact production services, trigger external status page updates to promptly notify your customers or upstream/downstream parties.5. FAQ
-
Is there a response timeout?
- Service needs to return response within 1 second; exceeding 1 second is considered a failure
- Will pushes continue after failure?
- context deadline exceeded (excluding awaiting headers)
- i/o timeout
- eof
- Trusted IP whitelist for push source?
- May be updated in the future, please check regularly