Skip to main content
POST
/
api
/
campaigns
/
{id}
/
leads
Add prospects to a campaign
curl --request POST \
  --url https://app.puffle.ai/api/campaigns/{id}/leads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prospects": [
    {
      "email": "<string>",
      "linkedin_url": "<string>",
      "first_name": "<string>",
      "last_name": "<string>",
      "company": "<string>",
      "position": "<string>",
      "headline": "<string>",
      "custom_fields": {}
    }
  ]
}
'
{ "imported": 42, "duplicates": 8 }

Overview

Bulk-insert prospects into a draft campaign. Deduplicates by email (email campaigns) or linkedin_url (LinkedIn campaigns) — both within the batch and against existing rows. Identity is normalized (lowercased email; LinkedIn URLs stripped of trailing slashes and query strings). Only draft campaigns accept new prospects. After insert, campaigns.stats is recomputed atomically.
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
prospects
object[]
required

Prospects to insert. 1–1000 entries per request. Deduplicated within the batch and against existing prospects on the identity field.

Required array length: 1 - 1000 elements

Response

Prospects imported. Returns counts for inserted vs duplicate.

imported
integer
required

Count of prospects actually inserted.

Required range: 0 <= x <= 9007199254740991
duplicates
integer
required

Count rejected as duplicates — either already in the campaign or repeated within the batch.

Required range: 0 <= x <= 9007199254740991