This article will cover how to insert leads into a campaign using the
POST /leads endpoint. If you're looking for bulk imports, please have a look at this article. If you're looking for API documentation, please follow this link.
When a successful request is sent to this endpoint, the following two things will happen:
- A contact is created in a pool.
- The contact is associated with a campaign, whereas a lead is created.
To get a better understanding of the difference between contacts and leads, please refer to this article.
The only required parameters for a simple POST leads request are the campaignId, pool, and masterData, a collection of field ids and values.
curl --location --request POST 'https://api.adversus.io/v1/leads' \
--header 'Authorization: Basic XX' \
--header 'Content-Type: application/json' \
"id": 1, // field id
"value": "adversus.io" // value
"value": "+1 (337) 385 5102"
You can add the following parameters to your request if needed:
|nextContactTime||The lead is by default ready to call after insert. If you want to schedule a call in the future, set this date/time parameter.|
|lastContactedBy||If you insert a private call-back, this field can be populated with the user id of whom should receive the callback.|
|status||The status field defaults to 'new'. Use this parameter if you want to insert a lead with another status.|
|externalId||External ids can be useful when integrating with external systems. Please refer to this article for more details.|