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": "a7ba27d9-1906-47f7-b31d-08165633b208",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "5495ae30d95e001006ea9d400e0a31abae03b64ed061cce1fdbcc0a8e952649b",
"alert_urgency_id": "e1a48834-e722-4a2d-a6cf-6505e173be04",
"created_at": "2025-11-20T01:35:08.143-08:00",
"updated_at": "2025-11-20T01:35:08.150-08:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"alert_source_urgency_rules_attributes": [],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-11-20T01:35:08.159-08:00",
"updated_at": "2025-11-20T01:35:08.159-08:00",
"alert_field_id": "7ba95916-a2a9-4965-a745-65d842f6e726",
"alert_field": {
"id": "7ba95916-a2a9-4965-a745-65d842f6e726",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-11-20T01:35:05.835-08:00",
"updated_at": "2025-11-20T01:35:05.835-08:00"
}
},
{
"template_body": null,
"created_at": "2025-11-20T01:35:08.167-08:00",
"updated_at": "2025-11-20T01:35:08.167-08:00",
"alert_field_id": "448ae5ea-70e5-4f24-b4d1-c0266d5d71ba",
"alert_field": {
"id": "448ae5ea-70e5-4f24-b4d1-c0266d5d71ba",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-11-20T01:35:05.828-08:00",
"updated_at": "2025-11-20T01:35:05.828-08:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "a9579cbe-dbca-44f7-bf8a-a721b90bb4fa",
"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": "11387fb8-fa69-443b-8cd5-310e9b0b2a68",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-6d54acb8c7094e55484a1b9bf2f4700a@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "5c82a6cf-b174-4af3-b660-ff880e28482e",
"alert_field_id": "7ba95916-a2a9-4965-a745-65d842f6e726",
"alerts_source_id": "a7ba27d9-1906-47f7-b31d-08165633b208",
"created_at": "2025-11-20T01:35:08.159-08:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-11-20T01:35:08.159-08:00"
},
{
"id": "083ea3ca-1b65-43b8-8e3e-63b8d5763435",
"alert_field_id": "448ae5ea-70e5-4f24-b4d1-c0266d5d71ba",
"alerts_source_id": "a7ba27d9-1906-47f7-b31d-08165633b208",
"created_at": "2025-11-20T01:35:08.167-08:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-11-20T01:35:08.167-08: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": "a7ba27d9-1906-47f7-b31d-08165633b208",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "5495ae30d95e001006ea9d400e0a31abae03b64ed061cce1fdbcc0a8e952649b",
"alert_urgency_id": "e1a48834-e722-4a2d-a6cf-6505e173be04",
"created_at": "2025-11-20T01:35:08.143-08:00",
"updated_at": "2025-11-20T01:35:08.150-08:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"alert_source_urgency_rules_attributes": [],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-11-20T01:35:08.159-08:00",
"updated_at": "2025-11-20T01:35:08.159-08:00",
"alert_field_id": "7ba95916-a2a9-4965-a745-65d842f6e726",
"alert_field": {
"id": "7ba95916-a2a9-4965-a745-65d842f6e726",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-11-20T01:35:05.835-08:00",
"updated_at": "2025-11-20T01:35:05.835-08:00"
}
},
{
"template_body": null,
"created_at": "2025-11-20T01:35:08.167-08:00",
"updated_at": "2025-11-20T01:35:08.167-08:00",
"alert_field_id": "448ae5ea-70e5-4f24-b4d1-c0266d5d71ba",
"alert_field": {
"id": "448ae5ea-70e5-4f24-b4d1-c0266d5d71ba",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-11-20T01:35:05.828-08:00",
"updated_at": "2025-11-20T01:35:05.828-08:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "a9579cbe-dbca-44f7-bf8a-a721b90bb4fa",
"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": "11387fb8-fa69-443b-8cd5-310e9b0b2a68",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-6d54acb8c7094e55484a1b9bf2f4700a@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "5c82a6cf-b174-4af3-b660-ff880e28482e",
"alert_field_id": "7ba95916-a2a9-4965-a745-65d842f6e726",
"alerts_source_id": "a7ba27d9-1906-47f7-b31d-08165633b208",
"created_at": "2025-11-20T01:35:08.159-08:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-11-20T01:35:08.159-08:00"
},
{
"id": "083ea3ca-1b65-43b8-8e3e-63b8d5763435",
"alert_field_id": "448ae5ea-70e5-4f24-b4d1-c0266d5d71ba",
"alerts_source_id": "a7ba27d9-1906-47f7-b31d-08165633b208",
"created_at": "2025-11-20T01:35:08.167-08:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-11-20T01:35:08.167-08:00"
}
]
}
}
}
}