Skip to content

Ping Endpoint

The ping endpoint accepts heartbeat signals from your jobs.

https://ping.pakyas.com/{public_id}

The public_id is the unique identifier for your check, shown in the dashboard.

Signal that a job completed successfully.

Terminal window
curl -fsS https://ping.pakyas.com/{public_id}
MethodGET or POST
Response200 OK

Signal that a job has started.

Terminal window
curl -fsS https://ping.pakyas.com/{public_id}/start
MethodGET or POST
Response200 OK

Signal that a job has failed.

Terminal window
curl -fsS https://ping.pakyas.com/{public_id}/fail
MethodGET or POST
Response200 OK

Signal completion with a specific exit code. Non-zero is treated as failure.

Terminal window
curl -fsS https://ping.pakyas.com/{public_id}/1
MethodGET or POST
Response200 OK
Path ParameterExit code (0-255)

For accurate duration measurement, send the measured time with your completion ping:

Header (recommended):

Terminal window
curl -H "X-Pakyas-Duration: 1523" https://ping.pakyas.com/{id}

Query parameter:

Terminal window
curl "https://ping.pakyas.com/{id}?duration=1523"

The server uses this value if provided, otherwise calculates duration from start/end timestamps.

Notes:

  • Duration is only accepted on completion pings (success/fail), not start pings
  • Must be a non-negative integer in milliseconds
  • Maximum: 7 days (604,800,000 ms)
  • Client-supplied duration is trusted; Pakyas does not verify it

For POST requests, you can include a body with error details:

Terminal window
curl -X POST https://ping.pakyas.com/{public_id}/fail \
-H "Content-Type: text/plain" \
-d "Error: Connection refused to database"

The body is stored and included in alerts. A JSON body’s log field is stored the same way:

Terminal window
curl -X POST https://ping.pakyas.com/{public_id}/fail \
-H "Content-Type: application/json" \
-d '{"log": "Error: Connection refused to database"}'

How much of the body Pakyas keeps depends on your organization’s plan:

PlanBody kept
Free5 KB
Developer25 KB
Pro100 KB
Business250 KB

A longer body is still accepted and the ping is recorded, but only the first 5/25/100/250 KB of the body is kept (cut on a character boundary).

The ping endpoint accepts bodies up to 250 KB (256,000 bytes). A larger plain text body is rejected with 413 Payload Too Large, and the ping is not recorded. A JSON log larger than that is cut to 250 KB instead of rejected.

CodeMeaning
204Ping accepted (no response body)
400The public ID isn’t a valid UUID, or the body is invalid
413Plain text body over 250 KB; the ping was not recorded
429Rate limited; see the X-RateLimit-* headers
502, 503The ping couldn’t be queued; it was not recorded, so retry
Terminal window
# Simple success ping
0 * * * * /path/to/job.sh && curl -fsS https://ping.pakyas.com/{id}
# With start/success/fail
0 * * * * curl -fsS https://ping.pakyas.com/{id}/start && /path/to/job.sh && curl -fsS https://ping.pakyas.com/{id} || curl -fsS https://ping.pakyas.com/{id}/fail
#!/bin/bash
curl -fsS https://ping.pakyas.com/{id}/start
if ./my-job.sh 2>&1 | tee /tmp/output.log; then
curl -fsS https://ping.pakyas.com/{id}
else
curl -fsS https://ping.pakyas.com/{id}/fail -d @/tmp/output.log
fi
import requests
def ping_success(check_id):
requests.get(f"https://ping.pakyas.com/{check_id}")
def ping_fail(check_id, error_message):
requests.post(
f"https://ping.pakyas.com/{check_id}/fail",
data=error_message
)
  • Pings are idempotent - sending the same ping multiple times is safe
  • Timeout: 10 seconds recommended
  • Retry: 1-2 retries on failure is recommended for critical jobs