Guide

Queued actions

Checks and crawls can take from seconds to minutes, so the API queues them instead of making you wait on an open connection. You start the action, get a job back straight away, and poll the job until it finishes.

How it works

  1. Call an action, such as check DNS. It answers 202 Accepted with a jobId and a statusUrl.
  2. Call GET /jobs/{jobId} every few seconds until status is done or failed.
  3. Read the outcome from the job’s result, or fetch fresh data, such as the health summary.

Jobs are kept for 24 hours. Statuses go queued → running → done or failed.

Prefer not to poll? Use webhooks to hear about downtime and findings as they happen.

1. Start an action

curl -X POST 'https://trackerv2.marketingplanet.global/api/v1/projects/6650a4c2e1b3d5f7a9c1e301/checks/dns' \
  -H 'Authorization: Bearer tk_live_YOUR_KEY'
202 Accepted
{
  "data": {
    "jobId": "6654e8a6c5f7b9d1e3a5c701",
    "kind": "dns-check",
    "status": "queued",
    "deduplicated": false,
    "statusUrl": "/api/v1/jobs/6654e8a6c5f7b9d1e3a5c701"
  }
}

2. Poll the job

curl 'https://trackerv2.marketingplanet.global/api/v1/jobs/6654e8a6c5f7b9d1e3a5c701' \
  -H 'Authorization: Bearer tk_live_YOUR_KEY'
200 OK
{
  "data": {
    "id": "6654e8a6c5f7b9d1e3a5c701",
    "kind": "dns-check",
    "projectId": "6650a4c2e1b3d5f7a9c1e301",
    "pageId": null,
    "status": "done",
    "result": {
      "status": "ok",
      "monitors": 4,
      "changed": 0
    },
    "errorClass": null,
    "errorMessage": null,
    "createdAt": "2026-10-06T09:30:00.000Z",
    "startedAt": "2026-10-06T09:30:01.000Z",
    "finishedAt": "2026-10-06T09:30:03.000Z"
  }
}

A complete example

Start a DNS check and wait for the result, polling every 2 seconds for up to 2 minutes:

const API = 'https://trackerv2.marketingplanet.global/api/v1';
const headers = { Authorization: `Bearer ${process.env.TRACKER_API_KEY}` };

async function runAndWait(projectId) {
  const start = await fetch(`${API}/projects/${projectId}/checks/dns`, {
    method: 'POST',
    headers,
  });
  const { data: queued } = await start.json();

  for (let attempt = 0; attempt < 60; attempt++) {
    await new Promise((r) => setTimeout(r, 2000)); // every 2 seconds
    const res = await fetch(`${API}/jobs/${queued.jobId}`, { headers });
    const { data: job } = await res.json();
    if (job.status === 'done') return job.result;
    if (job.status === 'failed') throw new Error(job.errorMessage);
  }
  throw new Error('Job did not finish in 2 minutes');
}

Safe retries

If the same action is already queued or running for that project (or page), the API returns that job with "deduplicated": true instead of starting another. So retrying after a timeout never piles up duplicate work, and checks started from the dashboard count too.

The uptime probe is the exception: it runs immediately and returns the result, counts against the project owner’s monthly check budget, and is limited to one per project every 30 seconds.

Queued actions