Skip to content

Push leads into a list

POST
/lists/{id}/leads
curl --request POST \
--url https://app.whatsetter.com/api/v1/lists/example/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "leads": [ { "phone": "example", "name": "example", "email": "example", "custom_variables": {} } ] }'

The CRM-integration primitive: add up to 500 leads per call. Phones are deduplicated (within the batch and against the list). Imported leads go through WhatSetter’s normal verification and anti-ban sending pipeline. Requires scope lists:write.

id
required
string
Media typeapplication/json
object
leads
required
Array<object>
>= 1 items <= 500 items
object
phone
required

International format, e.g. +33612345678.

string
name
string
<= 255 characters
email
string
<= 255 characters
custom_variables

Free-form variables usable in message personalization.

object
Examplegenerated
{
"leads": [
{
"phone": "example",
"name": "example",
"email": "example",
"custom_variables": {}
}
]
}

Import result

Media typeapplication/json
object
data
object
imported
integer
duplicates_in_list
integer
rejected
Array<object>
object
index
integer
reason
string
lead_ids
Array<string>
Examplegenerated
{
"data": {
"imported": 1,
"duplicates_in_list": 1,
"rejected": [
{
"index": 1,
"reason": "example"
}
],
"lead_ids": [
"example"
]
}
}

Missing, unknown or revoked API key

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Resource not found in this workspace

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Invalid parameter or body

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}