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": "3e66a697-8af3-4cfe-8cec-17a749ffb3d8",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "e4c06491d7a8ebbb680466e68fe5d74f384f0eb8a6fba171dc2f169af5c75618",
"alert_urgency_id": "c3cc6e38-215b-463b-a9ca-6ae802a34415",
"created_at": "2025-11-27T00:05:30.482-08:00",
"updated_at": "2025-11-27T00:05:30.486-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-27T00:05:30.492-08:00",
"updated_at": "2025-11-27T00:05:30.492-08:00",
"alert_field_id": "4591a238-64fc-41a9-84f8-10b5382f4995",
"alert_field": {
"id": "4591a238-64fc-41a9-84f8-10b5382f4995",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-11-27T00:05:28.713-08:00",
"updated_at": "2025-11-27T00:05:28.713-08:00"
}
},
{
"template_body": null,
"created_at": "2025-11-27T00:05:30.498-08:00",
"updated_at": "2025-11-27T00:05:30.498-08:00",
"alert_field_id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
"alert_field": {
"id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-11-27T00:05:28.707-08:00",
"updated_at": "2025-11-27T00:05:28.707-08:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "aca05857-24b8-4f34-b1e6-e85041542468",
"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": "a8bfca59-be1f-471e-b29f-2ec1c7224af4",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-eac45e119e5daffe988368c8942158d8@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "bd4a7a22-a287-4137-a881-c35a0c4ea145",
"alert_field_id": "4591a238-64fc-41a9-84f8-10b5382f4995",
"alerts_source_id": "3e66a697-8af3-4cfe-8cec-17a749ffb3d8",
"created_at": "2025-11-27T00:05:30.492-08:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-11-27T00:05:30.492-08:00"
},
{
"id": "33c6ad28-425a-40d1-bfc9-d17294546e66",
"alert_field_id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
"alerts_source_id": "3e66a697-8af3-4cfe-8cec-17a749ffb3d8",
"created_at": "2025-11-27T00:05:30.498-08:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-11-27T00:05:30.498-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": "3e66a697-8af3-4cfe-8cec-17a749ffb3d8",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "e4c06491d7a8ebbb680466e68fe5d74f384f0eb8a6fba171dc2f169af5c75618",
"alert_urgency_id": "c3cc6e38-215b-463b-a9ca-6ae802a34415",
"created_at": "2025-11-27T00:05:30.482-08:00",
"updated_at": "2025-11-27T00:05:30.486-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-27T00:05:30.492-08:00",
"updated_at": "2025-11-27T00:05:30.492-08:00",
"alert_field_id": "4591a238-64fc-41a9-84f8-10b5382f4995",
"alert_field": {
"id": "4591a238-64fc-41a9-84f8-10b5382f4995",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-11-27T00:05:28.713-08:00",
"updated_at": "2025-11-27T00:05:28.713-08:00"
}
},
{
"template_body": null,
"created_at": "2025-11-27T00:05:30.498-08:00",
"updated_at": "2025-11-27T00:05:30.498-08:00",
"alert_field_id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
"alert_field": {
"id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-11-27T00:05:28.707-08:00",
"updated_at": "2025-11-27T00:05:28.707-08:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "aca05857-24b8-4f34-b1e6-e85041542468",
"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": "a8bfca59-be1f-471e-b29f-2ec1c7224af4",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-eac45e119e5daffe988368c8942158d8@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "bd4a7a22-a287-4137-a881-c35a0c4ea145",
"alert_field_id": "4591a238-64fc-41a9-84f8-10b5382f4995",
"alerts_source_id": "3e66a697-8af3-4cfe-8cec-17a749ffb3d8",
"created_at": "2025-11-27T00:05:30.492-08:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-11-27T00:05:30.492-08:00"
},
{
"id": "33c6ad28-425a-40d1-bfc9-d17294546e66",
"alert_field_id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
"alerts_source_id": "3e66a697-8af3-4cfe-8cec-17a749ffb3d8",
"created_at": "2025-11-27T00:05:30.498-08:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-11-27T00:05:30.498-08:00"
}
]
}
}
}
}