v1

latestOpenAPI 3.0.32026-07-246376162.1 KB
Campaigns

Add leads to a campaign

Adds leads to the specified campaign.

post/api/v4/campaigns/{campaign_id}/leads

Path parameters

campaign_idinteger required
Example:1

The unique identifier of the campaign.

Request body

phone_numberstring phone required

The phone number of the lead.

namestring

The display name of the lead.

priorityinteger

The lead's priority for calling purposes. Lower values indicate higher priority. Leads without a priority are called last.

activeboolean

Indicates whether the lead should be called in this campaign.

context_headersobject

Custom SIP headers sent by {BRAND} during dialer calls to provide lead context to virtual agents. Each key represents a SIP header name (must start with "X-" and contain only a-z, A-Z, 0-9, -, _, ., !, ~, *, +), and each value represents the corresponding header value.

Example request

[
  {
    "phone_number": "15551234567",
    "name": "John Doe",
    "source": {
      "system": "my_crm",
      "url": "https://example.com/leads/123"
    },
    "priority": 10,
    "context_headers": {
      "X-Client-Order-Id": "1234",
      "X-Call-Context": "discount_promo_code"
    }
  }
]

Response

OK