Skip to main content
POST
/
api
/
campaigns
/
campaigns
/
{campaignId}
/
add-contacts
Add contacts to a live campaign
curl --request POST \
  --url https://apiv1.delightloop.ai/api/campaigns/campaigns/{campaignId}/add-contacts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "contactIds": [
    "contact_123",
    "contact_456"
  ]
}
'
{
  "success": true,
  "message": "Successfully added 3 new recipients to live campaign",
  "campaignId": "camp-abc123",
  "recipientsCreated": 3,
  "recipientIds": [
    "recipient_123",
    "recipient_456",
    "recipient_789"
  ],
  "emailsSent": 3
}

Headers

x-api-key
string
required

auth key

Path Parameters

campaignId
string
required

Campaign ID

Example:

"camp-abcd1234"

Body

application/json
contactIds
string[]
required

Array of contact IDs to add to the live campaign

Example:
["contact_123", "contact_456"]

Response

Contacts added to live campaign successfully

success
boolean
required

Whether the operation was successful

Example:

true

message
string
required

Success message

Example:

"Successfully added 3 new recipients to live campaign"

campaignId
string
required

Campaign ID

Example:

"camp-abc123"

recipientsCreated
number
required

Number of recipients successfully created

Example:

3

recipientIds
string[]
required

Array of created recipient IDs

Example:
[
"recipient_123",
"recipient_456",
"recipient_789"
]
emailsSent
number
required

Number of emails sent immediately (if applicable)

Example:

3