Skip to main content
DELETE
Erase Values of Custom Variables on a Lead
Using this endpoint, you are NOT deleting your custom variables, you are erasing the values within.
Company fields — companyName, companyIndustry, any company-prefixed key — reach the company record the lead is linked to, the same record every other lead linked to it reads, not that lead alone. The response says so: warnings carries a company-fields-write-company-record entry naming those keys in params.fields. It is informational, your request went through. To edit a company on purpose, use Upsert Company. companyDomain cannot be erased here — it is one of the identifiers this endpoint refuses.
On a lead with no linked contact, a write that would create the contact or its company requires the “Create contacts” or “Create companies” permission on the API key’s user, otherwise it fails with 403 CONTACT_CREATE_NOT_ALLOWED or 403 COMPANY_CREATE_NOT_ALLOWED and nothing is written. The error names that user; when the API key’s user is no longer in the team, it fails with 403 API_USER_NOT_IN_TEAM instead.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

leadId
string
required

The unique identifier of the lead

Query Parameters

customField1
string

Example custom variable

customField2
string

Example custom variable

customField3
string

Example custom variable

Response

Success

ok
boolean
Example:

true

warnings
object[]

Optional warnings, never a failure — the request went through. They tell you what happened to the company part: written, or skipped and why. See code.