Create Check
Create a new monitoring check.
Required scope: checks:write
Endpoint
POST /v1/public/checksHeaders
| Header | Required | Description |
|---|---|---|
X-Api-Key | Yes | Your API key |
Content-Type | Yes | Must be application/json |
Idempotency-Key | Yes | Unique key to prevent duplicate creation: 1 to 256 letters, digits, hyphens or underscores |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL, host or domain to monitor. Not required for heartbeat checks: exit1 generates a unique ping URL automatically |
name | string | No | Display name (max 200 characters, defaults to the URL) |
folder | string | No | Folder path such as Clients/Acme (at most 10 levels, 48 characters per folder name). Required for a key restricted to folders: it must be one of the key’s folders or a subfolder |
type | string | No | Check type: website, rest_endpoint, redirect, ping, tcp, udp, websocket, dns, heartbeat or domain (default: website). Unrecognized values fall back to website. dns requires a paid plan. domain tracks domain expiry only (no uptime probe), takes a bare domain such as example.com as url, and requires Nano or Pro |
checkFrequency | number | No | Minutes between checks (default: 5, subject to plan limits) |
checkRegionOverride | string | No | Region to run the check from: vps-eu-1 (Frankfurt) or vps-us-1 (Boston). Only honored on plans with region choice (Nano and Pro). On other plans the check always runs from vps-eu-1 |
httpMethod | string | No | HTTP method for website, rest_endpoint and redirect checks: GET, POST, PUT, PATCH, DELETE or HEAD (default: GET) |
expectedStatusCodes | number[] | No | Status codes that count as up, integers from 100 to 599. Defaults depend on type (see below) |
requestHeaders | object | No | Custom request headers as string key-value pairs (max 20 entries, values max 2048 characters). Host, Authorization, Cookie, Set-Cookie, X-Forwarded-For, X-Real-IP, Proxy-Authorization, Transfer-Encoding and Content-Length are rejected |
requestBody | string | No | Request body (max 65,536 characters). Must be valid JSON for rest_endpoint checks using POST, PUT or PATCH |
responseValidation | object | No | Response validation rules (see below) |
redirectValidation | object | No | For redirect checks: { "expectedTarget": "https://...", "matchMode": "contains" }. matchMode is contains (default) or exact |
maxRedirects | integer | No | Maximum redirects to follow (0 to 10) |
cacheControlNoCache | boolean | No | Send Cache-Control: no-cache header (default: false) |
ignoreSslErrors | boolean | No | Accept invalid certificates (expired, self-signed, wrong host) and turn off SSL alerts for this check (default: false) |
responseTimeLimit | number | No | Max response time in milliseconds before the result is marked as slow (max 30,000) |
downConfirmationAttempts | number | No | Consecutive failures before the check is marked down (1 to 99) |
recordTypes | string[] | No | For dns checks: record types to monitor, any of A, AAAA, CNAME, MX, TXT, NS, SOA (default: ["A"]) |
pingPackets | number | No | Number of ping packets for ping checks (1 to 5). Other values are ignored |
timezone | string | No | IANA timezone for the check (for example America/New_York) |
Immediate recheck on failure is always enabled for new checks. Use Update Check to turn it off.
Default Expected Status Codes
| Check type | Default |
|---|---|
website | 200, 201, 202, 204, 301, 302, 303, 307, 308, 401, 403 |
rest_endpoint | 200, 201, 202, 204, 401, 403 |
redirect | 301, 302, 303, 307, 308 |
Response Validation
The responseValidation object supports:
| Field | Type | Description |
|---|---|---|
containsText | string[] | Strings that must appear in the response body (max 10, case-insensitive) |
containsTextMode | string | all (default): every containsText entry must appear. any: at least one |
notContainsText | string[] | Fail the check if any of these appear in the body (max 10, case-insensitive) |
jsonAssertions | object[] | Several JSONPath assertions (max 20, see below). Replaces jsonPath, jsonPathOperator and expectedValue |
jsonAssertionsMode | string | all (default): every assertion must pass (AND). any: one is enough (OR) |
jsonPath | string | Single JSONPath expression (max 500 characters). Ignored when jsonAssertions is set |
jsonPathOperator | string | How to compare the JSONPath result, see operators below |
expectedValue | any | Expected value at the JSONPath location (strings max 1,000 characters) |
Each entry in jsonAssertions has:
| Field | Type | Required | Description |
|---|---|---|---|
path | string | Yes | JSONPath, for example $.engines['mail-intake'].sinceMs (max 500 characters) |
operator | string | No | Defaults to equals |
expectedValue | any | Depends | Required for every operator except exists. Must be a number for the greater and less operators |
Operators: equals, not_equals, contains, exists, greater_than, greater_or_equal, less_than, less_or_equal.
{
"responseValidation": {
"notContainsText": ["maintenance"],
"jsonAssertionsMode": "all",
"jsonAssertions": [
{ "path": "$.status", "operator": "equals", "expectedValue": "ok" },
{ "path": "$.queue.depth", "operator": "less_than", "expectedValue": 1000 }
]
}
}Idempotency
The Idempotency-Key header is required for create requests. If you send the same key again within 24 hours, the API returns the original status and body instead of creating a duplicate check.
Keys are scoped to your account, not to a single API key. Use any unique value (for example a UUID) and generate a new one for each check you want to create.
Response
201 Created
{
"data": {
"id": "abc123def456"
}
}Only the new check ID is returned. Use Get Check to read the full check.
Error Responses
| Status | Description |
|---|---|
| 400 | Missing Idempotency-Key, invalid request body or validation failure |
| 403 | API key missing checks:write scope, the check type is not available on your plan, or the key is restricted and folder is not one of its folders |
| 409 | A check already exists for this URL, the domain is already monitored, or your plan’s check limit is reached |
| 422 | Malformed Idempotency-Key, or the key was already used for a different request |
| 429 | Rate limit exceeded, including the check creation limits |
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 IDPython
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())