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>",
"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": "61f3b02c-aa3b-4d3c-ab1a-3e9d17a30561",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "04fc5b9423ec43081e0837f746b98b381fc786b7e75695c2628d85eae53cc376",
"alert_urgency_id": "1488e760-6e85-49cc-9aae-f78ebd0af30f",
"created_at": "2025-09-18T20:52:26.520-07:00",
"updated_at": "2025-09-18T20:52:26.525-07: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-09-18T20:52:26.531-07:00",
"updated_at": "2025-09-18T20:52:26.531-07:00",
"alert_field_id": "c5b10871-0db9-43e7-9570-bfd767e354db",
"alert_field": {
"id": "c5b10871-0db9-43e7-9570-bfd767e354db",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-09-18T20:52:24.319-07:00",
"updated_at": "2025-09-18T20:52:24.319-07:00"
}
},
{
"template_body": null,
"created_at": "2025-09-18T20:52:26.535-07:00",
"updated_at": "2025-09-18T20:52:26.535-07:00",
"alert_field_id": "559ca41d-35e4-45b1-bc30-3e721b223d43",
"alert_field": {
"id": "559ca41d-35e4-45b1-bc30-3e721b223d43",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-09-18T20:52:24.314-07:00",
"updated_at": "2025-09-18T20:52:24.314-07:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "d04e4553-6bd5-4125-b207-a10b81da2400",
"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": "17fe5f7d-bc13-460d-90ff-42bc94c5a438",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-7761c9bdf5564dda19df8eae9d6483f8@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "9bde9a5c-8dcc-4186-ba0d-07e322560845",
"alert_field_id": "c5b10871-0db9-43e7-9570-bfd767e354db",
"alerts_source_id": "61f3b02c-aa3b-4d3c-ab1a-3e9d17a30561",
"created_at": "2025-09-18T20:52:26.531-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-09-18T20:52:26.531-07:00"
},
{
"id": "0e741d72-a8a6-42b6-84bb-1d3442717f7a",
"alert_field_id": "559ca41d-35e4-45b1-bc30-3e721b223d43",
"alerts_source_id": "61f3b02c-aa3b-4d3c-ab1a-3e9d17a30561",
"created_at": "2025-09-18T20:52:26.535-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-09-18T20:52:26.535-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>",
"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": "61f3b02c-aa3b-4d3c-ab1a-3e9d17a30561",
"type": "alert_sources",
"attributes": {
"name": "Email Source 1",
"source_type": "email",
"status": "setup_incomplete",
"secret": "04fc5b9423ec43081e0837f746b98b381fc786b7e75695c2628d85eae53cc376",
"alert_urgency_id": "1488e760-6e85-49cc-9aae-f78ebd0af30f",
"created_at": "2025-09-18T20:52:26.520-07:00",
"updated_at": "2025-09-18T20:52:26.525-07: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-09-18T20:52:26.531-07:00",
"updated_at": "2025-09-18T20:52:26.531-07:00",
"alert_field_id": "c5b10871-0db9-43e7-9570-bfd767e354db",
"alert_field": {
"id": "c5b10871-0db9-43e7-9570-bfd767e354db",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-09-18T20:52:24.319-07:00",
"updated_at": "2025-09-18T20:52:24.319-07:00"
}
},
{
"template_body": null,
"created_at": "2025-09-18T20:52:26.535-07:00",
"updated_at": "2025-09-18T20:52:26.535-07:00",
"alert_field_id": "559ca41d-35e4-45b1-bc30-3e721b223d43",
"alert_field": {
"id": "559ca41d-35e4-45b1-bc30-3e721b223d43",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-09-18T20:52:24.314-07:00",
"updated_at": "2025-09-18T20:52:24.314-07:00"
}
}
],
"sourceable_attributes": null,
"alert_template_attributes": null,
"resolution_rule_attributes": {
"id": "d04e4553-6bd5-4125-b207-a10b81da2400",
"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": "17fe5f7d-bc13-460d-90ff-42bc94c5a438",
"field": "$.email.subject",
"operator": "is",
"value": "Resolved",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
]
},
"email": "email-source-7761c9bdf5564dda19df8eae9d6483f8@test.email.rootly.com",
"accept_threaded_emails": false
},
"relationships": {
"alert_source_urgency_rules": {
"data": []
},
"alert_source_fields": {
"data": [
{
"id": "9bde9a5c-8dcc-4186-ba0d-07e322560845",
"alert_field_id": "c5b10871-0db9-43e7-9570-bfd767e354db",
"alerts_source_id": "61f3b02c-aa3b-4d3c-ab1a-3e9d17a30561",
"created_at": "2025-09-18T20:52:26.531-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-09-18T20:52:26.531-07:00"
},
{
"id": "0e741d72-a8a6-42b6-84bb-1d3442717f7a",
"alert_field_id": "559ca41d-35e4-45b1-bc30-3e721b223d43",
"alerts_source_id": "61f3b02c-aa3b-4d3c-ab1a-3e9d17a30561",
"created_at": "2025-09-18T20:52:26.535-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-09-18T20:52:26.535-07:00"
}
]
}
}
}
}