Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/vnd.api+json
Response
alert source created with resolution rule
Creates a new alert source from provided data
curl --request POST \
--url https://api.rootly.com/v1/alert_sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "alert_sources",
"attributes": {
"name": "<string>",
"source_type": "email",
"alert_urgency_id": "<string>",
"deduplicate_alerts_by_key": true,
"deduplication_key_kind": "payload",
"deduplication_key_path": "<string>",
"deduplication_key_regexp": "<string>",
"owner_group_ids": [
"<string>"
],
"alert_template_attributes": {
"title": "<string>",
"description": "<string>",
"external_url": "<string>"
},
"alert_source_urgency_rules_attributes": [
{
"json_path": "<string>",
"operator": "is",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>",
"kind": "payload",
"alert_urgency_id": "<string>"
}
],
"sourceable_attributes": {
"auto_resolve": true,
"resolve_state": "<string>",
"accept_threaded_emails": true,
"field_mappings_attributes": [
{
"field": "external_id",
"json_path": "<string>"
}
]
},
"resolution_rule_attributes": {
"enabled": true,
"condition_type": "all",
"identifier_matchable_type": "AlertField",
"identifier_matchable_id": "<string>",
"identifier_reference_kind": "payload",
"identifier_json_path": "<string>",
"identifier_value_regex": "<string>",
"conditions_attributes": [
{
"field": "<string>",
"operator": "is",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>",
"kind": "payload"
}
]
},
"alert_source_fields_attributes": [
{
"alert_field_id": "<string>",
"template_body": "<string>"
}
]
}
}
}'
{
"data": {
"id": "7d984781-efc1-4ff8-bd98-7348e2f821b4",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "c64bb280fb643932f7cea033cb454a91ffc687d6cb419d4442b8338762ad5d43",
"alert_urgency_id": "f489535f-996c-4037-a6fd-9dc6a02a4077",
"created_at": "2025-10-10T09:06:25.116-07:00",
"updated_at": "2025-10-10T09:06:25.119-07:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"deduplicate_alerts_by_key": false,
"deduplication_key_kind": "payload",
"deduplication_key_path": null,
"deduplication_key_regexp": null,
"alert_source_urgency_rules_attributes": [],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-10-10T09:06:25.124-07:00",
"updated_at": "2025-10-10T09:06:25.124-07:00",
"alert_field_id": "1771e9f8-a72e-4d24-841d-51b757b3e3b3",
"alert_field": {
"id": "1771e9f8-a72e-4d24-841d-51b757b3e3b3",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-10-10T09:06:23.346-07:00",
"updated_at": "2025-10-10T09:06:23.346-07:00"
}
},
{
"template_body": null,
"created_at": "2025-10-10T09:06:25.128-07:00",
"updated_at": "2025-10-10T09:06:25.128-07:00",
"alert_field_id": "8f7e68c2-69bb-478b-b509-5e528724aa85",
"alert_field": {
"id": "8f7e68c2-69bb-478b-b509-5e528724aa85",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-10-10T09:06:23.340-07:00",
"updated_at": "2025-10-10T09:06:23.340-07:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "84bc36d4-9b3d-4b58-8dc8-5fcb7119bd6f",
"enabled": true,
"condition_type": "all",
"identifier_json_path": "$.email.subject",
"identifier_value_regex": "",
"identifier_matchable_type": null,
"identifier_matchable_id": null,
"identifier_reference_kind": "payload",
"conditions_attributes": [
{
"id": "78d12faf-fbd9-4820-88ad-26e5e273e8cd",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-5a3958573c72981a2332b671c305760c@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "aca10553-050c-4057-bac6-cbcec3b6ac11",
"alert_field_id": "1771e9f8-a72e-4d24-841d-51b757b3e3b3",
"alerts_source_id": "7d984781-efc1-4ff8-bd98-7348e2f821b4",
"created_at": "2025-10-10T09:06:25.124-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-10-10T09:06:25.124-07:00"
},
{
"id": "48c0a254-68de-43dc-91bd-2e47dda64ba5",
"alert_field_id": "8f7e68c2-69bb-478b-b509-5e528724aa85",
"alerts_source_id": "7d984781-efc1-4ff8-bd98-7348e2f821b4",
"created_at": "2025-10-10T09:06:25.128-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-10-10T09:06:25.128-07:00"
}
]
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Show child attributes
alert source created with resolution rule
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.rootly.com/v1/alert_sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"data": {
"type": "alert_sources",
"attributes": {
"name": "<string>",
"source_type": "email",
"alert_urgency_id": "<string>",
"deduplicate_alerts_by_key": true,
"deduplication_key_kind": "payload",
"deduplication_key_path": "<string>",
"deduplication_key_regexp": "<string>",
"owner_group_ids": [
"<string>"
],
"alert_template_attributes": {
"title": "<string>",
"description": "<string>",
"external_url": "<string>"
},
"alert_source_urgency_rules_attributes": [
{
"json_path": "<string>",
"operator": "is",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>",
"kind": "payload",
"alert_urgency_id": "<string>"
}
],
"sourceable_attributes": {
"auto_resolve": true,
"resolve_state": "<string>",
"accept_threaded_emails": true,
"field_mappings_attributes": [
{
"field": "external_id",
"json_path": "<string>"
}
]
},
"resolution_rule_attributes": {
"enabled": true,
"condition_type": "all",
"identifier_matchable_type": "AlertField",
"identifier_matchable_id": "<string>",
"identifier_reference_kind": "payload",
"identifier_json_path": "<string>",
"identifier_value_regex": "<string>",
"conditions_attributes": [
{
"field": "<string>",
"operator": "is",
"value": "<string>",
"conditionable_type": "AlertField",
"conditionable_id": "<string>",
"kind": "payload"
}
]
},
"alert_source_fields_attributes": [
{
"alert_field_id": "<string>",
"template_body": "<string>"
}
]
}
}
}'
{
"data": {
"id": "7d984781-efc1-4ff8-bd98-7348e2f821b4",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "c64bb280fb643932f7cea033cb454a91ffc687d6cb419d4442b8338762ad5d43",
"alert_urgency_id": "f489535f-996c-4037-a6fd-9dc6a02a4077",
"created_at": "2025-10-10T09:06:25.116-07:00",
"updated_at": "2025-10-10T09:06:25.119-07:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"deduplicate_alerts_by_key": false,
"deduplication_key_kind": "payload",
"deduplication_key_path": null,
"deduplication_key_regexp": null,
"alert_source_urgency_rules_attributes": [],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-10-10T09:06:25.124-07:00",
"updated_at": "2025-10-10T09:06:25.124-07:00",
"alert_field_id": "1771e9f8-a72e-4d24-841d-51b757b3e3b3",
"alert_field": {
"id": "1771e9f8-a72e-4d24-841d-51b757b3e3b3",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-10-10T09:06:23.346-07:00",
"updated_at": "2025-10-10T09:06:23.346-07:00"
}
},
{
"template_body": null,
"created_at": "2025-10-10T09:06:25.128-07:00",
"updated_at": "2025-10-10T09:06:25.128-07:00",
"alert_field_id": "8f7e68c2-69bb-478b-b509-5e528724aa85",
"alert_field": {
"id": "8f7e68c2-69bb-478b-b509-5e528724aa85",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-10-10T09:06:23.340-07:00",
"updated_at": "2025-10-10T09:06:23.340-07:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "84bc36d4-9b3d-4b58-8dc8-5fcb7119bd6f",
"enabled": true,
"condition_type": "all",
"identifier_json_path": "$.email.subject",
"identifier_value_regex": "",
"identifier_matchable_type": null,
"identifier_matchable_id": null,
"identifier_reference_kind": "payload",
"conditions_attributes": [
{
"id": "78d12faf-fbd9-4820-88ad-26e5e273e8cd",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-5a3958573c72981a2332b671c305760c@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "aca10553-050c-4057-bac6-cbcec3b6ac11",
"alert_field_id": "1771e9f8-a72e-4d24-841d-51b757b3e3b3",
"alerts_source_id": "7d984781-efc1-4ff8-bd98-7348e2f821b4",
"created_at": "2025-10-10T09:06:25.124-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-10-10T09:06:25.124-07:00"
},
{
"id": "48c0a254-68de-43dc-91bd-2e47dda64ba5",
"alert_field_id": "8f7e68c2-69bb-478b-b509-5e528724aa85",
"alerts_source_id": "7d984781-efc1-4ff8-bd98-7348e2f821b4",
"created_at": "2025-10-10T09:06:25.128-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-10-10T09:06:25.128-07:00"
}
]
}
}
}
}