Skip to main content

Delete client's prospects

Remove prospects from a specific company within your agency account. This endpoint allows you to DELETE prospects from the company, updating the company's prospect database accordingly. It provides a response with the deletion request ID and the number of prospects removed. This functionality is essential for managing the prospects associated with a company and ensuring accurate records. For further actions, such as adding, refer to the related /companies endpoints.

Request

Endpoint

POST https://api.woodpecker.co/rest/v2/agency/companies/{company_id}/prospects/delete

Headers

x-api-key: {YOUR_API_KEY}
Content-Type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Parameters

ParameterRequiredDescription
company_idYesCompany ID
info

company_id parameter is required

Body

The request body is a JSON object with the property `type' holding types of prospects to delete within the company ID.

{
"type": "ALL"
}
info

Request body is required

warning

This action is irreversible!

Request sample

Remove prospects from the specific client's account

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/agency/companies/{company_id}/prospects/delete" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"type": "ALL"
}'

Response

Response examples

{
"deletion_request_id": 0,
"count": 0
}

Body schema

FieldTypeDescription
deletion_request_idintegerRequest ID
countintegerNumber of removed prospects