Alerts
Proactive alerts define long-runtime thresholds and recipients for flows or whole integrations. Create, list, update, and delete alerts; bulk-update recipients across many alerts; and fetch per-alert audit history.
Alert schema
Returns proactive alerts for the account. Soft-deleted alerts are excluded. Requires permission get:alert:models. Returns 403 when the ENABLE_PROACTIVE_ALERTS feature flag is off.
With populate=true, nested flow / integration summaries and recipient { _id, name, email } objects are returned. Without populate, foreign keys are raw ObjectIds.
Tile-level (shared) users must include _integrationId.
When true, populate flow, integration, and recipient user fields.
Filter by alert type.
Filter by integration id. Returns the integration's flow-level alerts and its integration-level alert. Required for tile-level (shared) users.
5e5eb06fdd83ed4f8206a4eaFilter by flow id. Returns only the flow-level alert on this flow, not the
integration-level alert that also covers it; filter by _integrationId to get
both.
69497fc443fc1f9a03d31bd9Filter alerts that include this user as a recipient.
624cb0346309dc3a543733a2Returns only alerts that have never fired. For a time range, use
lastTriggeredAt_gte / lastTriggeredAt_lte instead.
neverPossible values: Include alerts last triggered at or after this ISO-8601 timestamp.
2026-05-01T00:00:00.000ZInclude alerts last triggered at or before this ISO-8601 timestamp.
2026-06-01T00:00:00.000ZArray of alerts (empty array when none match).
Proactive alert configuration. Soft-deleted alerts are omitted from list
and get responses. With populate=true on GET, _flowId and
_integrationId stay ObjectId strings and the flow / integration
enrichment objects are added alongside them; _recipientUserIds entries
become { _id, name, email }. POST and PUT always return the unpopulated
shape.
Unique identifier for the alert.
674a1b2c3d4e5f6789012345Alert type.
long-runtimePossible values: Account owner user id for the alert.
624cb0346309dc3a543733a2Integration the alert belongs to. Always an ObjectId string. With
populate=true on an integration-level alert, a sibling integration
object { flowCount } is added; this id is not replaced.
5e5eb06fdd83ed4f8206a4eaFlow for a flow-level alert; omitted on integration-level alerts.
Always an ObjectId string — with populate=true the display fields
arrive in the sibling flow object instead of replacing this value.
69497fc443fc1f9a03d31bd9Timestamp when the alert last fired. Absent until the alert first fires;
the list's lastTriggeredAt=never filter matches those alerts.
2026-06-01T12:00:00.000ZWhen the alert was created.
2026-05-01T10:00:00.000ZWhen the alert was last updated.
2026-05-15T14:30:00.000ZBad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
lastTriggeredAt is a value other than never, or lastTriggeredAt_gte /
lastTriggeredAt_lte is not a valid date (invalid_query_param).
GET /v1/alerts HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"_id": "674a1b2c3d4e5f6789012345",
"type": "long-runtime",
"_userId": "624cb0346309dc3a543733a2",
"_integrationId": "5e5eb06fdd83ed4f8206a4ea",
"_flowId": "69497fc443fc1f9a03d31bd9",
"longRuntime": {
"thresholdMinutes": 30
},
"_recipientUserIds": [
"624cb0346309dc3a543733a2"
],
"createdAt": "2026-05-01T10:00:00.000Z",
"lastModified": "2026-05-01T10:00:00.000Z"
}
]Creates a proactive alert. Validates type, flow/integration, and duplicate constraints, then resolves _recipientEmails to _recipientUserIds and dual-writes the long-runtime threshold onto the related flow document(s). A flow read doesn't return that threshold, but the flow's lastModified moves, and the flow's own audit log gets no entry for it.
Requires permission put:alert:models. Returns 403 when ENABLE_PROACTIVE_ALERTS is off. Response is always unpopulated.
Create a proactive alert. Recipients are supplied as _recipientEmails;
the API resolves them to _recipientUserIds (inviting users or granting
integration access when needed). Response never echoes _recipientEmails.
Either _flowId or _integrationId (or both) must be provided. When
_flowId is set, _integrationId may be omitted (inferred from the flow).
Integration-level alerts require _integrationId without _flowId.
Alert type.
long-runtimePossible values: Flow id for a flow-level alert. When set, _integrationId may be
omitted and is inferred from the flow.
69497fc443fc1f9a03d31bd9Integration id. Required for integration-level alerts (no _flowId).
Required for long-runtime unless inferred from _flowId.
5e5eb06fdd83ed4f8206a4eaRecipient email addresses. Trimmed, lowercased, and deduplicated
server-side. Minimum 1; maximum controlled by ALERT_MAX_RECIPIENT_EMAILS
(default 50).
Created alert (unpopulated ObjectIds).
Proactive alert configuration. Soft-deleted alerts are omitted from list
and get responses. With populate=true on GET, _flowId and
_integrationId stay ObjectId strings and the flow / integration
enrichment objects are added alongside them; _recipientUserIds entries
become { _id, name, email }. POST and PUT always return the unpopulated
shape.
Unique identifier for the alert.
674a1b2c3d4e5f6789012345Alert type.
long-runtimePossible values: Account owner user id for the alert.
624cb0346309dc3a543733a2Integration the alert belongs to. Always an ObjectId string. With
populate=true on an integration-level alert, a sibling integration
object { flowCount } is added; this id is not replaced.
5e5eb06fdd83ed4f8206a4eaFlow for a flow-level alert; omitted on integration-level alerts.
Always an ObjectId string — with populate=true the display fields
arrive in the sibling flow object instead of replacing this value.
69497fc443fc1f9a03d31bd9Timestamp when the alert last fired. Absent until the alert first fires;
the list's lastTriggeredAt=never filter matches those alerts.
2026-06-01T12:00:00.000ZWhen the alert was created.
2026-05-01T10:00:00.000ZWhen the alert was last updated.
2026-05-15T14:30:00.000ZThe body failed validation. invalid_field covers a threshold out of range and a
missing or unsupported type; missing_required_field covers no recipients and a
body with neither _flowId nor _integrationId; create_not_allowed is a
malformed recipient email; invalid_ref is a _flowId or _integrationId that
matches no flow or integration in the account.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
An alert of the same type already exists for this flow, or for this integration
when _flowId is omitted.
_flowId or _integrationId is not a valid ObjectId (invalid_ref).
POST /v1/alerts HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 156
{
"type": "long-runtime",
"_flowId": "69497fc443fc1f9a03d31bd9",
"longRuntime": {
"thresholdMinutes": 30
},
"_recipientEmails": [
"ops@example.com",
"jane@example.com"
]
}{
"_id": "674a1b2c3d4e5f6789012345",
"type": "long-runtime",
"_userId": "624cb0346309dc3a543733a2",
"_integrationId": "5e5eb06fdd83ed4f8206a4ea",
"_flowId": "69497fc443fc1f9a03d31bd9",
"longRuntime": {
"thresholdMinutes": 30
},
"_recipientUserIds": [
"624cb0346309dc3a543733a2",
"6356f24327114d57ab843e1f"
],
"createdAt": "2026-05-01T10:00:00.000Z",
"lastModified": "2026-05-01T10:00:00.000Z"
}Adds or removes recipients across many alerts in one call. Provide either _alertIds or _integrationId (not both). Both add and remove accept _recipientEmails.
Full success returns 204 with no body. Partial failure returns 200 with { failed: [...] } only — successful alerts are omitted. There is no success or skipped array. A remove never takes an alert's last recipient: that recipient stays, and the alert is listed in failed[] with the kept email in affectedRecipientEmails. An id in _alertIds that matches no alert is listed there too, not answered with 404.
Requires permission put:alert:models. Returns 403 when ENABLE_PROACTIVE_ALERTS is off. add is limited to one integration per call; remove may span integrations.
Add or remove recipients across one or more alerts. Provide exactly one
target: _alertIds or _integrationId (not both). Both actions use
_recipientEmails (resolved to user ids server-side). add is limited to
one integration per call; remove may span integrations.
Sending both _alertIds and _integrationId returns 400.
Whether to add or remove the listed recipients.
addPossible values: Explicit alert ids to update. Mutually exclusive with _integrationId.
When set, the operation applies to every alert under this integration.
Mutually exclusive with _alertIds.
5e5eb06fdd83ed4f8206a4eaRecipient emails to add or remove. Trimmed, lowercased, and deduplicated.
One or more alerts failed. Body contains only failed[]; each entry
includes _id, optional affectedRecipientEmails, and errors[].
Partial-failure body returned with HTTP 200 when at least one alert in the bulk recipients call could not be fully updated. Full success returns 204 with no body.
All targeted alerts updated successfully.
Both or neither of _alertIds and _integrationId were sent, or action is not
add or remove (invalid_field); or _integrationId matches no integration in the
account (invalid_ref).
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
The integration named by _integrationId has no alerts. Returned for add and
remove alike.
An id in _alertIds, or _integrationId, is not a valid ObjectId (invalid_ref).
PATCH /v1/alerts/bulk/recipients HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"action": "add",
"_alertIds": [
"674a1b2c3d4e5f6789012345",
"674a1b2c3d4e5f6789012346"
],
"_recipientEmails": [
"ops@example.com"
]
}{
"failed": [
{
"_id": "674a1b2c3d4e5f6789012345",
"affectedRecipientEmails": [
"ops@example.com"
],
"errors": [
{
"code": "not_allowed",
"message": "Cannot remove the last recipient of an alert. Delete the alert instead."
}
]
}
]
}Returns a single proactive alert by id. Soft-deleted alerts return 404. Requires permission get:alert:model. Returns 403 when ENABLE_PROACTIVE_ALERTS is off.
With populate=true, nested flow / integration / recipient objects are returned; otherwise foreign keys are raw ObjectIds.
Alert id.
674a1b2c3d4e5f6789012345When true, populate flow, integration, and recipient user fields.
Alert object.
Proactive alert configuration. Soft-deleted alerts are omitted from list
and get responses. With populate=true on GET, _flowId and
_integrationId stay ObjectId strings and the flow / integration
enrichment objects are added alongside them; _recipientUserIds entries
become { _id, name, email }. POST and PUT always return the unpopulated
shape.
Unique identifier for the alert.
674a1b2c3d4e5f6789012345Alert type.
long-runtimePossible values: Account owner user id for the alert.
624cb0346309dc3a543733a2Integration the alert belongs to. Always an ObjectId string. With
populate=true on an integration-level alert, a sibling integration
object { flowCount } is added; this id is not replaced.
5e5eb06fdd83ed4f8206a4eaFlow for a flow-level alert; omitted on integration-level alerts.
Always an ObjectId string — with populate=true the display fields
arrive in the sibling flow object instead of replacing this value.
69497fc443fc1f9a03d31bd9Timestamp when the alert last fired. Absent until the alert first fires;
the list's lastTriggeredAt=never filter matches those alerts.
2026-06-01T12:00:00.000ZWhen the alert was created.
2026-05-01T10:00:00.000ZWhen the alert was last updated.
2026-05-15T14:30:00.000Z_id is not a valid ObjectId.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
No alert with this id exists in the account, or the alert was deleted.
GET /v1/alerts/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"_id": "674a1b2c3d4e5f6789012345",
"type": "long-runtime",
"_userId": "624cb0346309dc3a543733a2",
"_integrationId": "5e5eb06fdd83ed4f8206a4ea",
"_flowId": "69497fc443fc1f9a03d31bd9",
"longRuntime": {
"thresholdMinutes": 30
},
"_recipientUserIds": [
"624cb0346309dc3a543733a2"
],
"createdAt": "2026-05-01T10:00:00.000Z",
"lastModified": "2026-05-01T10:00:00.000Z"
}Replace-all update of threshold and recipients. type, _flowId, and _integrationId are immutable. Resolves _recipientEmails the same way as create, then dual-writes the updated threshold to related flow(s).
Requires permission put:alert:models. Returns 403 when ENABLE_PROACTIVE_ALERTS is off. Response is always unpopulated.
Alert id.
674a1b2c3d4e5f6789012345Replace-all update for an alert. type, _flowId, and _integrationId
are immutable and ignored if sent. Recipients are replace-all via
_recipientEmails (same resolution/invite behavior as create).
Full replacement recipient email list. Trimmed, lowercased, and deduplicated server-side. Must contain at least one address.
Updated alert (unpopulated ObjectIds).
Proactive alert configuration. Soft-deleted alerts are omitted from list
and get responses. With populate=true on GET, _flowId and
_integrationId stay ObjectId strings and the flow / integration
enrichment objects are added alongside them; _recipientUserIds entries
become { _id, name, email }. POST and PUT always return the unpopulated
shape.
Unique identifier for the alert.
674a1b2c3d4e5f6789012345Alert type.
long-runtimePossible values: Account owner user id for the alert.
624cb0346309dc3a543733a2Integration the alert belongs to. Always an ObjectId string. With
populate=true on an integration-level alert, a sibling integration
object { flowCount } is added; this id is not replaced.
5e5eb06fdd83ed4f8206a4eaFlow for a flow-level alert; omitted on integration-level alerts.
Always an ObjectId string — with populate=true the display fields
arrive in the sibling flow object instead of replacing this value.
69497fc443fc1f9a03d31bd9Timestamp when the alert last fired. Absent until the alert first fires;
the list's lastTriggeredAt=never filter matches those alerts.
2026-06-01T12:00:00.000ZWhen the alert was created.
2026-05-01T10:00:00.000ZWhen the alert was last updated.
2026-05-15T14:30:00.000ZThe body is empty (invalid_request), has no _recipientEmails
(missing_required_field), or carries a threshold out of range (invalid_field);
or _id is not a valid ObjectId (invalid_ref).
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
No alert with this id exists in the account, or the alert was deleted.
Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
PUT /v1/alerts/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"longRuntime": {
"thresholdMinutes": 45
},
"_recipientEmails": [
"ops@example.com",
"jane@example.com"
]
}{
"_id": "674a1b2c3d4e5f6789012345",
"type": "long-runtime",
"_userId": "624cb0346309dc3a543733a2",
"_integrationId": "5e5eb06fdd83ed4f8206a4ea",
"_flowId": "69497fc443fc1f9a03d31bd9",
"longRuntime": {
"thresholdMinutes": 45
},
"_recipientUserIds": [
"624cb0346309dc3a543733a2",
"6356f24327114d57ab843e1f"
],
"createdAt": "2026-05-01T10:00:00.000Z",
"lastModified": "2026-05-15T14:30:00.000Z"
}Soft-deletes an alert and clears __longRuntimeThresholdMinutes on the related flow document(s), which moves each flow's lastModified. A deleted alert reads 404 and has no recycle-bin entry. Requires permission put:alert:models. Returns 403 when ENABLE_PROACTIVE_ALERTS is off.
Alert id.
674a1b2c3d4e5f6789012345Alert soft-deleted.
No content
_id is not a valid ObjectId.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
No alert with this id exists in the account, or the alert was deleted.
DELETE /v1/alerts/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Returns the change history for an alert. Each entry records a mutation event with who made the change, when, and which fields were affected.
Requires permission to read the alert (get:alert:model). Returns 403 when ENABLE_PROACTIVE_ALERTS is off or the caller lacks access.
The history stays readable after the alert is deleted, even though the alert itself then reads 404. The same entries also appear in the integration's audit log (GET /v1/integrations/{_id}/audit).
Alert ID.
674a1b2c3d4e5f6789012345Maximum number of audit entries to return per page.
1000Example: 100Opaque pagination cursor for the next page. Take it from the after value in the Link
response header's rel="next" URL rather than constructing it.
W3siJGRhdGUiOiIyMDI2LTA1LTAxVDAwOjAwOjAwLjAwMFoifSwiNjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwIl0Only return entries at or after this timestamp. On a platform license, leaving it out limits
the range to the year before to (or the last year when to is omitted too), and a value older
than the audit window — the license's auditLogRetentionYears — starts the range at the
window's edge instead of failing. A future value fails with 422 invalid_time_period.
2026-05-01T00:00:00.000ZOnly return entries at or before this timestamp. A future value, or one older than the
account's audit window, fails with 422 invalid_time_period; the message names the window in
years (the license's auditLogRetentionYears on a platform license). A value earlier than
from fails with 422 invalid_time_range.
2026-05-31T23:59:59.999ZAudit entries for the alert.
No audit entries exist for this alert.
Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
Not found. The requested resource does not exist or is not visible to the caller.
A query value is invalid: a filter outside the audit vocabulary (invalid_audit_field), a
from or to that is not ISO 8601 (invalid_timestamp_format), a bound in the future or a to
older than the account's audit window (invalid_time_period), or a from later than to
(invalid_time_range).
GET /v1/alerts/{_id}/audit HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"_id": "69e38cb1a749d34a9732a270",
"resourceType": "alert",
"_resourceId": "674a1b2c3d4e5f6789012345",
"resourceName": "Long runtime - All flows (Shopify to NetSuite)",
"source": "api",
"event": "update",
"time": "2026-04-18T13:52:49.729Z",
"byUser": {
"_id": "624cb0346309dc3a543733a2",
"email": "user@example.com",
"name": "Jane Doe"
},
"fieldChanges": [
{
"fieldPath": "longRuntime",
"oldValue": {
"thresholdMinutes": 30
},
"newValue": {
"thresholdMinutes": 45
}
}
]
}
]Last updated
Was this helpful?