Create Uptime Monitor
curl --request POST \
--url https://api.getbluejay.ai/v1/uptime/monitors \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"agent_id": 123,
"frequency": "5m",
"active_window": {
"days": [],
"start_time": "<string>",
"end_time": "<string>",
"timezone": "<string>"
},
"checks": [
{}
],
"notifications": {},
"enabled": true,
"start_at": "<string>"
}
'import requests
url = "https://api.getbluejay.ai/v1/uptime/monitors"
payload = {
"agent_id": 123,
"frequency": "5m",
"active_window": {
"days": [],
"start_time": "<string>",
"end_time": "<string>",
"timezone": "<string>"
},
"checks": [{}],
"notifications": {},
"enabled": True,
"start_at": "<string>"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 123,
frequency: '5m',
active_window: {days: [], start_time: '<string>', end_time: '<string>', timezone: '<string>'},
checks: [{}],
notifications: {},
enabled: true,
start_at: '<string>'
})
};
fetch('https://api.getbluejay.ai/v1/uptime/monitors', 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.getbluejay.ai/v1/uptime/monitors",
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([
'agent_id' => 123,
'frequency' => '5m',
'active_window' => [
'days' => [
],
'start_time' => '<string>',
'end_time' => '<string>',
'timezone' => '<string>'
],
'checks' => [
[
]
],
'notifications' => [
],
'enabled' => true,
'start_at' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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.getbluejay.ai/v1/uptime/monitors"
payload := strings.NewReader("{\n \"agent_id\": 123,\n \"frequency\": \"5m\",\n \"active_window\": {\n \"days\": [],\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"checks\": [\n {}\n ],\n \"notifications\": {},\n \"enabled\": true,\n \"start_at\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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.getbluejay.ai/v1/uptime/monitors")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 123,\n \"frequency\": \"5m\",\n \"active_window\": {\n \"days\": [],\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"checks\": [\n {}\n ],\n \"notifications\": {},\n \"enabled\": true,\n \"start_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/uptime/monitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 123,\n \"frequency\": \"5m\",\n \"active_window\": {\n \"days\": [],\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"checks\": [\n {}\n ],\n \"notifications\": {},\n \"enabled\": true,\n \"start_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Uptime Monitors
Create Uptime Monitor
Create an uptime monitor for an agent. Provisions the backing health-check simulation and schedule.
POST
/
v1
/
uptime
/
monitors
Create Uptime Monitor
curl --request POST \
--url https://api.getbluejay.ai/v1/uptime/monitors \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"agent_id": 123,
"frequency": "5m",
"active_window": {
"days": [],
"start_time": "<string>",
"end_time": "<string>",
"timezone": "<string>"
},
"checks": [
{}
],
"notifications": {},
"enabled": true,
"start_at": "<string>"
}
'import requests
url = "https://api.getbluejay.ai/v1/uptime/monitors"
payload = {
"agent_id": 123,
"frequency": "5m",
"active_window": {
"days": [],
"start_time": "<string>",
"end_time": "<string>",
"timezone": "<string>"
},
"checks": [{}],
"notifications": {},
"enabled": True,
"start_at": "<string>"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 123,
frequency: '5m',
active_window: {days: [], start_time: '<string>', end_time: '<string>', timezone: '<string>'},
checks: [{}],
notifications: {},
enabled: true,
start_at: '<string>'
})
};
fetch('https://api.getbluejay.ai/v1/uptime/monitors', 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.getbluejay.ai/v1/uptime/monitors",
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([
'agent_id' => 123,
'frequency' => '5m',
'active_window' => [
'days' => [
],
'start_time' => '<string>',
'end_time' => '<string>',
'timezone' => '<string>'
],
'checks' => [
[
]
],
'notifications' => [
],
'enabled' => true,
'start_at' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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.getbluejay.ai/v1/uptime/monitors"
payload := strings.NewReader("{\n \"agent_id\": 123,\n \"frequency\": \"5m\",\n \"active_window\": {\n \"days\": [],\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"checks\": [\n {}\n ],\n \"notifications\": {},\n \"enabled\": true,\n \"start_at\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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.getbluejay.ai/v1/uptime/monitors")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 123,\n \"frequency\": \"5m\",\n \"active_window\": {\n \"days\": [],\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"checks\": [\n {}\n ],\n \"notifications\": {},\n \"enabled\": true,\n \"start_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/uptime/monitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 123,\n \"frequency\": \"5m\",\n \"active_window\": {\n \"days\": [],\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"checks\": [\n {}\n ],\n \"notifications\": {},\n \"enabled\": true,\n \"start_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}The
The three template checks (
checks array holds the health-check cards a run grades. Each check is an object:
{
"id": "latency",
"label": "Latency",
"description": "Average response time stayed under a threshold.",
"enabled": true,
"isTemplate": true,
"checkType": "latency",
"config": { "latency_threshold_ms": 3000, "alert_after_failures": 3 }
}
checkType of connection, agent_malfunction, or latency) have isTemplate: true. A user-added check has isTemplate: false and points at a custom metric (customMetricId, with a condition of data_type, operator, and comparison_value) or a Digital Human (digitalHumanId).
A digitalHumanId check swaps the default caller for that Digital Human — see Custom caller. It only picks who places the probe, so at least one enabled check must still carry a checkType or customMetricId, or the request is rejected with a 400.
The notifications object accepts any of:
{
"slack": { "channel": "C0123456789", "notify_channel": true },
"pagerduty": true,
"betterstack": true,
"email": { "scope": "specific", "addresses": ["[email protected]"] }
}
Body
application/json
Days/hours the monitor may run, e.g. {"days": ["monday"], "start_time": "09:00", "end_time": "17:00", "timezone": "America/Los_Angeles"}. Null runs it around the clock.
Show child attributes
Show child attributes
ISO 8601 first-check time; defaults to now().
Response
Successful Response