Skip to main content

Check-ins

Check-ins (also called "landings") are how you report the status of your monitored services to CrossCheck. Whether you're confirming a cron job completed successfully, reporting a service health check, or signaling that a long-running process is still active, check-ins are the core mechanism for keeping CrossCheck informed about your infrastructure's health.

Check-in by API Key

POST /api/flights/check-in/

Authentication: Flight API key in header (not user token):

X-API-Key: <flight-api-key>

Request body:

FieldTypeRequiredDescription
statusstringNoSUCCESS, WARNING, ERROR (default SUCCESS)
metadataobjectNoArbitrary key-value data
runtime_durationnumberNoDuration in seconds
phasestringNoFor paired arrival: SINGLE, START, COMPLETE
pair_keystringNoLinks START/COMPLETE in paired arrival (user defined)

Response (201): Landing (check-in) object.

Notes: Rate limited at 10 requests per minute per flight. Also subject to allowed_ips if set.

Example

curl -X POST https://crosscheck.app/api/flights/check-in/ \
-H "X-API-Key: <flight-api-key>" \
-H "Content-Type: application/json" \
-d '{"status":"SUCCESS","metadata":{"version":"1.0.0"}}'

Test Check-in

POST /api/flights/test-check-in/

Same as check-in but authenticated with flight API key in X-API-Key header. Used to verify key and permissions (e.g. IP).

Response:

{
"message": "Test check-in working!"
}

Short URL Check-in (Heartbeat)

GET /c/{shortcode}/ POST /c/{shortcode}/

No API key or token required. Uses flight shortcode (shown on flight detail, e.g. short_check_in_url). Ideal for simple heartbeats (cron, health checks).

No request body required. Optional JSON body same as check-in (status, metadata, etc.).

Response (200):

{
"status": "ok"
}

Example

# Simple GET request
curl "https://crosscheck.app/c/Ab1Cd2Ef/"

# With status and metadata
curl -X POST "https://crosscheck.app/c/Ab1Cd2Ef/" \
-H "Content-Type: application/json" \
-d '{"status":"SUCCESS","metadata":{"source":"cron"}}'

Paired Arrival

For long-running jobs, you can send a START check-in when the job begins and a COMPLETE check-in when it finishes. Use the same pair_key to link them.

# Start of job
curl -X POST https://crosscheck.app/api/flights/check-in/ \
-H "X-API-Key: <flight-api-key>" \
-H "Content-Type: application/json" \
-d '{"phase":"START","pair_key":"job-123"}'

# End of job
curl -X POST https://crosscheck.app/api/flights/check-in/ \
-H "X-API-Key: <flight-api-key>" \
-H "Content-Type: application/json" \
-d '{"phase":"COMPLETE","pair_key":"job-123","status":"SUCCESS"}'