Skip to main content
DELETE
Delete many leads

Authorizations

Authorization
string
header
required

Authenticate with an API access token in the Authorization header: Authorization: Bearer <token>. Create a token from the API Access Tokens page in Contractors Cloud, under Integrations.

Query Parameters

action
enum<string>
required

preview returns a count of matching leads without deleting anything; delete permanently deletes every matching lead.

Available options:
preview,
delete
filter[id]
string<uuid>

Exact match on the lead's id.

filter[lead_connection_id]
string<uuid>

Exact match on the id of the lead connection the lead was submitted through.

filter[transaction_id]
string<uuid>

Exact match on the id of the submission the lead was part of.

filter[project_id]
integer

Exact match on the id of the project the lead was converted into.

filter[status]
enum<string>

Exact match on the lead's status. Allowed: queued, processing, needs-review, ready, error, converting, successful.

Available options:
queued,
processing,
needs-review,
ready,
error,
converting,
successful

Fuzzy search across the lead's status and its submitted and derived data.

Response

With action=preview, a count of the leads that match the current filters. With action=delete, a summary of how many leads were deleted.

total_leads_targeted_for_deletion
integer

The number of leads matching the current filters. Only present when action=preview.

message
string

A human-readable summary of how many leads were deleted. Only present when action=delete.