Skip to main content
DELETE
/
api
/
campaigns
/
{id}
/
leads
Remove prospects from a campaign
curl --request DELETE \
  --url https://app.puffle.ai/api/campaigns/{id}/leads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prospect_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "all": true
}
'
{ "deleted": 3 }

Overview

Delete prospects from a draft campaign. Call with { all: true } to clear the entire roster, or { prospect_ids: [...] } to cherry-pick up to 500 at a time. Campaign stats are recomputed atomically after the delete.
This operation shares the URL path /api/campaigns/{id}/leads with other verbs. See the sibling page for related operations on the same resource.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Campaign UUID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json

Supply either prospect_ids (for targeted deletes) or all: true (for a wipe). At least one must be present.

prospect_ids
string<uuid>[]

Explicit list of prospect IDs to delete. 1–500 per call. Mutually exclusive with all.

Required array length: 1 - 500 elements
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
all
enum<boolean>

When true, deletes every prospect in the campaign. Overrides prospect_ids.

Available options:
true

Response

Prospects deleted. Returns the deletion count.

deleted
required

Count of prospects deleted, or the string "all" when the all flag was used.

Required range: 0 <= x <= 9007199254740991