Submit Heartbeat Event
Submit a heartbeat check-in to signal that a scheduled job or background task has run successfully. To record a new event, provide the heartbeat_id in the path. You can also include an optional result (e.g., success, fail) and a custom message in the request body to describe the event outcome.

Each check-in helps verify that your monitored service is operational and reporting on schedule. If check-ins are not received within the configured interval, the system will automatically mark the heartbeat as failed.

Use cases:
  • Automated job reporting — Ping this endpoint from cron jobs, queue workers, or scripts to indicate successful execution.
  • Failure tracking — Send a fail result to indicate that a job ran but encountered an issue.
  • Operational logging — Include meaningful messages with each event to support debugging and job history reviews.
Path Parameters
  • id string
    The ID of the heartbeat event.
Query Parameters
  • result (optional) string
    The result of the event. If not specified, it defaults to 'tick'. Other acceptable values include 'run', 'complete', and 'fail'.
    Example: 'tick'
  • message (optional) string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://data-gateway.api.pinghome.io/v1/heartbeat/{id}';

axios.get(url, {
  params: {
    result: 'tick',
    message: 'Tick event sent'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).