API Reference · Alerting · Alert sources
Create alert source
Mutation
createAlertSourceCreates an alert source.
createAlertSource(
organizationId: ID!
sourceSpec: AlertSourceSpec!
): AlertSource!Arguments
Field
Type
Returns
Field
Type
Example
mutation CreateAlertSource($organizationId: ID!, $sourceSpec: AlertSourceSpec!) {
createAlertSource(organizationId: $organizationId, sourceSpec: $sourceSpec) {
id
type
token
name
version
webhookEndpoint
isDeletable
createdAt
updatedAt
configuration {
__typename
... on AlertmanagerSourceConfiguration {
nameMapping
descriptionMapping
}
... on InciditeSourceConfiguration {
noop
}
}
alerts {
paginationMetadata {
totalCount
}
}
processor {
id
name
isDefault
createdAt
updatedAt
}
}
}Example response
{
"data": {
"createAlertSource": {
"id": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"type": "ALERTMANAGER",
"token": "Example token",
"name": "Example name",
"version": 1,
"webhookEndpoint": "Example webhookEndpoint",
"isDeletable": true,
"createdAt": "2026-01-01T12:00:00Z",
"updatedAt": "2026-01-01T12:00:00Z",
"configuration": {
"__typename": "AlertmanagerSourceConfiguration",
"nameMapping": "Example nameMapping",
"descriptionMapping": "Example descriptionMapping"
},
"alerts": {
"paginationMetadata": {
"totalCount": 1
}
},
"processor": {
"id": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"name": "Example name",
"isDefault": true,
"createdAt": "2026-01-01T12:00:00Z",
"updatedAt": "2026-01-01T12:00:00Z"
}
}
}
}