Skip to main content
PATCH
/
api
/
v2
/
voice-campaigns
/
{campaign_id}
/
leads
/
update
/
bulk
Bulk Update Leads in Campaign
curl --request PATCH \
  --url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/leads/update/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "phone_number": "+14155552671",
    "first_name": "Jane",
    "last_name": "Smith"
  },
  {
    "phone_number": "+14155559999",
    "do_not_call": true
  }
]
'
{
  "status": "success",
  "message": "Bulk lead update completed",
  "results": [
    {
      "index": 0,
      "phone_number": "+14155552671",
      "success": true,
      "message": "Lead updated successfully"
    },
    {
      "index": 1,
      "phone_number": "+14155559999",
      "success": false,
      "message": "Lead not found"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaign_id
string
required

Identifier of the campaign. Required.

Example:

"camp_abc123"

Body

application/json

Array of lead update objects. Each object must include phone_number to identify the lead.

Minimum array length: 1
phone_number
string
required

Phone number of the lead to update (used as identifier). Required.

Example:

"+14155552671"

first_name
string

Updated first name. Optional.

Example:

"Jane"

last_name
string

Updated last name. Optional.

Example:

"Doe"

email
string<email>

Updated email address. Optional.

Example:

"jane.doe@example.com"

do_not_call
boolean

When true, marks the lead as opted out and prevents future calls. Optional.

Allowed values: true, false.

Example:

false

custom_fields
object

Updated custom key-value fields. Optional.

Example:
{ "plan": "pro" }
mark_as_unanswered
boolean

When true, resets the lead's answered status and re-queues them for outbound calling. Only applies when the lead is currently marked as answered. Optional.

Allowed values: true, false.

Example:

true

Example:
[
{
"phone_number": "+14155552671",
"first_name": "Jane",
"last_name": "Smith"
},
{
"phone_number": "+14155559999",
"do_not_call": true
}
]

Response

Bulk update completed. Per-lead results are included in results.

status
string
message
string
results
object[]