Replaces an existing lead.
This is a full replace: properties left out of the body are set to their empty value. `AssignedReasonIds` replaces the lead's reasons (an empty list removes them all); `Udfs` replaces its user-defined fields, and an empty list leaves them unchanged. Company fields are saved only when `CompanyId` is 0, and contact fields only when `ContactId` is 0; otherwise they come from the linked company or contact. The request is checked against the lead field rules configured for your crmSeries account. An unacknowledged lead is acknowledged by the update, so a later `POST /acknowledge` returns 400. Changing `OwnerId` restarts the lead's assigned date, clears its acknowledgement and notifies the new owner. A client_credentials caller may send the `X-On-Behalf-Of` header with a user's email; that user is then recorded as having modified (and, if not yet acknowledged, acknowledged) the lead.
/api/v2/leads/{leadId}Authentication
Choose one supported method for this request.
Parameters
leadIdpathinteger · int32requiredThe ID of the lead to update. Must be greater than zero.
X-On-Behalf-Ofheaderstring · emailEmail of an active user to act as. That user is recorded as the owner/author of what this request writes. Only client_credentials tokens may send it (others get 403); an email that matches no active user gets 400.
Request body
The lead's complete new values. Set `LeadId` to the same ID as `leadId`: the body value selects the lead that is updated.
leadIdinteger · int32ownerIdinteger · int32descriptionstringcommentsstringstatusIdinteger · int32sourceIdinteger · int32sourcestringnullablesourceLocationIdinteger · int32assignedReasonIdsinteger[]companyNamestringaddress1stringaddress2stringcitystringzipstringstatestringcountrystringcountystringfaxstringwebstringcompanyPhonestringcompanyIdinteger · int32contactIdinteger · int32titlestringpositionstringfirstNamestringlastNamestringdepartmentstringphonestringcellstringemailstringsourceUrlstringsourcePagestringbranchIdinteger · int32makestringmodelstringequipmentTypestringenterTypestring
Responses
Lead updated successfully.
isSuccessmessageerrorsdataRead the result from data. When isSuccess is false, errors lists what went wrong. Handling errors
recordTypestringnullableleadIDinteger · int32nullableownerIDinteger · int32nullablestatusIDinteger · int32nullablesourceIDinteger · int32nullablesourcestringnullablesourceLocationIDinteger · int32nullablesourceLocationstringnullableratingstringnullabledescriptionstringnullablecompanyIDinteger · int32nullablecompanyNamestringnullableaddress1stringnullablecitystringnullablestatestringnullablezipstringnullablecountystringnullablecountrystringnullablecontactIDinteger · int32nullablecontactNamestringnullablefirstNamestringnullablelastNamestringnullableemailstringnullablephonestringnullablecellstringnullableequipmentIDinteger · int32nullablemakestringnullablemodelstringnullableserialNostringnullablestockNostringnullableyearstringnullablehoursinteger · int32nullableattachmentsstringnullabledeletedbooleannullableownerNamestringnullablestatusNamestringnullablecommentsstringnullabledateAssignedstring · date-timenullabledateAcknowledgedstring · date-timenullabledateConvertedstring · date-timenullableaddress2stringnullablefaxstringnullabletitlestringnullablepositionstringnullablecompanyPhonestringnullablewebstringnullabledepartmentstringnullablefavoritebooleannullableassignedReasonIDsinteger[]nullablestrAssignedReasonsstring[]nullableassignedReasonsDisplaystringnullablelatitudenumber · doublenullablelongitudenumber · doublenullableequipmentTypestringnullablesourceUrlstringnullablesourcePagestringnullablebranchstringnullableassociatedQuoteinteger · int32nullableidentifierstringnullablebranchIDinteger · int32nullableclosedbooleannullablecanAcknowledgeboolean