Run history & re-run
See what each automation did with each lead, and run it again once a failure is fixed.
Authenticated with ?privateKey=YOUR_KEY (see Authentication).
| POST | /admin/automations/re-trigger | Retrigger automations for specific leads |
| POST | /admin/automations/rerun-single | Rerun a specific automation type for a lead |
| GET | /v3/leads/{leadId}/automation-history | Lead automation history |
| GET | /v3/automations/{automationId}/runs | Get an automation's runs |
| GET | /v3/automations/stats | Get automation statistics |
curl -X GET "https://rest-dash.revealid.xyz/v3/leads/6530c1d2e3f4a5b6c7d8e9f2/automation-history?privateKey=YOUR_KEY"What each field accepts
| Field | Type | Limits and format | Accepted values |
|---|---|---|---|
| leadId* | string | — | any |
Use case: What happened to one lead
GET /v3/leads/{leadId}/automation-history lists every run recorded for that lead, newest first: status, message (the result or the error text), automation (_id, name and then, the action it runs) and executedAt. status is success, failed, skipped (the automation's filters left the lead out) or, for a run you started by hand, manual, rerun-automation-manually or Retriggered automation-manually. A leadId that isn't 24 characters answers 400; an unknown one answers 404 Lead not found. Use it to check whether a lead reached Slack, a CRM, a webhook or a campaign, and why a run failed.
Use case: What one automation did
GET /v3/automations/{automationId}/runs?websiteId=… lists the automation's runs of the last 7 days, newest first, one row per lead (its latest attempt): lead, company, domain, result (delivered, filtered when the automation's filters skipped the lead, or failed), detail (the outcome or the error text), durationMs and executedAt. counts gives all, delivered, filtered and failed for the same 7 days. Add result=failed to see only failures; page with limit (1–200, default 50) and skip (default 0). GET /v3/automations/stats?websiteId=… sums the last 7 days per automation (runs7d, delivered7d, failed7d, failedLeads7d).
Use case: Retry after a fix
GET /v3/automations/{automationId}/runs?websiteId=…&result=failed&idsOnly=true answers just leadIds (up to 20,000) of the leads whose latest attempt failed this week: send them as leadIds below.
POST /admin/automations/re-trigger with websiteId and the leadIds to run again (1–20,000 lead ids): those leads go back in the queue and every active automation of the website runs for them within a few minutes. Leads of another website are ignored; the answer's requeued says how many were queued, and each lead's history shows the real outcome once it has run. To rerun only one kind of automation for one lead, POST /admin/automations/rerun-single with leadId, websiteId and automationType (webhook, slack, hubspot, pipedrive, zoho, salesforce, gohighlevel, zapier, mailchimp or email-campaign). It runs right away and answers result: success, message (what happened, or the error) and executedAt. A webhook is sent again even if it went before. On success the lead's earlier failed runs of that automation are cleared from its history and any pending automatic retry is cancelled. An unknown automationType or a malformed id answers 400; a lead that isn't on that website, 404. Both calls are real sends.