Revenue

Run Promise Leak Audit

Run Promise Leak Audit reads the last six months of connected Gmail. The button sends lookbackDays 180. One audit runs at a time; poll the scan id for progress.

post/v1/revenue-leak-scans

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /v1/revenue-leak-scans
  • Auth: HTTP bearer

Request body

lookbackDaysinteger

Historical lookback in days. Run Promise Leak Audit sends 180. Omitted values use 180. Maximum 365.

Example request

{
  "lookbackDays": 180
}

Response

Scan started.

actionsCreatedinteger

New queue actions created.

candidatesSeeninteger

Detector candidates found.

commitmentsCreatedinteger

New commitments recorded.

completedAtstring date-time nullable

Completion time.

errorstring

Bounded failure reason.

evidencesCreatedinteger

New evidence rows recorded.

idstring uuid required

Stable UUID primary key.

lookbackDaysinteger required

Historical lookback in days.

mode'local' | 'linked' required

Workspace mode at scan time.

relationshipsCreatedinteger

New relationships recorded.

sourceFreshnessAtstring date-time nullable

Newest source timestamp observed (incremental cursor).

startedAtstring date-time nullable

Start time.

status'pending' | 'running' | 'completed' | 'failed' required

Scan status.

threadsDeepReadinteger

Threads examined from complete message bodies.

threadsSeeninteger

Threads examined.

threadsSkippedinteger

Threads skipped because readable evidence was unavailable.

threadsSnippetOnlyinteger

Threads examined from snippets only.

Example response

{
  "actionsCreated": 5,
  "candidatesSeen": 7,
  "commitmentsCreated": 4,
  "completedAt": "2026-07-23T12:00:40Z",
  "evidencesCreated": 5,
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "lookbackDays": 180,
  "mode": "local",
  "relationshipsCreated": 3,
  "sourceFreshnessAt": "2026-07-22T09:00:00Z",
  "startedAt": "2026-07-23T12:00:00Z",
  "status": "running",
  "threadsDeepRead": 30,
  "threadsSeen": 42,
  "threadsSkipped": 4,
  "threadsSnippetOnly": 8
}

Changes

No recorded changes to this operation across all 50 revisions of this API.