Skip to main content
POST
/
api
/
deep-research
/
people
/
{id}
/
run
Start a deep research run for an existing person
curl --request POST \
  --url https://app.puffle.ai/api/deep-research/people/{id}/run \
  --header 'Authorization: Bearer <token>'
{
  "success": true
}

Overview

Kicks off the deep-research-enrich Trigger.dev task for a person that already exists. Typical uses:
  • Retrying a person whose previous run ended in status: "failed".
  • Refreshing an idle person whose report is stale.
Transition logic is guarded by an atomic compare-and-swap on the status column: only idle and failed flip to running. This means concurrent calls on the same person can never double-queue the pipeline — the second caller receives 409. Costs 1 DEEP_RESEARCH credit, charged only after the CAS succeeds. If Trigger.dev dispatch fails afterward, the row is flipped back to idle and no credit is charged. Internal UI endpoint. Partner-authenticated callers should re-submit the same LinkedIn URL via createResearchV1, which performs the equivalent failed-to-running re-trigger on its own.

AI agent notes

Async via Trigger.dev. The 200 response means the task is queued, not that the report is ready.Polling sequence:
  1. runDeepResearch returns 200 with success: true.
  2. Call getDeepResearchReport with the same id every 30 seconds.
  3. Stop when report is non-null (pipeline complete) or when the person’s status is failed again (double failure — surface to the human before retrying).
Status preconditions. The CAS requires status to be idle or failed. A 409 "Already running" means either the pipeline is currently running or the person is complete and there is nothing to re-run. Poll getDeepResearchReport instead of retrying runDeepResearch.Credit gating. A 402 response carries balance and required — surface these to the human and do not retry until credits are topped up.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Deep research person UUID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Run dispatched. Poll getDeepResearchReport every 30 seconds until status flips to complete.

success
enum<boolean>
required
Available options:
true