curl --request POST \
--url https://www.sentivel.com/api/v1/monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"target": "<string>",
"type": "http",
"intervalSeconds": 43230,
"timeoutMs": 15500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [
349
],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"metadata": {}
}
'import requests
url = "https://www.sentivel.com/api/v1/monitors"
payload = {
"name": "<string>",
"target": "<string>",
"type": "http",
"intervalSeconds": 43230,
"timeoutMs": 15500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [349],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
target: '<string>',
type: 'http',
intervalSeconds: 43230,
timeoutMs: 15500,
openThreshold: 5,
resolveThreshold: 5,
expectedStatusCodes: [349],
keyword: '<string>',
keywordAbsent: '<string>',
degradedAfterMs: 30000,
latencyThresholdMs: 30000,
headers: {},
body: JSON.stringify('<string>'),
contentType: '<string>',
environment: '<string>',
metadata: {}
})
};
fetch('https://www.sentivel.com/api/v1/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://www.sentivel.com/api/v1/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([
'name' => '<string>',
'target' => '<string>',
'type' => 'http',
'intervalSeconds' => 43230,
'timeoutMs' => 15500,
'openThreshold' => 5,
'resolveThreshold' => 5,
'expectedStatusCodes' => [
349
],
'keyword' => '<string>',
'keywordAbsent' => '<string>',
'degradedAfterMs' => 30000,
'latencyThresholdMs' => 30000,
'headers' => [
],
'body' => '<string>',
'contentType' => '<string>',
'environment' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://www.sentivel.com/api/v1/monitors"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"type\": \"http\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 15500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.sentivel.com/api/v1/monitors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"type\": \"http\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 15500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.sentivel.com/api/v1/monitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"type\": \"http\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 15500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"componentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "http",
"target": "<string>",
"method": "<string>",
"intervalSeconds": 123,
"timeoutMs": 123,
"openThreshold": 123,
"resolveThreshold": 123,
"environment": "<string>",
"enabled": true,
"maintenanceUntil": "2023-11-07T05:31:56Z",
"openEndedMaintenance": true,
"lastCheckedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"pingUrl": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}Create a monitor
Creates a monitor and its public component. type selects the kind: http (default, polls a URL), heartbeat (a scheduled job pings us; the response includes a pingUrl to wire into the job), or tcp (connects to a host:port). The first check runs on the next poll cycle (within ~2 minutes).
curl --request POST \
--url https://www.sentivel.com/api/v1/monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"target": "<string>",
"type": "http",
"intervalSeconds": 43230,
"timeoutMs": 15500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [
349
],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"metadata": {}
}
'import requests
url = "https://www.sentivel.com/api/v1/monitors"
payload = {
"name": "<string>",
"target": "<string>",
"type": "http",
"intervalSeconds": 43230,
"timeoutMs": 15500,
"openThreshold": 5,
"resolveThreshold": 5,
"expectedStatusCodes": [349],
"keyword": "<string>",
"keywordAbsent": "<string>",
"degradedAfterMs": 30000,
"latencyThresholdMs": 30000,
"headers": {},
"body": "<string>",
"contentType": "<string>",
"environment": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
target: '<string>',
type: 'http',
intervalSeconds: 43230,
timeoutMs: 15500,
openThreshold: 5,
resolveThreshold: 5,
expectedStatusCodes: [349],
keyword: '<string>',
keywordAbsent: '<string>',
degradedAfterMs: 30000,
latencyThresholdMs: 30000,
headers: {},
body: JSON.stringify('<string>'),
contentType: '<string>',
environment: '<string>',
metadata: {}
})
};
fetch('https://www.sentivel.com/api/v1/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://www.sentivel.com/api/v1/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([
'name' => '<string>',
'target' => '<string>',
'type' => 'http',
'intervalSeconds' => 43230,
'timeoutMs' => 15500,
'openThreshold' => 5,
'resolveThreshold' => 5,
'expectedStatusCodes' => [
349
],
'keyword' => '<string>',
'keywordAbsent' => '<string>',
'degradedAfterMs' => 30000,
'latencyThresholdMs' => 30000,
'headers' => [
],
'body' => '<string>',
'contentType' => '<string>',
'environment' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://www.sentivel.com/api/v1/monitors"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"type\": \"http\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 15500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.sentivel.com/api/v1/monitors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"type\": \"http\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 15500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.sentivel.com/api/v1/monitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"target\": \"<string>\",\n \"type\": \"http\",\n \"intervalSeconds\": 43230,\n \"timeoutMs\": 15500,\n \"openThreshold\": 5,\n \"resolveThreshold\": 5,\n \"expectedStatusCodes\": [\n 349\n ],\n \"keyword\": \"<string>\",\n \"keywordAbsent\": \"<string>\",\n \"degradedAfterMs\": 30000,\n \"latencyThresholdMs\": 30000,\n \"headers\": {},\n \"body\": \"<string>\",\n \"contentType\": \"<string>\",\n \"environment\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"componentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "http",
"target": "<string>",
"method": "<string>",
"intervalSeconds": 123,
"timeoutMs": 123,
"openThreshold": 123,
"resolveThreshold": 123,
"environment": "<string>",
"enabled": true,
"maintenanceUntil": "2023-11-07T05:31:56Z",
"openEndedMaintenance": true,
"lastCheckedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"pingUrl": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {}
}
}Authorizations
Sent as Authorization: Bearer <token>. Three kinds are accepted: an ORG token (sv_…), bound to one workspace with a fixed role; a PERSONAL token (svu_…), which acts as you with your own live role in whichever workspace it is pointed at; and an OAUTH access token (mcp_at_…) from a connected app, limited to the workspaces you granted it. A personal or OAuth token names its workspace with the X-Sentivel-Workspace header (a slug or an id). Without it an OAuth token falls back to the connection's primary workspace, while a personal token in more than one workspace is rejected 400 invalid_request with the choices in error.details.workspaces. Membership is re-read every request, so leaving a workspace or revoking the grant takes effect at once.
Headers
Opt-in safe retries. Send a unique value (a UUID); a retry with the same key replays the first response (header Idempotent-Replayed: true) instead of acting twice. Reusing a key with a different body is rejected (400); a retry while the first is in flight gets 409. Scoped to the workspace, expires after 24h.
255Body
- Option 1
- Option 2
- Option 3
Discriminated on type. Omit type for an HTTP monitor (backward-compatible).
1 - 120The URL to poll. http/https only; SSRF-validated.
http GET, HEAD, POST Poll cadence (60s floor).
60 <= x <= 864001000 <= x <= 300001 <= x <= 101 <= x <= 10Healthy status codes. Empty/absent = any 2xx–3xx.
100 <= x <= 599200200Assert on a JSON response: navigate path (dot/bracket, leading $. optional) and compare with op.
Show child attributes
Show child attributes
A passing check slower than this is reported degraded (still up).
1 <= x <= 60000A check slower than this FAILS (opens an incident after the flap threshold).
1 <= x <= 60000Custom request headers (e.g. Authorization). Stored encrypted; sent only to the original host (dropped on a cross-host redirect).
Show child attributes
Show child attributes
Request body for a POST/PUT check. Stored encrypted (may carry secrets).
32768Content-Type for body (default application/json).
20060Static string→string labels copied onto every incident this monitor opens. At most 20 entries; keys ≤64 chars, values ≤500.
Show child attributes
Show child attributes
Response
The created monitor.
Show child attributes
Show child attributes