Update a lead
PATCH
/leads/{id}
const url = 'https://app.whatsetter.com/api/v1/leads/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"status":"qualified","tags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.whatsetter.com/api/v1/leads/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "status": "qualified", "tags": [ "example" ] }'Update a lead’s status and/or tags from your CRM. Setting status to
qualified stamps the qualification date (once). Requires scope
leads: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
status
string
tags
Array<string>
Responses
Section titled “Responses”The updated lead
Media typeapplication/json
object
data
object
id
string
phone
Digits with country code, no +
string | null
whatsapp_id
string | null
name
string | null
status
string | null
qualified
boolean
qualified_at
string | null format: date-time
replied
boolean
campaign_id
string | null
list_id
string | null
email
string | null
tags
Array<string>
messages_count
integer
booking_status
string | null
first_contact_at
string | null format: date-time
last_message_at
string | null format: date-time
last_message_direction
string | null
created_at
string format: date-time
updated_at
string format: date-time
Example
{ "data": { "status": "qualified", "last_message_direction": "inbound" }}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" }}
