Skip to main content
POST
/
campaigns
/
{campaignId}
/
contacts
curl --request POST \
  --url https://api.heylibby.com/api/v1/campaigns/{campaignId}/contacts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "contacts": [
    {
      "firstName": "Ava",
      "lastName": "Lopez",
      "email": "ava@example.com",
      "phone": "15551234567",
      "contactMetadata": {
        "source": "web_form",
        "tier": "trial"
      }
    }
  ],
  "action": "upsert"
}
'
{
  "message": "Processed 3 contacts successfully",
  "success": [
    {
      "phone": "15551234567",
      "email": "jane.doe@example.com",
      "action": "created"
    },
    {
      "phone": "15559876543",
      "email": "john.smith@example.com",
      "action": "updated"
    }
  ],
  "errors": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.replify.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Path Parameters

campaignId
string<uuid>
required

The unique ID of the campaign

Body

application/json
contacts
object[]
required

List of contacts to add or update. When action is set to "remove", these contacts are removed from the campaign.

externalIdKey
string

Optional external ID name for this request batch (must match a key configured under Manage Assistants). Pair with externalIdValue.

Example:

"hubspotId"

externalIdValue
string

Optional external CRM value paired with root-level externalIdKey for routing in multi-assistant org-wide flows.

Example:

"1234"

action
enum<string>

Controls how contacts are processed. upsert (default) adds new contacts and updates existing ones. updateOnly updates only contacts already in the campaign and ignores others. remove removes the specified contacts.

Available options:
upsert,
updateOnly,
remove
Example:

"upsert"

Response

Request accepted and processed successfully.

message
string

Human-readable summary of the operation results.

Example:

"Processed 2 contacts successfully, 1 failed"

success
object[]

Contacts that were successfully created, updated, or deleted.

errors
object[]

Contacts that failed to process with error details.