Skip to content

Lead

Read one lead, update its stage, assignment, contact details and tags.

Get lead

GET/v1/leads/{lead_id}/
leads:read

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
Response fields (200)
FieldTypeNotes
ad_titlestringread-only
archivedbooleanread-only
channelsstring[]read-only
closerobjectread-only
closer.member_idstringread-only
closer.namestringread-only
conversation_idstring | nullread-only
conversationsobject[]read-only
conversations[].channelstringread-only
conversations[].idstringread-only
created_atstring (date-time)read-only
display_namestringread-only
has_emailbooleanread-only
has_phonebooleanread-only
idstringread-only
inbox_urlstring | nullread-only
instagram_namestring | nullread-only
instagram_usernamestring | nullread-only
is_ad_leadbooleanread-only
is_excludedbooleanread-only
is_reachablebooleanread-only
is_spambooleanread-only
locationobject | nullread-only
location.citystring | nullread-only
location.countrystringread-only
setterobjectread-only
setter.member_idstringread-only
setter.namestringread-only
sourcestringread-only
source_media_typestringread-only
stagestring | nullread-only
stage_keystringread-only
stage_namestringread-only
tagsobject[]read-only
tags[].applied_bystringread-only
tags[].idstringread-only
tags[].namestringread-only
unlocked_atstring (date-time)read-only
unqualification_reasonstringread-only
updated_atstring (date-time)read-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X GET "https://api.themochi.app/v1/leads/<lead_id>/" \
  -H "Authorization: Bearer $MOCHI_API_KEY"

Update lead

PATCH/v1/leads/{lead_id}/
leads:writeIdempotency-Key required

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
Idempotency-Keyrequiredheaderstring (uuid)UUID4 identifying one intended write. Reuse it only when retrying that same write.

Request body

FieldTypeNotes
archivedboolean—
stagestringone of NEW, IN_CONTACT, QUALIFIED, UNQUALIFIED, BOOKED_CALL, DEPOSIT, WON, LOST, NO_SHOW
stage_keystringmax length 32
unqualification_reasonstringone of underaged, time_waster, no_money, language_barrier, ghosted, unclear, no_reason
Response fields (200)
FieldTypeNotes
ad_titlestringread-only
archivedbooleanread-only
channelsstring[]read-only
closerobjectread-only
closer.member_idstringread-only
closer.namestringread-only
conversation_idstring | nullread-only
conversationsobject[]read-only
conversations[].channelstringread-only
conversations[].idstringread-only
created_atstring (date-time)read-only
display_namestringread-only
has_emailbooleanread-only
has_phonebooleanread-only
idstringread-only
inbox_urlstring | nullread-only
instagram_namestring | nullread-only
instagram_usernamestring | nullread-only
is_ad_leadbooleanread-only
is_excludedbooleanread-only
is_reachablebooleanread-only
is_spambooleanread-only
locationobject | nullread-only
location.citystring | nullread-only
location.countrystringread-only
setterobjectread-only
setter.member_idstringread-only
setter.namestringread-only
sourcestringread-only
source_media_typestringread-only
stagestring | nullread-only
stage_keystringread-only
stage_namestringread-only
tagsobject[]read-only
tags[].applied_bystringread-only
tags[].idstringread-only
tags[].namestringread-only
unlocked_atstring (date-time)read-only
unqualification_reasonstringread-only
updated_atstring (date-time)read-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 409The write conflicts with current state or an identical request is still running.
  • 422The write contains fields outside its closed input schema.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X PATCH "https://api.themochi.app/v1/leads/<lead_id>/" \
  -H "Authorization: Bearer $MOCHI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
  -H "Content-Type: application/json" \
  -d '{"archived":true,"stage":"NEW","stage_key":"string","unqualification_reason":"underaged"}'

Assign a lead

PUT/v1/leads/{lead_id}/assignment/
leads:writeIdempotency-Key required

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
Idempotency-Keyrequiredheaderstring (uuid)UUID4 identifying one intended write. Reuse it only when retrying that same write.

Request body

FieldTypeNotes
closer_idinteger | null—
setter_idinteger | null—
Response fields (200)
FieldTypeNotes
ad_titlestringread-only
archivedbooleanread-only
channelsstring[]read-only
closerobjectread-only
closer.member_idstringread-only
closer.namestringread-only
conversation_idstring | nullread-only
conversationsobject[]read-only
conversations[].channelstringread-only
conversations[].idstringread-only
created_atstring (date-time)read-only
display_namestringread-only
has_emailbooleanread-only
has_phonebooleanread-only
idstringread-only
inbox_urlstring | nullread-only
instagram_namestring | nullread-only
instagram_usernamestring | nullread-only
is_ad_leadbooleanread-only
is_excludedbooleanread-only
is_reachablebooleanread-only
is_spambooleanread-only
locationobject | nullread-only
location.citystring | nullread-only
location.countrystringread-only
setterobjectread-only
setter.member_idstringread-only
setter.namestringread-only
sourcestringread-only
source_media_typestringread-only
stagestring | nullread-only
stage_keystringread-only
stage_namestringread-only
tagsobject[]read-only
tags[].applied_bystringread-only
tags[].idstringread-only
tags[].namestringread-only
unlocked_atstring (date-time)read-only
unqualification_reasonstringread-only
updated_atstring (date-time)read-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 409The write conflicts with current state or an identical request is still running.
  • 422The write contains fields outside its closed input schema.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X PUT "https://api.themochi.app/v1/leads/<lead_id>/assignment/" \
  -H "Authorization: Bearer $MOCHI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
  -H "Content-Type: application/json" \
  -d '{"closer_id":1,"setter_id":1}'

Update lead contact

PATCH/v1/leads/{lead_id}/contact/
leads:writeIdempotency-Key required

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
Idempotency-Keyrequiredheaderstring (uuid)UUID4 identifying one intended write. Reuse it only when retrying that same write.

Request body

FieldTypeNotes
emailstring (email)max length 254
overwriteboolean—
phone_numberstringmax length 255
Response fields (200)
FieldTypeNotes
ad_titlestringread-only
archivedbooleanread-only
channelsstring[]read-only
closerobjectread-only
closer.member_idstringread-only
closer.namestringread-only
conversation_idstring | nullread-only
conversationsobject[]read-only
conversations[].channelstringread-only
conversations[].idstringread-only
created_atstring (date-time)read-only
display_namestringread-only
has_emailbooleanread-only
has_phonebooleanread-only
idstringread-only
inbox_urlstring | nullread-only
instagram_namestring | nullread-only
instagram_usernamestring | nullread-only
is_ad_leadbooleanread-only
is_excludedbooleanread-only
is_reachablebooleanread-only
is_spambooleanread-only
locationobject | nullread-only
location.citystring | nullread-only
location.countrystringread-only
setterobjectread-only
setter.member_idstringread-only
setter.namestringread-only
sourcestringread-only
source_media_typestringread-only
stagestring | nullread-only
stage_keystringread-only
stage_namestringread-only
tagsobject[]read-only
tags[].applied_bystringread-only
tags[].idstringread-only
tags[].namestringread-only
unlocked_atstring (date-time)read-only
unqualification_reasonstringread-only
updated_atstring (date-time)read-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 409The write conflicts with current state or an identical request is still running.
  • 422The write contains fields outside its closed input schema.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X PATCH "https://api.themochi.app/v1/leads/<lead_id>/contact/" \
  -H "Authorization: Bearer $MOCHI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
  -H "Content-Type: application/json" \
  -d '{"email":"string","overwrite":true,"phone_number":"string"}'

Get lead intelligence

GET/v1/leads/{lead_id}/intelligence/
leads:readsignals:read

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
Response fields (200)
FieldTypeNotes
ai_modeobjectread-only
ai_mode.enabledbooleanread-only
ai_mode.statusstringread-only
conversation_stageobjectread-only
conversation_stage.entered_atstring (date-time)read-only
conversation_stage.valuestringread-only
engagementobjectread-only
engagement.avg_scorenumberread-only
engagement.computed_atstring (date-time)read-only
engagement.max_scorenumberread-only
engagement.question_countintegerread-only
engagement.trendstringread-only
last_lead_message_atstring (date-time)read-only
last_org_message_atstring (date-time)read-only
objectionobjectread-only
objection.presentbooleanread-only
objection.typestringread-only
outcomeobjectread-only
outcome.computed_atstring (date-time)read-only
outcome.confidencenumberread-only
outcome.valuestringread-only
sentimentobjectread-only
sentiment.computed_atstring (date-time)read-only
sentiment.confidencenumberread-only
sentiment.valuestringread-only
windowobjectread-only
window.expires_atstring (date-time)read-only
window.statusstringread-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X GET "https://api.themochi.app/v1/leads/<lead_id>/intelligence/" \
  -H "Authorization: Bearer $MOCHI_API_KEY"

Get lead signals

GET/v1/leads/{lead_id}/signals/
signals:read

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
signal_typequerystringone of BOOKING_LINK, PAYMENT_LINK, QUALIFIER_LINK, NURTURE_LINK, CALL_CONFIRMED, PRICE_DISCUSSED, OBJECTION_RAISED, OBJECTION_OVERCOME, HIGH_ENGAGEMENT, WENT_COLD, GHOSTED, SCHEDULING_PROPOSED, SCHEDULING_CONFIRMED, CONTACT_EXCHANGED
lead_idqueryintegermin 1
detected_sincequerystring (date-time)—
updated_sincequerystring (date-time)—
min_confidencequerynumbermin 0 · max 1
cursorquerystring—
page_sizequeryintegermin 1 · max 100
Response fields (200)
FieldTypeNotes
datarequiredobject[]—
data[].confidencenumberread-only
data[].detected_atstring (date-time)read-only
data[].idstringread-only
data[].lead_idstringread-only
data[].signal_typestringread-only
next_cursorrequiredstring | null—

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X GET "https://api.themochi.app/v1/leads/<lead_id>/signals/" \
  -H "Authorization: Bearer $MOCHI_API_KEY"

Add tags to a lead

POST/v1/leads/{lead_id}/tags/
leads:writeIdempotency-Key required

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
Idempotency-Keyrequiredheaderstring (uuid)UUID4 identifying one intended write. Reuse it only when retrying that same write.

Request body

FieldTypeNotes
tag_idrequiredinteger—
Response fields (201)
FieldTypeNotes
ad_titlestringread-only
archivedbooleanread-only
channelsstring[]read-only
closerobjectread-only
closer.member_idstringread-only
closer.namestringread-only
conversation_idstring | nullread-only
conversationsobject[]read-only
conversations[].channelstringread-only
conversations[].idstringread-only
created_atstring (date-time)read-only
display_namestringread-only
has_emailbooleanread-only
has_phonebooleanread-only
idstringread-only
inbox_urlstring | nullread-only
instagram_namestring | nullread-only
instagram_usernamestring | nullread-only
is_ad_leadbooleanread-only
is_excludedbooleanread-only
is_reachablebooleanread-only
is_spambooleanread-only
locationobject | nullread-only
location.citystring | nullread-only
location.countrystringread-only
setterobjectread-only
setter.member_idstringread-only
setter.namestringread-only
sourcestringread-only
source_media_typestringread-only
stagestring | nullread-only
stage_keystringread-only
stage_namestringread-only
tagsobject[]read-only
tags[].applied_bystringread-only
tags[].idstringread-only
tags[].namestringread-only
unlocked_atstring (date-time)read-only
unqualification_reasonstringread-only
updated_atstring (date-time)read-only

Responses

  • 201Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 409The write conflicts with current state or an identical request is still running.
  • 422The write contains fields outside its closed input schema.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X POST "https://api.themochi.app/v1/leads/<lead_id>/tags/" \
  -H "Authorization: Bearer $MOCHI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
  -H "Content-Type: application/json" \
  -d '{"tag_id":1}'

Remove a tag from a lead

DELETE/v1/leads/{lead_id}/tags/{tag_id}/
leads:writeIdempotency-Key required

Parameters

NameInTypeNotes
lead_idrequiredpathinteger—
tag_idrequiredpathinteger—
Idempotency-Keyrequiredheaderstring (uuid)UUID4 identifying one intended write. Reuse it only when retrying that same write.

Request body

FieldTypeNotes
suppressboolean—
Response fields (200)
FieldTypeNotes
ad_titlestringread-only
archivedbooleanread-only
channelsstring[]read-only
closerobjectread-only
closer.member_idstringread-only
closer.namestringread-only
conversation_idstring | nullread-only
conversationsobject[]read-only
conversations[].channelstringread-only
conversations[].idstringread-only
created_atstring (date-time)read-only
display_namestringread-only
has_emailbooleanread-only
has_phonebooleanread-only
idstringread-only
inbox_urlstring | nullread-only
instagram_namestring | nullread-only
instagram_usernamestring | nullread-only
is_ad_leadbooleanread-only
is_excludedbooleanread-only
is_reachablebooleanread-only
is_spambooleanread-only
locationobject | nullread-only
location.citystring | nullread-only
location.countrystringread-only
setterobjectread-only
setter.member_idstringread-only
setter.namestringread-only
sourcestringread-only
source_media_typestringread-only
stagestring | nullread-only
stage_keystringread-only
stage_namestringread-only
tagsobject[]read-only
tags[].applied_bystringread-only
tags[].idstringread-only
tags[].namestringread-only
unlocked_atstring (date-time)read-only
unqualification_reasonstringread-only
updated_atstring (date-time)read-only

Responses

  • 200Success
  • 400The request is invalid.
  • 401Authentication is missing, invalid, or revoked.
  • 403The authenticated identity lacks the required scope or capability.
  • 404The resource is unavailable or not visible to this organization.
  • 409The write conflicts with current state or an identical request is still running.
  • 422The write contains fields outside its closed input schema.
  • 429The request-rate budget is exhausted.

Example request

curl
curl -X DELETE "https://api.themochi.app/v1/leads/<lead_id>/tags/<tag_id>/" \
  -H "Authorization: Bearer $MOCHI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen | tr A-Z a-z)" \
  -H "Content-Type: application/json" \
  -d '{"suppress":true}'