PUT
/
api
/
leads
/
update
/
Update a Lead with Phone / Email Match
curl --request PUT \
  --url https://api.trysela.com/api/leads/update/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "phone_number": "<string>",
  "metadata": "<any>",
  "status": "UNKNOWN",
  "status_reason": "UNKNOWN",
  "lead_type": 123,
  "external_id": "<string>",
  "us_state": "AL",
  "lead_source": "<string>",
  "reengagement_count": 1073741823,
  "reengagement_time": "2023-11-07T05:31:56Z",
  "call_schedule_start_time": "2023-11-07T05:31:56Z"
}'
{
  "id": 123,
  "email": "jsmith@example.com",
  "phone_number": "<string>",
  "metadata": "<any>",
  "modified_time": "2023-11-07T05:31:56Z",
  "created_time": "2023-11-07T05:31:56Z",
  "status": "UNKNOWN",
  "status_reason": "UNKNOWN",
  "lead_type": 123,
  "next_call_time": "<string>",
  "external_id": "<string>",
  "us_state": "AL",
  "lead_source": "<string>",
  "reengagement_count": 1073741823,
  "reengagement_time": "2023-11-07T05:31:56Z",
  "call_schedule_start_time": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Body

phone_number
string
required

The phone number of the lead. Either E.164 or US format. Must have a valid area code.

email
string<email> | null

The email address of the lead.

metadata
any

Any additional information associated with the lead as json metadata. Any of the values supplied here can be used by the agent in the talk track. Any additional payload fields that are not part of the Lead model will be automatically stored in the metadata upon lead creation or update, so lead metadata can also be sent as additional keys in the payload. Common fields to include in the metadata are first_name and last_name.

status
enum<string>

The status of the lead. This is updated automatically.

  • UNKNOWN - Unknown
  • NEW - New
  • OPEN - Open
  • CALLBACK_TO_TRANSFER - Callback to transfer
  • CLOSED - Closed
  • CLOSED_INCOMPLETE - Closed incomplete
  • LOST - Lost
  • SCHEDULE_COMPLETED - Schedule completed
  • OUT_OF_TERRITORY - Out of territory
  • BAD_NUMBER - Bad number
  • CANCELLED - Cancelled
Available options:
UNKNOWN,
NEW,
OPEN,
CALLBACK_TO_TRANSFER,
CLOSED,
CLOSED_INCOMPLETE,
LOST,
SCHEDULE_COMPLETED,
OUT_OF_TERRITORY,
BAD_NUMBER,
CANCELLED
status_reason

The reason for the current status of the lead. This is updated automatically.

  • UNKNOWN - Unknown
  • WEBHOOK - Webhook
  • MANUAL - Manual
  • CHAT - Chat
  • REENGAGEMENT - Reengagement
Available options:
UNKNOWN,
WEBHOOK,
MANUAL,
CHAT,
REENGAGEMENT
lead_type
integer | null

The id of the campaign this lead is a part of.

external_id
string | null

The external id of the lead. This can be your CRM id.

Maximum length: 255
us_state

The US state of the lead. This is used to determine the timezone of the lead, as well as for compliance with telemarketing regulations.

  • AL - Alabama
  • AK - Alaska
  • AS - American Samoa
  • AZ - Arizona
  • AR - Arkansas
  • AA - Armed Forces Americas
  • AE - Armed Forces Europe
  • AP - Armed Forces Pacific
  • CA - California
  • CO - Colorado
  • CT - Connecticut
  • DE - Delaware
  • DC - District of Columbia
  • FL - Florida
  • GA - Georgia
  • GU - Guam
  • HI - Hawaii
  • ID - Idaho
  • IL - Illinois
  • IN - Indiana
  • IA - Iowa
  • KS - Kansas
  • KY - Kentucky
  • LA - Louisiana
  • ME - Maine
  • MD - Maryland
  • MA - Massachusetts
  • MI - Michigan
  • MN - Minnesota
  • MS - Mississippi
  • MO - Missouri
  • MT - Montana
  • NE - Nebraska
  • NV - Nevada
  • NH - New Hampshire
  • NJ - New Jersey
  • NM - New Mexico
  • NY - New York
  • NC - North Carolina
  • ND - North Dakota
  • MP - Northern Mariana Islands
  • OH - Ohio
  • OK - Oklahoma
  • OR - Oregon
  • PA - Pennsylvania
  • PR - Puerto Rico
  • RI - Rhode Island
  • SC - South Carolina
  • SD - South Dakota
  • TN - Tennessee
  • TX - Texas
  • UT - Utah
  • VT - Vermont
  • VI - Virgin Islands
  • VA - Virginia
  • WA - Washington
  • WV - West Virginia
  • WI - Wisconsin
  • WY - Wyoming
Available options:
AL,
AK,
AS,
AZ,
AR,
AA,
AE,
AP,
CA,
CO,
CT,
DE,
DC,
FL,
GA,
GU,
HI,
ID,
IL,
IN,
IA,
KS,
KY,
LA,
ME,
MD,
MA,
MI,
MN,
MS,
MO,
MT,
NE,
NV,
NH,
NJ,
NM,
NY,
NC,
ND,
MP,
OH,
OK,
OR,
PA,
PR,
RI,
SC,
SD,
TN,
TX,
UT,
VT,
VI,
VA,
WA,
WV,
WI,
WY
lead_source
string | null

The source of the lead. This can be used to track the lead provider.

Maximum length: 255
reengagement_count
integer | null

The number of times this lead has been reengaged.

Required range: 0 <= x <= 2147483647
reengagement_time
string<date-time> | null

The time this lead was reengaged.

call_schedule_start_time
string<date-time> | null

Response

200 - application/json
id
integer
required
phone_number
string
required

The phone number of the lead. Either E.164 or US format. Must have a valid area code.

modified_time
string<date-time>
required

The last time this lead was modified.

created_time
string<date-time>
required

The time this lead was created.

next_call_time
string | null
required

The time of the next call scheduled for this lead.

email
string<email> | null

The email address of the lead.

metadata
any

Any additional information associated with the lead as json metadata. Any of the values supplied here can be used by the agent in the talk track. Any additional payload fields that are not part of the Lead model will be automatically stored in the metadata upon lead creation or update, so lead metadata can also be sent as additional keys in the payload. Common fields to include in the metadata are first_name and last_name.

status
enum<string>

The status of the lead. This is updated automatically.

  • UNKNOWN - Unknown
  • NEW - New
  • OPEN - Open
  • CALLBACK_TO_TRANSFER - Callback to transfer
  • CLOSED - Closed
  • CLOSED_INCOMPLETE - Closed incomplete
  • LOST - Lost
  • SCHEDULE_COMPLETED - Schedule completed
  • OUT_OF_TERRITORY - Out of territory
  • BAD_NUMBER - Bad number
  • CANCELLED - Cancelled
Available options:
UNKNOWN,
NEW,
OPEN,
CALLBACK_TO_TRANSFER,
CLOSED,
CLOSED_INCOMPLETE,
LOST,
SCHEDULE_COMPLETED,
OUT_OF_TERRITORY,
BAD_NUMBER,
CANCELLED
status_reason

The reason for the current status of the lead. This is updated automatically.

  • UNKNOWN - Unknown
  • WEBHOOK - Webhook
  • MANUAL - Manual
  • CHAT - Chat
  • REENGAGEMENT - Reengagement
Available options:
UNKNOWN,
WEBHOOK,
MANUAL,
CHAT,
REENGAGEMENT
lead_type
integer | null

The id of the campaign this lead is a part of.

external_id
string | null

The external id of the lead. This can be your CRM id.

Maximum length: 255
us_state

The US state of the lead. This is used to determine the timezone of the lead, as well as for compliance with telemarketing regulations.

  • AL - Alabama
  • AK - Alaska
  • AS - American Samoa
  • AZ - Arizona
  • AR - Arkansas
  • AA - Armed Forces Americas
  • AE - Armed Forces Europe
  • AP - Armed Forces Pacific
  • CA - California
  • CO - Colorado
  • CT - Connecticut
  • DE - Delaware
  • DC - District of Columbia
  • FL - Florida
  • GA - Georgia
  • GU - Guam
  • HI - Hawaii
  • ID - Idaho
  • IL - Illinois
  • IN - Indiana
  • IA - Iowa
  • KS - Kansas
  • KY - Kentucky
  • LA - Louisiana
  • ME - Maine
  • MD - Maryland
  • MA - Massachusetts
  • MI - Michigan
  • MN - Minnesota
  • MS - Mississippi
  • MO - Missouri
  • MT - Montana
  • NE - Nebraska
  • NV - Nevada
  • NH - New Hampshire
  • NJ - New Jersey
  • NM - New Mexico
  • NY - New York
  • NC - North Carolina
  • ND - North Dakota
  • MP - Northern Mariana Islands
  • OH - Ohio
  • OK - Oklahoma
  • OR - Oregon
  • PA - Pennsylvania
  • PR - Puerto Rico
  • RI - Rhode Island
  • SC - South Carolina
  • SD - South Dakota
  • TN - Tennessee
  • TX - Texas
  • UT - Utah
  • VT - Vermont
  • VI - Virgin Islands
  • VA - Virginia
  • WA - Washington
  • WV - West Virginia
  • WI - Wisconsin
  • WY - Wyoming
Available options:
AL,
AK,
AS,
AZ,
AR,
AA,
AE,
AP,
CA,
CO,
CT,
DE,
DC,
FL,
GA,
GU,
HI,
ID,
IL,
IN,
IA,
KS,
KY,
LA,
ME,
MD,
MA,
MI,
MN,
MS,
MO,
MT,
NE,
NV,
NH,
NJ,
NM,
NY,
NC,
ND,
MP,
OH,
OK,
OR,
PA,
PR,
RI,
SC,
SD,
TN,
TX,
UT,
VT,
VI,
VA,
WA,
WV,
WI,
WY
lead_source
string | null

The source of the lead. This can be used to track the lead provider.

Maximum length: 255
reengagement_count
integer | null

The number of times this lead has been reengaged.

Required range: 0 <= x <= 2147483647
reengagement_time
string<date-time> | null

The time this lead was reengaged.

call_schedule_start_time
string<date-time> | null