Create Alarm
curl --request POST \
--url https://api.bland.ai/v1/alarms \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"metric_type": "<string>",
"threshold": 123,
"webhook_config": {},
"email_addresses": [
"<string>"
],
"sms_numbers": [
"<string>"
]
}
'import requests
url = "https://api.bland.ai/v1/alarms"
payload = {
"metric_type": "<string>",
"threshold": 123,
"webhook_config": {},
"email_addresses": ["<string>"],
"sms_numbers": ["<string>"]
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric_type: '<string>',
threshold: 123,
webhook_config: {},
email_addresses: ['<string>'],
sms_numbers: ['<string>']
})
};
fetch('https://api.bland.ai/v1/alarms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/alarms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric_type' => '<string>',
'threshold' => 123,
'webhook_config' => [
],
'email_addresses' => [
'<string>'
],
'sms_numbers' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/alarms"
payload := strings.NewReader("{\n \"metric_type\": \"<string>\",\n \"threshold\": 123,\n \"webhook_config\": {},\n \"email_addresses\": [\n \"<string>\"\n ],\n \"sms_numbers\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/alarms")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"metric_type\": \"<string>\",\n \"threshold\": 123,\n \"webhook_config\": {},\n \"email_addresses\": [\n \"<string>\"\n ],\n \"sms_numbers\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/alarms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric_type\": \"<string>\",\n \"threshold\": 123,\n \"webhook_config\": {},\n \"email_addresses\": [\n \"<string>\"\n ],\n \"sms_numbers\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"alarm": {
"id": "c92e5e2d-0d41-4c6f-a194-7d9f99e34ab1",
"metric_type": "api_errors",
"enabled": true,
"threshold": 33,
"webhook_config": {
"url": "https://example.com/webhooks/alarms",
"headers": {
"Content-Type": "appl***"
}
},
"email_addresses": ["alerts@example.com"],
"sms_numbers": ["+15555550123"],
"created_at": "2026-03-12T15:56:21.836Z",
"updated_at": "2026-03-12T15:56:21.836Z"
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "INVALID_THRESHOLD",
"message": "Threshold must be a positive number"
}
]
}
Alarms
Create Alarm
Create an alarm configuration for your organization.
POST
/
v1
/
alarms
Create Alarm
curl --request POST \
--url https://api.bland.ai/v1/alarms \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"metric_type": "<string>",
"threshold": 123,
"webhook_config": {},
"email_addresses": [
"<string>"
],
"sms_numbers": [
"<string>"
]
}
'import requests
url = "https://api.bland.ai/v1/alarms"
payload = {
"metric_type": "<string>",
"threshold": 123,
"webhook_config": {},
"email_addresses": ["<string>"],
"sms_numbers": ["<string>"]
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric_type: '<string>',
threshold: 123,
webhook_config: {},
email_addresses: ['<string>'],
sms_numbers: ['<string>']
})
};
fetch('https://api.bland.ai/v1/alarms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/alarms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric_type' => '<string>',
'threshold' => 123,
'webhook_config' => [
],
'email_addresses' => [
'<string>'
],
'sms_numbers' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/alarms"
payload := strings.NewReader("{\n \"metric_type\": \"<string>\",\n \"threshold\": 123,\n \"webhook_config\": {},\n \"email_addresses\": [\n \"<string>\"\n ],\n \"sms_numbers\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v1/alarms")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"metric_type\": \"<string>\",\n \"threshold\": 123,\n \"webhook_config\": {},\n \"email_addresses\": [\n \"<string>\"\n ],\n \"sms_numbers\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/alarms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric_type\": \"<string>\",\n \"threshold\": 123,\n \"webhook_config\": {},\n \"email_addresses\": [\n \"<string>\"\n ],\n \"sms_numbers\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"alarm": {
"id": "c92e5e2d-0d41-4c6f-a194-7d9f99e34ab1",
"metric_type": "api_errors",
"enabled": true,
"threshold": 33,
"webhook_config": {
"url": "https://example.com/webhooks/alarms",
"headers": {
"Content-Type": "appl***"
}
},
"email_addresses": ["alerts@example.com"],
"sms_numbers": ["+15555550123"],
"created_at": "2026-03-12T15:56:21.836Z",
"updated_at": "2026-03-12T15:56:21.836Z"
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "INVALID_THRESHOLD",
"message": "Threshold must be a positive number"
}
]
}
Headers
Your API key for authentication.
Body Parameters
Metric to monitor. Allowed values:
latency, api_errors, call_length.Positive numeric threshold used for alarm trigger evaluation.Notes:
thresholdis a sensitivity scalar (higher values are less sensitive; lower values are more sensitive).- The Dashboard may display an approximate ”% change” visualization for this value. Treat that UI percentage as a directional aid, not an exact conversion.
Sensitive→0.5Normal→1.0Relaxed→2.0Critical→2.5
Optional webhook destination for alarm notifications.
webhook_config should be a JSON object with:url(string, required)headers(object, optional)
{
"webhook_config": {
"url": "https://example.com/webhooks/alarms",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer test-token"
}
}
}
Optional email recipients for notifications.
Optional SMS recipients for notifications.
Response
Created alarm configuration object.
Alarm configuration ID.
Metric tracked by this alarm.
Configured trigger threshold.
Whether this alarm is enabled.
null on success, otherwise an array of error objects.{
"data": {
"alarm": {
"id": "c92e5e2d-0d41-4c6f-a194-7d9f99e34ab1",
"metric_type": "api_errors",
"enabled": true,
"threshold": 33,
"webhook_config": {
"url": "https://example.com/webhooks/alarms",
"headers": {
"Content-Type": "appl***"
}
},
"email_addresses": ["alerts@example.com"],
"sms_numbers": ["+15555550123"],
"created_at": "2026-03-12T15:56:21.836Z",
"updated_at": "2026-03-12T15:56:21.836Z"
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "INVALID_THRESHOLD",
"message": "Threshold must be a positive number"
}
]
}
Docs for agents: llms.txt
Was this page helpful?
⌘I