Create an Elastic integration
Create an Elastic integration. The response includes the webhook_url to paste into Elastic. Alerts sent to that URL create incidents, and we notify you through the channels you choose.
Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.
Bearer $TOKEN
application/json
Integration name.
ID of the escalation policy for alerts, or null to alert the current on-call person directly.
Whether the integration is paused. A paused integration opens no incidents.
Whether to call the on-call person. Ignored while an escalation policy is set.
Whether to send an SMS to the on-call person. Ignored while an escalation policy is set.
Whether to send an e-mail to the on-call person. Ignored while an escalation policy is set.
Whether to send a push notification to the on-call person. Ignored while an escalation policy is set.
Whether to send a critical push notification that ignores the mute switch and Do Not Disturb mode. Ignored while an escalation policy is set.
Seconds to wait before escalating to the whole team. 0 alerts the whole team right away, and null never escalates to the team. Ignored while an escalation policy is set.
Returns the newly created Elastic integration.
{
"data": {
"id": "123456789",
"type": "elastic_integration",
"attributes": {
"name": "Elastic alerts",
"escalation_policy_id": null,
"webhook_url": "https://incidents.betterstack.com/api/v1/elastic/webhook/token-placeholder",
"paused": false,
"call": false,
"sms": true,
"email": true,
"push": false,
"critical_alert": false,
"team_wait": 180,
"team_id": "t123",
"team_name": "Production"
}
}
}
The API token is missing or invalid.
{
"errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
The token is read-only, your role doesn't include Manage on Monitors, heartbeats, integrations, or the token can't be used for this API. The plan doesn't include Elastic integrations.
{
"errors": "This API token is read-only and cannot be used for write operations."
}
Validation failed, the request has an unknown field, or you set an escalation policy or a call, sms, push or critical_alert channel your plan doesn't include. The attributes the plan doesn't include are listed in unauthorized_attributes. Nothing is saved.
{
"errors": "Please upgrade your account before using these attributes",
"unauthorized_attributes": [
"escalation_policy_id",
"call",
"sms"
]
}
The ID of the Elastic integration.
Always elastic_integration.
Integration name.
ID of the escalation policy for alerts, or null to alert the current on-call person directly.
The URL to paste into Elastic. Alerts Elastic sends to it open incidents.
Whether the integration is paused. A paused integration opens no incidents.
Whether to call the on-call person. Ignored while an escalation policy is set.
Whether to send an SMS to the on-call person. Ignored while an escalation policy is set.
Whether to send an e-mail to the on-call person. Ignored while an escalation policy is set.
Whether to send a push notification to the on-call person. Ignored while an escalation policy is set.
Whether to send a critical push notification that ignores the mute switch and Do Not Disturb mode. Ignored while an escalation policy is set.
Seconds to wait before escalating to the whole team. 0 alerts the whole team right away, and null never escalates to the team. Ignored while an escalation policy is set.
Team that owns this integration, such as t123.
Name of the team that owns this integration.
Example cURL