Skip to main content
POST
/
leads
/
{leadId}
/
variables
Add Custom Variables on Leads
curl --request POST \
  --url https://api.lemlist.com/api/leads/{leadId}/variables \
  --header 'Authorization: Basic <encoded-value>'
{
  "ok": true
}
This endpoint lets you add new variables to a lead. To do so, you can add as many custom fields as you want in the body of your request with the desired value for these new fields.
The purpose of this endpoint is first and foremost to create new variables, even though we have to give them specific values on a specific lead. That’s why you’ll get errors if you give variable names that already exist on a lead.By default, lemlist includes several variables related to leads: email, firstName, lastName, picture, phone, linkedinUrl, companyName, companyDomain, and icebreaker.Beware, you cannot add a new variable with the same name as an existing variable (default or custom).

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

The response is of type object.