Skip to main content

Campaign Service

Add or Create Contacts in Campaign

POST /campaign/:campaign_id/contact

Request Body

FieldTypeRequiredDescription
contact_idsarrayNoArray of existing contact IDs to add to the campaign
contactsarrayNoArray of new contacts to create and add to the campaign
Each contact in the contacts array should have the following fields:
FieldTypeRequiredDescription
first_namestringNoContact’s first name
last_namestringNoContact’s last name
phonestringYesContact’s phone number in E.164 format (e.g., +1234567890)
emailstringNoContact’s email address
additional_notesstringNoAdditional notes about the contact
Note: Contacts that already exist will not be added to the campaign again; they will be skipped.

Example Request

{
  "contact_ids" : ["contact-123", "contact-124",...]
  "contacts" : [
    {
      "first_name": "John",
      "last_name": "Doe",
      "phone": "+1234567890",
      "email": "[email protected]",
      "additional_notes": "VIP customer"
    },
    ....
  ]
}

Response

{
  "status": 201,
  "data": {
    "message": "Campaign contacts created successfully",
    "added_contact_ids":[
      "contact-123",
      "contact-124, ...
    ],
    "call_status: "scheduled"
    "schedule_time": "2024-03-20T10:00:00Z",
    "campaign_id": "campaign-123"
  }
}