انتقل إلى المحتوى الرئيسي

Update a lead

PATCH 

/v1/agents/:agentId/leads/:leadId

x-scope: "leads:write"

Changes the fields you send. status must be the value of one of the agent's statuses, and a move the agent's status flow doesn't allow may be refused (422 invalid_request). A status change is recorded on the contact's timeline when the lead has a contact. Unlike a person's edit in the dashboard, an edit through the API never assigns an unassigned lead to anyone; assignLead does. pinned pins or unpins the lead for everyone on the agent; sending the state the lead is already in changes nothing, so a pinned lead keeps its place. name and phone are written to the lead's contact (a number can be on more than one contact). conversation_id attaches the lead to a conversation: the lead moves to the conversation's contact, which learns the name and phone of the contact the lead left where it has none; that contact and its notes stay as they are.

Request​

Responses​

The lead as it now is.

Response Headers
    X-Correlation-ID

    Correlation id for this request — paste into support tickets.