Skip to Content
API ReferenceCreate Check

Create Check

Create a new monitoring check.

Required scope: checks:write

Endpoint

POST /v1/public/checks

Headers

HeaderRequiredDescription
X-Api-KeyYesYour API key
Content-TypeYesMust be application/json
Idempotency-KeyYesUnique string to prevent duplicate creation (max 256 characters)

Request Body

FieldTypeRequiredDescription
urlstringYesThe URL to monitor
namestringNoDisplay name (max 200 characters, defaults to URL)
typestringNoCheck type: website, rest_endpoint, ping, tcp, udp, dns, smtp, pop3, imap (default: website)
checkFrequencynumberNoCheck interval in minutes (default: 5, subject to plan limits)
checkRegionOverridestringNoRegion to run checks from. Currently only vps-eu-1 is available
httpMethodstringNoHTTP method for website and rest_endpoint types: GET, POST, PUT, PATCH, DELETE, HEAD (default: GET)
expectedStatusCodesnumber[]NoExpected HTTP status codes (default: [200])
requestHeadersobjectNoCustom request headers as key-value pairs (max 20 entries)
requestBodystringNoRequest body for POST/PUT/PATCH methods (max 64KB, must be valid JSON)
responseValidationobjectNoResponse validation rules (see below)
cacheControlNoCachebooleanNoSend Cache-Control: no-cache header (default: false)
immediateRecheckEnabledbooleanNoEnable immediate recheck on failure (default: true)
responseTimeLimitnumberNoMax response time in milliseconds before marking as slow
downConfirmationAttemptsnumberNoNumber of consecutive failures before marking as down (1-99)
pingPacketsnumberNoNumber of ping packets for ping type checks (1-5)
timezonestringNoTimezone for the check (e.g., America/New_York)

Response Validation

The responseValidation object supports:

FieldTypeDescription
containsTextstring[]Array of strings that must appear in the response body
jsonPathstringJSONPath expression to evaluate
expectedValuestringExpected value at the JSONPath location

Idempotency

The Idempotency-Key header is required for create requests. If you send the same idempotency key within 24 hours, the API returns the original response instead of creating a duplicate check.

Use any unique string (e.g., a UUID or timestamp). Increment it for each new check you want to create.

Response

201 Created

{ "data": { "id": "abc123def456" } }

Error Responses

StatusDescription
400Invalid request body or validation failure
403API key missing checks:write scope
409A check already exists for this URL, or max checks reached
422Idempotency key conflict (same key, different request)
429Rate limit exceeded

Code Examples

cURL

curl -X POST \ -H "X-Api-Key: ek_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: unique-key-001" \ -d '{"url": "https://example.com", "name": "My Website", "type": "website", "checkFrequency": 5}' \ "https://us-central1-exit1-dev.cloudfunctions.net/publicApi/v1/public/checks"

JavaScript

const response = await fetch( "https://us-central1-exit1-dev.cloudfunctions.net/publicApi/v1/public/checks", { method: "POST", headers: { "X-Api-Key": process.env.EXIT1_API_KEY, "Content-Type": "application/json", "Idempotency-Key": `create-${Date.now()}`, }, body: JSON.stringify({ url: "https://example.com", name: "My Website", type: "website", checkFrequency: 5, }), } ); const data = await response.json(); console.log(data.data.id); // New check ID

Python

import os, requests response = requests.post( "https://us-central1-exit1-dev.cloudfunctions.net/publicApi/v1/public/checks", headers={ "X-Api-Key": os.environ["EXIT1_API_KEY"], "Idempotency-Key": "unique-key-001", }, json={ "url": "https://example.com", "name": "My Website", "type": "website", "checkFrequency": 5, }, ) response.raise_for_status() print(response.json())
Last updated on