Update and processing quarantine leads via REST API
This article explains a feature that lets you use the REST API to update leads stored in quarantine, and then release or reject them in the same request. It’s especially useful if you collect partial lead data first, hold the lead in quarantine, and then update and release it once the full information becomes available.
REST API key settings
Make sure the “Leads > Update & Quarantine Process” permissions are enabled on your API key before updating quarantined lead data.
To perform both in a single request, ensure both permissions are checked!
Quarantine Lead Data Update
To update the lead data, you'd need to run the below request on a VALID lead quarantined by your Campaign:
[PUT] https://{account}.leadbyte.com/restapi/v1.3/leads
Headers - X_KEY: [YOUR API KEY]{
"leads": [
{
"quarantineId": "2932682",
"update": {
"postcode": "TN25 6QD"
}
}
]
}
Populate the "quarantineId" field with the Quarantined Lead ID you intend to update, and then include any fields you want to update in the "update" array.
Response:
{
"status": "Success",
"message": "OK",
"leads": [
{
"quarantineId": "2932682",
"success": true,
"message": "Quarantine lead updated"
}
]
}
Release or Reject Quarantine Leads
Automate the release of quarantined leads into your campaign, or reject them into your system rejections
Release:
[POST] https://{account}.leadbyte.com/restapi/v1.3/quarantine/process
Headers - X_KEY: [YOUR API KEY]
{
"quarantineId": 8419715,
"action": "process"
}or Reject:
[POST] https://helpcentre.leadbyte.com/restapi/v1.3/quarantine/process
Headers - X_KEY: [YOUR API KEY]
{
"quarantineId": 8419715,
"action": "reject"
}
Responses:
{
"status": "Success",
"message": "Quarantined lead(s) processed successfully",
"details": {
"8419715": "Queued for processing"
}
}or:
{
"status": "Success",
"message": "Quarantined lead(s) processed successfully",
"details": {
"8419715": "Queued for rejection"
}
}
Update quarantined lead data AND release or reject
This allows you to combine both actions into a single request.
To update and release:
[PUT] https://{account}.leadbyte.com/restapi/v1.3/leads
Headers - X_KEY: [YOUR API KEY]
{
"leads": [
{
"quarantineId": "2932682",
"update": {
"postcode": "TN25 6QD"
},
"action": "process"
}
]
}
To update and reject:
[PUT] https://{account}.leadbyte.com/restapi/v1.3/leads
Headers - X_KEY: [YOUR API KEY]
{
"leads": [
{
"quarantineId": "2932682",
"update": {
"postcode": "TN25 6QD"
},
"action": "reject"
}
]
}
With their respective responses:
{
"status": "Success",
"message": "OK",
"leads": [
{
"quarantineId": "2932682",
"success": true,
"message": "Quarantine lead updated"
}
],
"quaratineReleaseResults": [
"Quarantine ID '2932682' queued for processing"
]
}or:
{
"status": "Success",
"message": "OK",
"leads": [
{
"quarantineId": "2932682",
"success": true,
"message": "Quarantine lead updated"
}
],
"quaratineReleaseResults": [
"Quarantine ID '2932682' queued for rejection"
]
}
As always, please feel free to raise a support ticket with any questions or concerns you might have.
Comments