Skip to main content
PATCH
Update Lead by ID
Update one lead that you name by its Octanist ID in the URL. The body takes the same changes as PATCH /api/leads, without the identifiers. Use this endpoint when you stored the Octanist lead ID, for example from the response of POST /api/leads. Use PATCH /api/leads when you only know the email, phone or your own external ID. Differences with PATCH /api/leads:
  • The URL names the lead. Sending id, externalId, email or phone in the body returns 400 VALIDATION_ERROR. To change contact details or the external ID, send them in set.
  • An unknown ID returns 404 NOT_FOUND. It is not kept as a pending update and not logged as a missed update.
  • There is no matching, so the Multiple Match Behavior and Same-Company Lead Matching settings do not apply.
Locked leads, which are over your plan’s lead limit, can be updated too. They still send conversions.

Path Parameters

Request Body

The status rules are the same as for PATCH /api/leads.

Example Request

Example Response

The response fields and warnings are the same as for PATCH /api/leads.

Error Responses

Authorizations

X-API-KEY
string
header
required

API key for authentication

Path Parameters

id
string
required

Octanist lead ID

Example:

"lead_abc123"

Body

application/json

The changes of PATCH /api/leads without identifiers: the URL names the lead. Sending id, externalId, email or phone returns 400.

status
enum<string>

New status. open reopens a qualified, won or lost lead; conversions already sent are not retracted. Takes precedence over changedTo if both are provided.

Available options:
open,
qualified,
won,
lost
Example:

"won"

changedTo
enum<string>

Legacy alias for status. Does not accept open.

Available options:
qualified,
won,
lost
Example:

"won"

value

Lead value. Strings such as "1.234,56" or "1,234.56" are converted to numbers. A string that is not a number, or a negative value, returns 400.

Required range: x >= 0
Example:

5000

note
string

Note to attach to the lead

lossReason
string

Reason for loss (only used when status is lost). Free text; when the workspace has a fixed list (GET /api/workspace, lostReasons), send one of those reasons.

set
object

New values to store on the matched lead. Identifiers only find the lead; these fields change it. null clears a field. Fields left out are not changed. Other keys return 400. set never changes more than one lead.

conversionEventId
string

ID of a won conversion from GET /api/workspace. Chooses which won conversion is sent when this lead is won, in this update or later. Other IDs return 400.

Example:

"conv_won_subscription"

Response

Lead updated

success
boolean
Example:

true

data
object
meta
object