Create e-mail integration

Returns either a newly created e-mail integration, or validation errors.

POST https://incidents.betterstack.com/api/v2/email-integrations

Headers

Authorization
required string
Content-Type
string

Body parameters

team_name
string
name
string
policy_id
string
call
boolean
sms
boolean
email
boolean
push
boolean
critical_alert
boolean
team_wait
integer
recovery_period
integer
paused
boolean
started_rule_type
string
acknowledged_rule_type
string
resolved_rule_type
string
started_rules
array
started_rules[].rule_target
required string
started_rules[].match_type
required string
started_rules[].content
required string
acknowledged_rules
array
resolved_rules
array
cause_field
object
cause_field.field_target
required string
cause_field.match_type
required string
cause_field.content
string
cause_field.content_before
string
cause_field.content_after
string
title_field
object
started_alert_id_field
object
acknowledged_alert_id_field
object
resolved_alert_id_field
object
other_started_fields
array
other_started_fields[].name
required string
other_acknowledged_fields
array
other_resolved_fields
array
201

Response body

{
  "data": {
    "id": "13756",
    "type": "email_integration",
    "attributes": {
      "name": "Test",
      "created_at": "2023-01-19T11:20:50.675Z",
      "updated_at": "2023-01-19T11:20:50.675Z",
      "policy_id": null,
      "call": false,
      "sms": false,
      "email": true,
      "push": true,
      "critical_alert": false,
      "team_wait": null,
      "recovery_period": 180,
      "email_address": "test@incidents.uptime.betterstack.com",
      "paused": false,
      "started_rule_type": "unused",
      "acknowledged_rule_type": "unused",
      "resolved_rule_type": "unused",
      "started_rules": [],
      "acknowledged_rules": [],
      "resolved_rules": [],
      "cause_field": {
        "name": null,
        "special_type": "cause",
        "field_target": "subject",
        "match_type": "match_everything",
        "content": null,
        "content_before": null,
        "content_after": null
      },
      "title_field": null,
      "started_alert_id_field": null,
      "acknowledged_alert_id_field": null,
      "resolved_alert_id_field": null,
      "other_started_fields": null,
      "other_acknowledged_fields": null,
      "other_resolved_fields": null
    }
  }
}

Example cURL

Example
curl -X "POST" "https://incidents.betterstack.com/api/v2/email-integrations/" \
     -H "Authorization: Bearer $TOKEN" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "name": "Test"
}'