Skip to main content
POST
ResumeLeadNextActionsAPI hands a lead the desk snoozed (held) or stopped (closed) back to the

Authorizations

Authorization
string
header
required

An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

Path Parameters

datasetSlug
string
required
leadRef
string
required

Body

application/json
decided_by_external_ref
string

Response

Success response

accompanying_email
AccompanyingEmailState is what a surface needs to render the email that went · object

out beside a gated decision: whether it went, when, in what words, and why it did not if it did not.

It joins the row's own columns (the authoritative state) with the draft stored in action_input, so a caller does not have to read two things and work out which one is true.

action_input
object
action_kind
string
approval_request_id
string
call_outcome
CallOutcome is how one placed call ended, in the call record's own words. · object
canonical_lead_id
string
created_by
string
dataset_id
string
decided_at
string<date-time>
decided_by
string
decided_by_external_ref
string

person who decided this action and the person who took it back: opaque strings Erdo stores verbatim and never interprets. An app on `/v1` authenticates a whole team with ONE organization API key, so DecidedBy is the same Erdo account for every decision; only the caller can say which of its users acted.

Attribution, never authentication. Anything holding the key can write any value here, so Erdo must never branch on it, authorize by it or resolve it against an Erdo identity, and it must never be presented as proof of who acted. Empty means the caller offered no name.

delivery_failure
DeliveryFailure is what the provider reported about a message the engine sent · object

and could not deliver.

due_at
string<date-time>
error
string
evaluated_at
string<date-time>
executed_at
string<date-time>
execution_ref
string
facts
LeadFacts is what an evaluation read about the lead. A nil field means it · object

read nothing.

A decision now carries only Language, the language the lead wrote in, which is the engine's own reading. What the lead stated is read from the lead's details instead. The other fields are filled only on decisions made before the engine read details.

handoff_alert
HandoffAlertState is what a surface needs to render the alert that told the desk a handoff is · object

waiting: whether it went, when, the message to open, and why not if it did not. The alert is the only MESSAGE a handoff produces (carrying a handoff out records "accepted" and sends nothing), so a surface showing what a handoff SENT reads this, not the row's execution ref. It reads only the row's own columns because buildHandoffAlert composes the alert at send time; the message itself is read back from the email service by ExecutionRef.

id
string
lead_reference
string
mode
string
model
string
playbook_revision
integer<int64>
policy_digest
string

is what says whether the decision is stale — not the revision number. The revision bumps on every save, so a decision at revision 9 may have been decided under exactly the rules revision 10 carries; comparing it with LeadPlaybook.PolicyDigest answers the question the revision only hints at. Empty on every decision written before digests existed and on one a person recorded by hand. See policy.go for the two halves it is made of.

priority
string
priority_reason
string
rationale
string
resumed_at
string<date-time>

handed the lead back to the engine (POST .../next-actions/resume). The revisit time is set to the same moment, so the engine decides for the lead on its next pass. Absent on every decision that was never resumed — a hold whose time simply ran out has none.

resumed_by
string
resumed_by_external_ref
string

who resumed it. Opaque, unverified, stored verbatim — attribution, never authority, exactly as DecidedByExternalRef.

revisit_at
string<date-time>
rule
string
source
string
stage
string
status
string
undone_by_external_ref
string