Push leads into a list
POST
/lists/{id}/leads
const url = 'https://app.whatsetter.com/api/v1/lists/example/leads';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"leads":[{"phone":"example","name":"example","email":"example","custom_variables":{}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
leads
required
Array<object>
object
phone
required
International format, e.g. +33612345678.
string
name
string
email
string
custom_variables
Free-form variables usable in message personalization.
object
Examplegenerated
{ "leads": [ { "phone": "example", "name": "example", "email": "example", "custom_variables": {} } ]}Responses
Section titled “Responses”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" }}
