Skip to main content
POST
Upsert enrichment rules

Restrictions

Usage

  • rules replaces the stored rule set as a whole; send [] to remove all rules.
  • The integration must exist (InvalidParameter otherwise) and the caller must be allowed to edit it: an account admin, the integration’s creator, someone who can edit its channel (for an integration inside a channel), or a member of its owning team. Integrations with no team and no channel can be edited by any member. Others get AccessDenied.
  • Rules run in array order on every incoming alert and change event, and each rule sees the labels written by the rules before it. A rule whose if conditions do not all match is skipped; a rule that fails at run time (no regex match, lookup miss, API error) is skipped without affecting the event.
  • Condition keys in if must be alert or change event keys (for example title, description, labels.<name>); other keys return InvalidParameter.
  • schema_id and api_id are not checked on save; a rule pointing at a missing or deleted schema or API does nothing at run time. mapping rules with mapping_type = api run for alert events only.
  • Every call is recorded in the account audit log. Don’t put secrets in request fields.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json
integration_id
integer<int64>
required

Integration ID to configure enrichment rules for.

rules
object[]
required

Ordered rule list that replaces the integration's whole rule set; send [] to remove all rules. Rules run in this order. At most 100 items per request; split larger sets into several calls.

Maximum array length: 100

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

No payload. Depending on the operation, data is {} or omitted from the envelope; rely only on the HTTP 200 status and the absence of error.