This article will answer the majority of questions you might have about Zenvia Conversion's API.
You can find a Postman collection with requests available for the Zenvia Conversion API here.
1 - How to upload leads using the API:
When you upload a lead via API, Zenvia Conversion returns a prospectId, converting the lead to a prospect in Zenvia Conversion.
Method: POST
Endpoint: https://conversion.zenvia.com/#section/Glossary/Lead
Click on any of the options below to get documentation by industry:
Example body for a retail lead:
Note: the only required field is utmSource and a form of contact (email or phone). The rest are optional.
{
"priority": 0,
"provider": "Webmotors",
"providerLeadId": "string",
"utmSource": "google, newsletter4, billboard, ford, bmw",
"utmMedium": "referral, organic, cpc, email, social, video",
"utmCampaign": "Christmas / New Year campaign",
"firstName": "Jorge",
"lastName": "Letona",
"phones": [
"+54 9 11 4552 0371"
],
"emails": [
"[email protected]"
],
"category": "used",
"nin": [
{
"type": "DNI",
"number": "23345223"
}
],
"address": "Jujuy 986, 1er piso, depto. \"A\"",
"subLocality": "La Perla",
"locality": "Mar del Plata",
"region": "Buenos Aires",
"country": "Argentina",
"zipCode": "7600",
"listingTitle": "MLA 641645231 Ferrari F430 F1 Spyder Cabriolet",
"listingUrl": "https://auto.mercadolibre.com.ar/MLA-641645231-ferrari-f430-f1-spyder-cabriolet-2006-roja-excelente-permuto-JM",
"comments": "I am interested in the Honda Civic. I will like to receive information about financing. I also have a Fiat Punto as trade in vehicle. Thanks!'",
"company": "Southern Group",
"store": "Freedom Branch",
"agent": "Marcos García",
"leadId": "string",
"source": "google, newsletter4, billboard, ford, bmw",
"medium": "cpc, banner, email newsletter, form.",
"campaign": "Christmas / New Year campaign",
"product": {
"make": "Apple",
"model": "MQD32LL/A",
"detail": "13-inch MacBook Air\n1.8GHz dual-core Intel Core i5 processor\nTurbo Boost up to 2.9GHz\n8GB 1600MHz LPDDR3 memory\n128GB SSD storage1\nIntel HD Graphics 6000\n",
"sku": 6443034,
"price": {
"amount": 0,
"currency": "usd"
}
}
}
2. How to subsrcribe to our Webhook:
Access the Apps section, search for WebHooks Access and configure the application:
3 - How to send transactional messages using the API:
Access the documentation here.
On the following endpoint, you can see the templates you can send to a prospect to start a conversation on WhatsApp.
Method: GET
Endpoint: https://conversion.zenvia.com/#operation/getChannelsByProspectId
Documentation:
https://conversion.zenvia.com/#operation/sendTemplateMessage
With the following endpoint you can send a template to start a conversation with a prospect in Zenvia Conversion.
Method: POST
Endpoint: https://conversion.zenvia.com/#section/Prospects
Body:
{
"key": "string",
"parameters": {
"prospect.firstName": "Jonathan"
}
}
4 - How to send conversational messages through the API:
Click here to access the documentation.
With the following endpoint you can send a free message to a prospect who has an open conversation or who has contacted your WhatsApp number within the last 24 hours.
Endpoint: https://conversion.zenvia.com/#operation/sendMessage
Body:
{
"content": "Hi, this is a message for API docs"
}
5 - How to transfer a client via API:
Access the documentation here.
With the following endpoint, you can transfer a prospect to a group or another user within Zenvia Conversion. Indicate the destination group or user in the body.
Endpoint: https://conversion.zenvia.com/#operation/transferProspect
Body:
{
"group": "string",
"user": "string"
}
You can retrieve available users within an account by sending a GET to this endpoint.
Access the documentation here.