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": []
}Campaigns
Manage campaign contacts
Creates, updates, or removes contacts in a campaign.
Usage scenarios
- Upsert contacts (default): Contacts will be added if they don’t exist, or updated if they do. Contacts with a
disqualifiedorcompletedstatus will not be added. If noactionis specified, the API defaults toupsert. - Update existing contacts only: Set
actionto"updateOnly". Only contacts already in the campaign will be updated. Contacts not in the campaign are ignored. This is useful when your process might include contacts that aren’t in the campaign and you don’t want them added. - Remove contacts: Set
actionto"remove"and provide at leastemailorphonefor each contact to remove.
External IDs (CRM routing)
- Configure in Manage Assistants — Define external IDs per assistant so each one can reference CRMs outside Replify (for example HubSpot account IDs, storefront codes, or internal site codes).
- Example — A key like
hubspotIdpaired with values that distinguish Site A from Site B. - In this API — For organization-wide / multi-assistant campaigns, include optional
externalIdKeyandexternalIdValue. Key names must match what you saved in Manage Assistants. - Where to put them — You can set
externalIdKey/externalIdValueon individual contacts, at the request root, or both. See the schemas for those properties in this spec.
Key fields
action: Controls how contacts are processed. Options are"upsert"(default),"updateOnly", and"remove". This applies to all contacts in the request.status: Usecompletedordisqualifiedto stop further outreach from campaigns. Other status values are allowed but won’t affect campaign behavior.contactMetadata: Add any key:value pairs to inform your AI assistant’s behavior. For example, if you set"tier": "pro", you can configure your AI to identify and handle pro-tier contacts appropriately.externalIdKey/externalIdValue: Optional; supported on request root and/or per-contact as described in schema field docs.
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": []
}Body
application/json
Response
Request accepted and processed successfully.
Was this page helpful?