Skip to main content

Archive/Delete Validation Job

Archive/Delete a completed or in-progress email validation job and its associated results.

API Reference

Endpoint

DELETE https://api.cliova.com/v1/webhooks/email-validations/bulk-emails/{id}/archive?apiKey={apiKey}
List ID

The id parameter is the identifier of the validation job you want to archive (e.g., list_12345 or 11bb57b9-0901-4fb9-9664-6548cdcd3172)

Parameters

Path Parameters

ParameterRequiredTypeDescription
idYesstringThe unique identifier of the validation job

Query Parameters

ParameterRequiredTypeDescription
apiKeyYesstringYour API authentication key

Code Examples

archiveValidationJob.js
async function archiveValidationJob(apiKey, listId) {
const baseUrl =
"https://api.cliova.com/v1/webhooks/email-validations/bulk-emails";
const url = `${baseUrl}/${listId}/archive?apiKey=${apiKey}`;

try {
const response = await fetch(url, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
},
});

if (!response.ok) {
const errorData = await response.json();
throw new Error(errorData.error?.message || "Archive operation failed");
}

const result = await response.json();
return result;
} catch (error) {
console.error("Error archiving validation job:", error);
throw error;
}
}

// ----- Usage Example -----
document.getElementById("archiveButton").addEventListener("click", async () => {
try {
await archiveValidationJob("your_api_key", "list_12345");
console.log("Validation job archived successfully");
} catch (error) {
console.error("Failed to archive validation job:", error);
}
});

Response

A successful archive operation returns a JSON response:

{
"success": true,
"message": "Validation job archived successfully"
}

Best Practices

Archival Strategy

Safe Archival

Follow these guidelines for safe archival:

  • Verify you have the correct list ID before archiving
  • Download and backup results before archival if needed
  • Handle archival confirmation in your UI
  • Implement proper error handling for failed archival operations
  • Keep track of archived job IDs for audit purposes
Important Note
  • Archival moves the job to archived status
  • All associated results and data will be preserved but marked as archived
  • In-progress validations will be stopped immediately

Need Help?

Support Resources