cURL
curl --request POST \ --url https://upcron.io/api/heartbeats \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "Daily Backup Job", "project_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "grace_period": 3600, "cron_schedule": "0 2 * * *", "next_ping_at": "2024-01-02T12:00:00Z" } '
{ "message": "Heartbeat created successfully", "data": { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "name": "Daily Backup Job", "project_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "grace_period": 3600, "next_ping_at": "2024-01-02T12:00:00.000000Z", "cron_schedule": "0 2 * * *", "created_at": "2024-01-01T12:00:00.000000Z", "updated_at": "2024-01-01T12:00:00.000000Z", "ping_url": "https://ping.upcron.io/heartbeat/uuid", "start_url": "https://ping.upcron.io/heartbeat/uuid/start", "fail_url": "https://ping.upcron.io/heartbeat/uuid/fail", "project": { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "name": "My Project", "description": "Project description" } } }
Create a new heartbeat monitor for a project
Laravel Sanctum Bearer token authentication
255
"Daily Backup Job"
"9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
Grace period in seconds (60 to 86400)
60 <= x <= 86400
3600
"0 2 * * *"
"2024-01-02T12:00:00Z"
Heartbeat created successfully
"Heartbeat created successfully"
Show child attributes