Reset a Lead
This API allows you to delete (reset) the selected custom activities, audit activities (such as ‘Change Owner’ and ‘Change Stage’), tasks and notes that are present on the specified lead.
- Specify the
ProspectId
(Lead Id) in the JSON body. This is a mandatory field. - Additionally, specify any one of custom activities, audit activities, tasks or notes. Either one of these are mandatory fields.
- Only those fields that are specified will be reset.
- The
accessKey
andsecretKey
you pass must be that of an admin user. - If the ‘From’ and ‘To’ dates are not passed, then all the records created, from the lead creation date to the present date, will be deleted (for the specified fields).
Notes:
- The supported DateTime format is UTC (YYYY-MM-DD HH:MM:SS).
- You can get the
ProspectId
(Lead Id) from any of the Get Lead APIs. - You can get the
TaskTypeId
from the Get List of Task Types. - You can get the
ActivityEventList
(activity event code) from the Get List of Activity Types API.- Alternatively, you can get it by navigating to My Profile>Settings>Leads>Activities and Scores>Custom Activities & Scores. The activity event code is listed under Code.
API URL
Request
Content-Type: application/json{ "ProspectId":"fea01c86-5617-44d6-8469-4dbc409ab8f8", "TaskTypeList":[ "3c8c1a5b-8374-11e7-ab78-02de49b06427", "128acb87-542d-11e8-8455-020714094d7e" ], "ActivityEventList":[ 166, 167 ], "ShouldDeleteProspectNotes":false, "AuditActivityList":[ "StageChange", "OwnerChange" ], "FromDate":"2020-10-14 18:30:00", "ToDate":"2020-10-16 18:29:59" }
Request Parameters
Parameter | Description |
---|---|
Prospect Id | The lead Id of the lead. This is mandatory. |
TaskTypeList | The |
ActivityEventList | The activity event code for the activities you want to delete on the lead. |
ShouldDeleteProspectNotes | If you want to delete the notes added on the lead, “true”. Else, “false”. |
AuditActivityList | The audits on the lead you want to delete. |
FromDate | The date from which you want to delete the lead’s data in UTC (YYYY-MM-DD HH:MM:SS). |
ToDate | The date up to which you want to delete the lead’s data in UTC (YYYY-MM-DD HH:MM:SS). |
Response
{ "Status": "Success", "Message": { "Message": "Your request for lead reset has been queued." } }
HTTP Response Codes
Code | Description |
---|---|
200 OK | This is the status code for successful API call. |
401 Unauthorized | The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
400 Bad Request | The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
404 Not Found | The API could not be found. Please check the API signature. |
429 Too Many Requests | API calls exceeded the limit of 25 in 5 second(s) |
500 Internal Server Error | The API called failed. There could be many reasons for it. Check the exception message to get more details. |