Create template
POST
/api/v1/templates
const url = 'https://example.com/api/v1/templates';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"createdAt":"2026-04-15T12:00:00Z","id":"example","kind":"example","labels":{"additionalProperty":"example"},"name":"example","spec":{"address":"example","args":["example"],"checkCommand":"example","checkPeriod":"example","contactGroups":["example"],"contacts":["example"],"enableChecks":true,"enableFlapDetection":true,"enableNotifications":true,"flapThresholdHigh":1,"flapThresholdLow":1,"interval":1,"maxCheckAttempts":1,"notificationPeriod":"example","notifyOn":["example"],"parents":["example"],"retryInterval":1,"runbook":"example","stalenessAfter":1,"stalenessText":"example","templates":["example"],"thresholdMode":"example","timeout":1,"vars":{"additionalProperty":"example"},"zone":"example"},"tenantId":"example","updatedAt":"2026-04-15T12:00:00Z","version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/templates \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "createdAt": "2026-04-15T12:00:00Z", "id": "example", "kind": "example", "labels": { "additionalProperty": "example" }, "name": "example", "spec": { "address": "example", "args": [ "example" ], "checkCommand": "example", "checkPeriod": "example", "contactGroups": [ "example" ], "contacts": [ "example" ], "enableChecks": true, "enableFlapDetection": true, "enableNotifications": true, "flapThresholdHigh": 1, "flapThresholdLow": 1, "interval": 1, "maxCheckAttempts": 1, "notificationPeriod": "example", "notifyOn": [ "example" ], "parents": [ "example" ], "retryInterval": 1, "runbook": "example", "stalenessAfter": 1, "stalenessText": "example", "templates": [ "example" ], "thresholdMode": "example", "timeout": 1, "vars": { "additionalProperty": "example" }, "zone": "example" }, "tenantId": "example", "updatedAt": "2026-04-15T12:00:00Z", "version": 1 }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
createdAt
required
string format: date-time
id
required
string
kind
required
string
labels
object
key
additional properties
string
name
required
string
spec
required
object
address
string
args
Array<string>
checkCommand
string
checkPeriod
string
contactGroups
Array<string>
contacts
Array<string>
enableChecks
boolean
enableFlapDetection
boolean
enableNotifications
boolean
flapThresholdHigh
number
flapThresholdLow
number
interval
integer
maxCheckAttempts
integer
notificationPeriod
string
notifyOn
Array<string>
parents
Array<string>
retryInterval
integer
runbook
string
stalenessAfter
integer
stalenessText
string
templates
Array<string>
thresholdMode
string
timeout
integer
vars
object
key
additional properties
string
zone
string
tenantId
required
string
updatedAt
required
string format: date-time
version
required
integer
Examplegenerated
{ "createdAt": "2026-04-15T12:00:00Z", "id": "example", "kind": "example", "labels": { "additionalProperty": "example" }, "name": "example", "spec": { "address": "example", "args": [ "example" ], "checkCommand": "example", "checkPeriod": "example", "contactGroups": [ "example" ], "contacts": [ "example" ], "enableChecks": true, "enableFlapDetection": true, "enableNotifications": true, "flapThresholdHigh": 1, "flapThresholdLow": 1, "interval": 1, "maxCheckAttempts": 1, "notificationPeriod": "example", "notifyOn": [ "example" ], "parents": [ "example" ], "retryInterval": 1, "runbook": "example", "stalenessAfter": 1, "stalenessText": "example", "templates": [ "example" ], "thresholdMode": "example", "timeout": 1, "vars": { "additionalProperty": "example" }, "zone": "example" }, "tenantId": "example", "updatedAt": "2026-04-15T12:00:00Z", "version": 1}Responses
Section titled “Responses”Created
Media typeapplication/json
object
createdAt
required
string format: date-time
id
required
string
kind
required
string
labels
object
key
additional properties
string
name
required
string
spec
required
object
address
string
args
Array<string>
checkCommand
string
checkPeriod
string
contactGroups
Array<string>
contacts
Array<string>
enableChecks
boolean
enableFlapDetection
boolean
enableNotifications
boolean
flapThresholdHigh
number
flapThresholdLow
number
interval
integer
maxCheckAttempts
integer
notificationPeriod
string
notifyOn
Array<string>
parents
Array<string>
retryInterval
integer
runbook
string
stalenessAfter
integer
stalenessText
string
templates
Array<string>
thresholdMode
string
timeout
integer
vars
object
key
additional properties
string
zone
string
tenantId
required
string
updatedAt
required
string format: date-time
version
required
integer
Examplegenerated
{ "createdAt": "2026-04-15T12:00:00Z", "id": "example", "kind": "example", "labels": { "additionalProperty": "example" }, "name": "example", "spec": { "address": "example", "args": [ "example" ], "checkCommand": "example", "checkPeriod": "example", "contactGroups": [ "example" ], "contacts": [ "example" ], "enableChecks": true, "enableFlapDetection": true, "enableNotifications": true, "flapThresholdHigh": 1, "flapThresholdLow": 1, "interval": 1, "maxCheckAttempts": 1, "notificationPeriod": "example", "notifyOn": [ "example" ], "parents": [ "example" ], "retryInterval": 1, "runbook": "example", "stalenessAfter": 1, "stalenessText": "example", "templates": [ "example" ], "thresholdMode": "example", "timeout": 1, "vars": { "additionalProperty": "example" }, "zone": "example" }, "tenantId": "example", "updatedAt": "2026-04-15T12:00:00Z", "version": 1}default
Section titled “default”Problem Details (RFC 9457)
Media typeapplication/problem+json
object
code
required
string
detail
string
instance
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{ "code": "example", "detail": "example", "instance": "example", "status": 1, "title": "example", "type": "example"}