Download OpenAPI specification:Download
Welcome to our API reference!
This is the reference documentation for the Zenvia Conversion REST API. This API is based on resources which are represented by JSON format and are manipulated using the HTTP protocol.
And much more...
Before using this API you will need:
In Zenvia Conversion, a lead is a piece of information that allows an agent to contact a potential client. To be useful, this information should include:
A contact or prospect can be added to Zenvia Conversion in two ways:
API Keys enable access to the API with one or more Scopes. Each API Scope enables set of API features.
Scope | Permissions |
---|---|
leads:write |
Send lead data for agents to work with. |
prospects:read |
Read prospects, operations and quotes. |
prospects:readAdditionalData |
Read prospects and quote additional data. |
prospects:write |
Create new quotes, update quotes, delete prospects, etc. |
notifications |
Subscribe to notifications via webhooks. |
messages:channels |
List available conversational channels for prospects. |
messages:transactional |
Send transactional messages like appointment information, delivery and shipping notifications. |
messages:conversational |
Send conversational messages for automatic replies, chatbots, and other use cases. |
integration:act-as-user |
Perform operations as a user. |
API Rate Limits are in place to protect Zenvia Conversion from API traffic spikes that could put our databases at risk. We therefore measure the amount of requests sent to the API in order to throttle these when they surpass the amount allowed. We will respond with 429 Too Many Requests
and the following headers:
Header Name | Header Description |
---|---|
X-RateLimit-Limit | Maximum number of requests allowed for the app. |
X-RateLimit-Remaining | Number of requests left in the current time. |
X-RateLimit-Reset | Time when the number of requests will be reset to the maximum limit. |
The amount of permitted requests resets every 60 seconds
The following endpoints allow creating and registering Leads. Leads include information about the product or service of interest, which means different lead schemas depending on the industry.
Processes lead data and returns the matching prospect. If the prospect already exists, previous lead data will not be returned. Retail industry only.
priority | number The priority of the Lead |
provider | string The name/key to identify the provider of the lead. |
providerLeadId | string The ID of the lead in the provider. |
utmSource required | string Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
utmMedium | string The advertising or marketing medium. |
utmCampaign | string The individual campaign name, slogan, promo code, etc. for a product. |
firstName | string |
lastName | string |
phones | Array of strings |
emails | Array of strings <email> |
object @deprecated use NewCallEvent An object representing an inbound phone call. Connected calls should provide a recording and its associated metadata. | |
category | string The category of the lead. Use the Categories endpoint to see the available categories. If skipped, the default category is used. |
Array of objects (Nin) National Identification Number | |
address | string Full street address. |
subLocality | string County / other sub-division of a locality, such as communes departments, etc. |
locality | string City / Municipality. |
region | string State / Province. |
country | string |
zipCode | string Zip Code / Postal Code. |
listingTitle | string The title of the listing page. |
listingUrl | string The URL of the listing page. |
comments | string Any comments worth making to the agent, from the lead or from the acquisition channel. |
company | string If the lead has an assigned company, indicate it's name or code. Usually, it's the name of the company under the general account. |
store | string If the lead has an assigned store, indicate it's name or code. Usually is the name of the branch inside the company. |
agent | string If the lead has an assigned agent, indicate it's email, phone or id. |
leadId | string @deprecated - use providerLeadId The ID of the lead in the provider. |
source | string @deprecated - use utmSource Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
medium | string @deprecated - use utmMedium The contact medium where the lead came from. |
campaign | string @deprecated - use utmCampaign The individual campaign name, slogan, promo code, etc. for a product. |
Array of objects (NewEvent) Ordered list of lead events | |
object (Product) |
{- "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"
], - "callIn": {
- "date": "2019-08-24T14:15:22Z",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "duration": 30000,
}, - "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",
- "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",
- "leadId": "string",
- "source": "google, newsletter4, billboard, ford, bmw",
- "medium": "cpc, banner, email newsletter, form.",
- "campaign": "Christmas / New Year campaign",
- "history": [
- {
- "type": "question",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string",
- "utmSource": "google, newsletter4, billboard, ford, bmw",
- "startedAt": "2019-08-24T14:15:22Z",
- "duration": 30000,
- "content": "string",
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string",
- "location": { },
- "contacts": { }
}
}
], - "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"
}
}
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z",
- "interactions": [
- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
}
Processes lead data and returns the matching prospect. If the prospect already exists, previous lead data will not be returned. Insurance industry only.
make | string A product make is either the name of its manufacturer or, if the manufacturer has more than one operating unit, the commercial name (brand) of that unit. |
model | string A product model is the specific brand identified by a name or number. |
detail | string A product detail specific information for a product item. |
sku | string A stock keeping unit (SKU) is a product and service identification code for a store or product, often portrayed as a machine-readable bar code that helps track the item for inventory. |
object (MoneyAmount) An amount of money. |
{- "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"
}
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z",
- "interactions": [
- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
}
Processes lead data and returns the matching prospect. If the prospect already exists, previous lead data will not be returned.
Automotive (vehicle
) industry only.
priority | number The priority of the Lead |
provider | string The name/key to identify the provider of the lead. |
providerLeadId | string The ID of the lead in the provider. |
utmSource required | string Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
utmMedium | string The advertising or marketing medium. |
utmCampaign | string The individual campaign name, slogan, promo code, etc. for a product. |
firstName | string |
lastName | string |
phones | Array of strings |
emails | Array of strings <email> |
object @deprecated use NewCallEvent An object representing an inbound phone call. Connected calls should provide a recording and its associated metadata. | |
category | string The category of the lead. Use the Categories endpoint to see the available categories. If skipped, the default category is used. |
Array of objects (Nin) National Identification Number | |
address | string Full street address. |
subLocality | string County / other sub-division of a locality, such as communes departments, etc. |
locality | string City / Municipality. |
region | string State / Province. |
country | string |
zipCode | string Zip Code / Postal Code. |
listingTitle | string The title of the listing page. |
listingUrl | string The URL of the listing page. |
comments | string Any comments worth making to the agent, from the lead or from the acquisition channel. |
company | string If the lead has an assigned company, indicate it's name or code. Usually, it's the name of the company under the general account. |
store | string If the lead has an assigned store, indicate it's name or code. Usually is the name of the branch inside the company. |
agent | string If the lead has an assigned agent, indicate it's email, phone or id. |
leadId | string @deprecated - use providerLeadId The ID of the lead in the provider. |
source | string @deprecated - use utmSource Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
medium | string @deprecated - use utmMedium The contact medium where the lead came from. |
campaign | string @deprecated - use utmCampaign The individual campaign name, slogan, promo code, etc. for a product. |
Array of objects (NewEvent) Ordered list of lead events | |
object (VehicleProduct) |
{- "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"
], - "callIn": {
- "date": "2019-08-24T14:15:22Z",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "duration": 30000,
}, - "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",
- "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",
- "leadId": "string",
- "source": "google, newsletter4, billboard, ford, bmw",
- "medium": "cpc, banner, email newsletter, form.",
- "campaign": "Christmas / New Year campaign",
- "history": [
- {
- "type": "question",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string",
- "utmSource": "google, newsletter4, billboard, ford, bmw",
- "startedAt": "2019-08-24T14:15:22Z",
- "duration": 30000,
- "content": "string",
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string",
- "location": { },
- "contacts": { }
}
}
], - "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"
}, - "modelYear": "2014",
- "productionYear": "2013",
- "trimLevel": "EX",
- "style": "2.4-liter 4-cylinder CVT Automatic w/Navigation",
- "condition": "used",
- "fuelType": "gasoline",
- "vin": "string",
- "registrationPlate": "ABC 1234",
- "reservation": {
- "type": "MELI",
- "amount": 2000,
- "currency": "ARS"
}, - "odometer": {
- "amount": 33000,
- "unit": "km"
}, - "tradeInVehicle": "Fiat Punto 2012",
- "finance": {
- "downPayment": {
- "amount": 0,
- "currency": "usd"
}, - "monthlyPayments": {
- "amount": 0,
- "currency": "usd"
}, - "paymentMonthLength": 36
}
}
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z",
- "interactions": [
- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
}
Processes lead data and returns the matching prospect. If the prospect already exists, previous lead data will not be returned. Saving plan industry only.
priority | number The priority of the Lead |
provider | string The name/key to identify the provider of the lead. |
providerLeadId | string The ID of the lead in the provider. |
utmSource required | string Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
utmMedium | string The advertising or marketing medium. |
utmCampaign | string The individual campaign name, slogan, promo code, etc. for a product. |
firstName | string |
lastName | string |
phones | Array of strings |
emails | Array of strings <email> |
object @deprecated use NewCallEvent An object representing an inbound phone call. Connected calls should provide a recording and its associated metadata. | |
category | string The category of the lead. Use the Categories endpoint to see the available categories. If skipped, the default category is used. |
Array of objects (Nin) National Identification Number | |
address | string Full street address. |
subLocality | string County / other sub-division of a locality, such as communes departments, etc. |
locality | string City / Municipality. |
region | string State / Province. |
country | string |
zipCode | string Zip Code / Postal Code. |
listingTitle | string The title of the listing page. |
listingUrl | string The URL of the listing page. |
comments | string Any comments worth making to the agent, from the lead or from the acquisition channel. |
company | string If the lead has an assigned company, indicate it's name or code. Usually, it's the name of the company under the general account. |
store | string If the lead has an assigned store, indicate it's name or code. Usually is the name of the branch inside the company. |
agent | string If the lead has an assigned agent, indicate it's email, phone or id. |
leadId | string @deprecated - use providerLeadId The ID of the lead in the provider. |
source | string @deprecated - use utmSource Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
medium | string @deprecated - use utmMedium The contact medium where the lead came from. |
campaign | string @deprecated - use utmCampaign The individual campaign name, slogan, promo code, etc. for a product. |
Array of objects (NewEvent) Ordered list of lead events | |
object (SavingPlanProduct) |
{- "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"
], - "callIn": {
- "date": "2019-08-24T14:15:22Z",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "duration": 30000,
}, - "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",
- "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",
- "leadId": "string",
- "source": "google, newsletter4, billboard, ford, bmw",
- "medium": "cpc, banner, email newsletter, form.",
- "campaign": "Christmas / New Year campaign",
- "history": [
- {
- "type": "question",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string",
- "utmSource": "google, newsletter4, billboard, ford, bmw",
- "startedAt": "2019-08-24T14:15:22Z",
- "duration": 30000,
- "content": "string",
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string",
- "location": { },
- "contacts": { }
}
}
], - "product": {
- "make": "Apple",
- "model": "Civic 2013",
- "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"
}, - "goodType": "vehicle",
- "goodSubType": "string",
- "brand": "Honda",
- "description": "Coupe LX CVT",
- "condition": "used",
- "planType": "string",
- "monthlyPaymentsEstimate": {
- "lowerEstimate": 0,
- "upperEstimate": 0,
- "currency": "usd"
}, - "creditAmountEstimate": {
- "lowerEstimate": 0,
- "upperEstimate": 0,
- "currency": "usd"
}
}
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z",
- "interactions": [
- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
}
Processes lead data and returns the matching prospect. If the prospect already exists, previous lead data will not be returned. Real Estate industry only.
priority | number The priority of the Lead |
provider | string The name/key to identify the provider of the lead. |
providerLeadId | string The ID of the lead in the provider. |
utmSource required | string Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
utmMedium | string The advertising or marketing medium. |
utmCampaign | string The individual campaign name, slogan, promo code, etc. for a product. |
firstName | string |
lastName | string |
phones | Array of strings |
emails | Array of strings <email> |
object @deprecated use NewCallEvent An object representing an inbound phone call. Connected calls should provide a recording and its associated metadata. | |
category | string The category of the lead. Use the Categories endpoint to see the available categories. If skipped, the default category is used. |
Array of objects (Nin) National Identification Number | |
address | string Full street address. |
subLocality | string County / other sub-division of a locality, such as communes departments, etc. |
locality | string City / Municipality. |
region | string State / Province. |
country | string |
zipCode | string Zip Code / Postal Code. |
listingTitle | string The title of the listing page. |
listingUrl | string The URL of the listing page. |
comments | string Any comments worth making to the agent, from the lead or from the acquisition channel. |
company | string If the lead has an assigned company, indicate it's name or code. Usually, it's the name of the company under the general account. |
store | string If the lead has an assigned store, indicate it's name or code. Usually is the name of the branch inside the company. |
agent | string If the lead has an assigned agent, indicate it's email, phone or id. |
leadId | string @deprecated - use providerLeadId The ID of the lead in the provider. |
source | string @deprecated - use utmSource Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
medium | string @deprecated - use utmMedium The contact medium where the lead came from. |
campaign | string @deprecated - use utmCampaign The individual campaign name, slogan, promo code, etc. for a product. |
Array of objects (NewEvent) Ordered list of lead events | |
object (RealEstateProduct) |
{- "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"
], - "callIn": {
- "date": "2019-08-24T14:15:22Z",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "duration": 30000,
}, - "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",
- "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",
- "leadId": "string",
- "source": "google, newsletter4, billboard, ford, bmw",
- "medium": "cpc, banner, email newsletter, form.",
- "campaign": "Christmas / New Year campaign",
- "history": [
- {
- "type": "question",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string",
- "utmSource": "google, newsletter4, billboard, ford, bmw",
- "startedAt": "2019-08-24T14:15:22Z",
- "duration": 30000,
- "content": "string",
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string",
- "location": { },
- "contacts": { }
}
}
], - "product": {
- "title": "string",
- "type": "residential"
}
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z",
- "interactions": [
- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
}
Returns information about the applicable defaults for lead creation. These defaults are only used if no value is specified when creating a lead. The response includes the default currency and distance unit.
{- "currency": "usd",
- "distance": "km"
}
Returns a filterable list of prospects.
If a limit is not specified, the query will return prospects from the last 31 days
If a limit is not specified, but a date or range of dates are provided, the query will return prospects within the
date or dates specified. A range of dates is considered valid if the range between them is 31 days or less
Invalid Examples:
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-10-01T01:00:00.000Z -> INVALID
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-06-01T01:00:00.000Z -> INVALID
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-06-01T01:00:00.000Z -> INVALID
Valid Examples:
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-09-01T01:00:00.000Z -> VALID
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-09-01T01:00:00.000Z -> VALID
If only one of the dates is provided, the comparison will be made with the present date
Example:
Assuming that the present date is 2020-10-28T03:00:00.000Z
?createdAfter=2020-08-01:T03:00:00.000Z -> INVALID
?createdAfter=2020-09-30:T03:00:00.000Z -> VALID
before | string^[a-z0-9]{24}$ Limits the results only to the prospects created before the one provided in this parameter (not included) |
after | string^[a-z0-9]{24}$ Limits the results only to the prospects created after the one provided in this parameter (not included) |
limit | number The maximum number of items that must be returned (A multiple number of 100 and no more than 1000 is recommended) |
search | string A search string to filter prospects. It can be a phone number, an email address or a name. |
phoneNumber | string A phone number string to filter prospects |
category | string The category to filter prospects. |
status | string The status to filter prospects. |
agent | string^[a-z0-9]{24}$ The id of an agent to filter prospects |
createdAfter | string <date-time> The start date to filter prospects by their creation date |
start | string <date-time> @deprecated - use createdAfter The start date to filter prospects by their creation date (alias of createdAfter). |
createdBefore | string <date-time> The end date to filter prospects by their creation date. |
end | string <date-time> @deprecated - use createdBefore The end date to filter prospects by their creation date (alias of createdBefore). |
claimedAfter | string <date-time> The start date to filter prospects by their claim date. |
claimStart | string <date-time> The start date to filter prospects by their claim date (alias of claimAfter). |
claimedBefore | string <date-time> The end date to filter prospects by their claim date. |
claimEnd | string <date-time> The end date to filter prospects by their claim date (alias of claimBefore). |
transferredAfter | string <date-time> The start date to filter prospects by their transfer date |
transferStart | string <date-time> The start date to filter prospects by their transfer date (alias of transferredAfter) |
transferredBefore | string <date-time> The end date to filter prospects by their transfer date |
transferEnd | string <date-time> The end date to filter prospects by their transfer date (alias of transferredBefore) |
withAgent | boolean A boolean specifying whether a prospect has an assigned Agent or not |
group | string^[a-z0-9]{24}$ The id of a group to filter prospects |
additionalData | Array of strings List of filters for additionalData on format
|
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
]
Returns a prospect searching by their phone number and/or email. Please notice that even both of these params being optionals, it is necessary to inform at least one of them for the request to be successful processed
string Email address string to search for | |
phoneNumber | string A phone number string to search for |
{- "id": "string",
- "firstName": "John",
- "phones": [
- "+98 76 5432 1234"
], - "account": "string",
- "claimedBy": "string"
}
Returns an specific prospect by its ID.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
Update the prospect basic data and/or add a phone and/or email to the prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
archivingReason | string When the prospect is archived this property contains the code of the reason why it was filed. |
firstName | string |
lastName | string |
phone | string Phone to add to the prospect |
string <email> Email to add to the prospect | |
label | string Change Label of the prospect |
{- "archivingReason": "string",
- "firstName": "Jorge",
- "lastName": "Letona",
- "phone": "string",
- "label": "string"
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
Delete a prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
Returns the available additional fields for a specific prospect by its ID.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
[- {
- "key": "string",
- "name": "string"
}
]
Returns a specific update to the Additional Data of a prospect by its ID.
{
"sirenadev_cotti_quoteStatus": "sold",
"reference": 12345
}
Where the key of each field is the key of the additional field you want to change. The value is the new value you want to set.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
key | string The key of the Additional Data |
name | string The name of the Additional Data |
{- "key": "string",
- "name": "string"
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
Returns a filterable list of interactions related to a prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
status | string The status to filter interactions. |
createdAfter | string <date-time> The start date to filter interactions by their creation date. |
start | string <date-time> @deprecated - use createdAfter The start date to filter interactions by their creation date (alias of createdAfter). |
createdBefore | string <date-time> The end date to filter interactions by their creation date. |
end | string <date-time> @deprecated - use createdBefore The end date to filter interactions by their creation date (alias of createdBefore). |
via | Array of strings Items Enum: "walkIn" "sms" "whatsApp" "email" "testDrive" "visit" "phoneCall" "outboundCall" "inboundCall" "facebook" |
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
Returns a filterable list of interactions related to a prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
type required | string Enum: "question" "call" "message" "note" |
providerId | string The ID of the question in the provider. |
threadTitle | string Title of the thread in the provider |
threadUrl | string Url of the thread in the provider |
question | string Question text |
answer | string Answer text to the question, if the status property is "opened" this property will be ignored |
delivered | boolean Check this answer as delivered |
cancelReason | string Reason wherefore the system can not deliver an answer, if the status property is not "cancelled" this property will be ignored |
utmSource | string Identify the advertiser, site, publication, etc. that is sending traffic to your property. |
startedAt | string <date-time> Date and time when the call started. |
duration | number Duration of call in milliseconds. |
recordingUrl | string Complete path to the recorded file URL. Supported audio formats are MP3, WAV and AAC. |
content | string Text message |
sender | string Sender reference |
recipient | string Recipient reference |
object |
{- "type": "question",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string",
- "utmSource": "google, newsletter4, billboard, ford, bmw",
- "startedAt": "2019-08-24T14:15:22Z",
- "duration": 30000,
- "content": "string",
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string",
- "location": { },
- "contacts": { }
}
}
[- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
Returns an interaction by its prospect and interaction IDs.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
interactionId required | string^[a-z0-9]{24}$ The ID of the interaction. |
{- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
Update interaction using events
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
interactionId required | string^[a-z0-9]{24}$ The ID of the interaction. |
type required | string Must be "question" |
answer | string Answer text to the question, if the status property is "opened" this property will be ignored |
delivered | boolean Check this answer as delivered |
cancelReason | string Reason wherefore the system can not deliver an answer, if the status property is not "cancelled" this property will be ignored |
status | string Status of the message (pending, sent, received, read, failed) |
{- "type": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string",
- "status": "string"
}
{- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
Returns a filterable list of interactions.
If a limit is not specified, the query will return interactions from the last 31 days
If a limit is not specified, but a date or range of dates are provided, the query will return interactions within the
date or dates specified. A range of dates is considered valid if the range between them is 31 days or less
Invalid Examples:
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-10-01T01:00:00.000Z -> INVALID
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-06-01T01:00:00.000Z -> INVALID
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-06-01T01:00:00.000Z -> INVALID
Valid Examples:
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-09-01T01:00:00.000Z -> VALID
?createdAfter=2020-08-01T01:00:00.000Z&createdBefore=2020-09-01T01:00:00.000Z -> VALID
If only one of the dates is provided, the comparison will be made with the present date
Example:
Assuming that the present date is 2020-10-28T03:00:00.000Z
?createdAfter=2020-08-01:T03:00:00.000Z -> INVALID
?createdAfter=2020-09-30:T03:00:00.000Z -> VALID
before | string^[a-z0-9]{24}$ Limits the results only to the prospects created before the one provided in this parameter (not included) |
after | string^[a-z0-9]{24}$ Limits the results only to the prospects created after the one provided in this parameter (not included) |
limit | number The maximum number of items that must be returned (A multiple number of 100 and no more than 1000 is recommended) |
agent | string The id of the agent to filter. |
status | string The status to filter. |
createdAfter | string <date-time> The start date to filter interactions by their creation date. |
start | string <date-time> @deprecated - use createdAfter The start date to filter interactions by their creation date (alias of createdAfter). |
createdBefore | string <date-time> The end date to filter interactions by their creation date. |
end | string <date-time> @deprecated - use createdBefore The end date to filter interactions by their creation date (alias of createdBefore). |
via | Array of strings Items Enum: "walkIn" "sms" "whatsApp" "email" "testDrive" "visit" "phoneCall" "outboundCall" "inboundCall" "facebook" |
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
Returns a filterable list of quotes related to a prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
status | string Enum: "pending" "accepted" "rejected" The status to filter. |
createdBefore | string <date-time> The start date to filter quotes by their creation date. |
createdAfter | string <date-time> The end date to filter quotes by their creation date. |
acceptedBefore | string <date-time> The start date to filter quotes by their accepted date. |
acceptedAfter | string <date-time> The end date to filter quotes by their accepted date. |
rejectedBefore | string <date-time> The start date to filter quotes by their rejected date. |
rejectedAfter | string <date-time> The end date to filter quotes by their rejected date. |
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "prospectId": "string",
- "status": "pending",
- "items": [
- {
- "quantity": 0,
- "price": 0,
- "concept": "string",
- "code": "string"
}
], - "total": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "additionalData": { },
- "finishedAt": "2019-08-24T14:15:22Z"
}
]
Create quote for prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
status | string Enum: "pending" "accepted" "rejected" |
required | Array of objects (QuoteItem) |
{- "status": "pending",
- "items": [
- {
- "quantity": 0,
- "price": 0,
- "concept": "string",
- "code": "string"
}
]
}
{- "id": "string",
- "prospectId": "string",
- "status": "pending",
- "items": [
- {
- "quantity": 0,
- "price": 0,
- "concept": "string",
- "code": "string"
}
], - "total": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "additionalData": { },
- "finishedAt": "2019-08-24T14:15:22Z"
}
Returns a quote by its prospect and quote IDs.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
quoteId required | string^[a-z0-9]{24}$ The ID of the quote. |
{- "id": "string",
- "prospectId": "string",
- "status": "pending",
- "items": [
- {
- "quantity": 0,
- "price": 0,
- "concept": "string",
- "code": "string"
}
], - "total": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "additionalData": { },
- "finishedAt": "2019-08-24T14:15:22Z"
}
Update quote for prospect by prospect and quote IDs.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
quoteId required | string^[a-z0-9]{24}$ The ID of the quote. |
status required | string Enum: "accepted" "rejected" |
{- "status": "accepted"
}
{- "id": "string",
- "prospectId": "string",
- "status": "pending",
- "items": [
- {
- "quantity": 0,
- "price": 0,
- "concept": "string",
- "code": "string"
}
], - "total": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "additionalData": { },
- "finishedAt": "2019-08-24T14:15:22Z"
}
Returns a filterable list of quotes.
before | string^[a-z0-9]{24}$ Limits the results only to the prospects created before the one provided in this parameter (not included) |
after | string^[a-z0-9]{24}$ Limits the results only to the prospects created after the one provided in this parameter (not included) |
limit | number The maximum number of items that must be returned (A multiple number of 100 and no more than 1000 is recommended) |
status | string Enum: "pending" "accepted" "rejected" The status to filter. |
createdBefore | string <date-time> The start date to filter quotes by their creation date. |
createdAfter | string <date-time> The end date to filter quotes by their creation date. |
acceptedBefore | string <date-time> The start date to filter quotes by their accepted date. |
acceptedAfter | string <date-time> The end date to filter quotes by their accepted date. |
rejectedBefore | string <date-time> The start date to filter quotes by their rejected date. |
rejectedAfter | string <date-time> The end date to filter quotes by their rejected date. |
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "prospectId": "string",
- "status": "pending",
- "items": [
- {
- "quantity": 0,
- "price": 0,
- "concept": "string",
- "code": "string"
}
], - "total": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "additionalData": { },
- "finishedAt": "2019-08-24T14:15:22Z"
}
]
Transfer a Prospect to a group
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
Define the destination user or group.
group | string (ObjectId) ^[a-z0-9]{24}$ |
user | string (ObjectId) ^[a-z0-9]{24}$ |
{- "group": "string",
- "user": "string"
}
{- "success": true
}
Get all contacts for a provided contact selection.
selectionId required | string^[a-z0-9]{24}$ The id of the contact selection. |
fields | Array of any The fields to return from prospect. The fields |
offset | number The offset number to start pagination starting with 0. Only the offset and the next limit number contacts will be returned. |
limit | number The maximum number of items that must be returned (A multiple number of 100 and no more than 1000 is recommended) |
[- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
]
This endpoint returns the channels (communication channels) available in the scope of the App.
[- {
- "channel": "whatsapp",
- "channelId": "string",
- "templates": [
- {
- "key": "string",
- "name": "string",
- "body": "string",
- "template": "string"
}
]
}
]
Given an ProspectID, this endpoint returns the channels (communication channels) available for that prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
[- {
- "channel": "whatsapp",
- "channelId": "string",
- "templates": [
- {
- "key": "string",
- "name": "string",
- "body": "string",
- "template": "string"
}
]
}
]
Send a transactional template message to a prospect
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
channel required | string Enum: "whatsapp" "facebook" Conversational Channel for sending messages. |
key required | string Template key |
object Optional parameters for overriding template parameters. The empty variables must not contain four consecutive spaces, carriage return, new line or tabulations. More information here: https://developers.facebook.com/docs/whatsapp/message-templates/creation |
{- "key": "string",
- "parameters": {
- "prospect.firstName": "Jonathan"
}
}
[- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
Returns a filterable list of orders
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
limit | number The maximum number of items that must be returned (A multiple number of 100 and no more than 1000 is recommended) |
[- {
- "orderId": "string",
- "createdAt": "string",
- "items": [
- {
- "productId": "string",
- "itemPrice": "string",
- "name": "string",
- "brand": "string",
- "size": "string",
- "gender": "string",
- "available": "string",
- "color": "string",
- "category": "string",
- "imageUrl": "string"
}
]
}
]
This endpoint returns the channels (communication channels) available in the scope of the App.
[- {
- "channel": "whatsapp",
- "channelId": "string",
- "templates": [
- {
- "key": "string",
- "name": "string",
- "body": "string",
- "template": "string"
}
]
}
]
Given an ProspectID, this endpoint returns the channels (communication channels) available for that prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
[- {
- "channel": "whatsapp",
- "channelId": "string",
- "templates": [
- {
- "key": "string",
- "name": "string",
- "body": "string",
- "template": "string"
}
]
}
]
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
channel required | string Enum: "whatsapp" "facebook" Conversational Channel for sending messages. |
required | object The file to send to the prospect |
var request = require('request'); var fs = require('fs'); var options = { 'method': 'GET', 'url': 'https://conversion.zenvia.com/v1/prospect/${prospectId}/messaging/${channel}/send-file?api-key=${apiKey}', 'headers': { }, formData: { 'file': { 'value': fs.createReadStream('/Users/image.jpg'), 'options': { 'filename': 'image.jpg', 'contentType': 'image/jpeg', 'knownLength': 1024 } } } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
{- "message": "string",
- "code": "string"
}
Send a conversational message to a prospect
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
channel required | string Enum: "whatsapp" "facebook" Conversational Channel for sending messages. |
content | string Message content |
{- "content": "string"
}
[- {
- "id": "string",
- "agentId": "string",
- "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueAt": "2019-08-24T14:15:22Z",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "status": "string",
- "proactive": true,
- "via": "inboundCall",
- "output": {
- "comment": "string",
- "reminder": "2019-08-24T14:15:22Z",
- "visitScheduled": "2019-08-24T14:15:22Z",
- "question": {
- "id": "string",
- "providerId": "string",
- "threadTitle": "string",
- "threadUrl": "string",
- "question": "string",
- "answer": "string",
- "delivered": true,
- "cancelReason": "string"
}, - "message": {
- "providerId": "string",
- "template": "string",
- "body": "string",
- "content": "string",
- "delivered": true,
- "sender": "string",
- "recipient": "string",
- "attachment": {
- "type": "string",
- "url": "string"
}, - "via": "whatsApp"
}, - "rejectionReason": "string",
- "proposal": {
- "firstCreatedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "price": "string",
- "concept": "string"
}
], - "status": "string"
}, - "status": "string",
- "visitSuccessful": true,
- "callSuccessful": true,
- "webAction": "string",
- "transferedTo": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "transferedToAgentId": "string",
- "transferedToGroupId": "string",
- "response": "string",
- "conversations": [
- {
- "_id": "string",
- "channel": "string",
- "providerName": "string",
- "threadTitle": "string",
- "threadSubtitle": "string",
- "threadThumbnail": "string"
}
], - "customEvent": { }
}
}
]
Returns a list of groups and users the App can transfer prospects to.
{- "agents": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}
], - "groups": [
- {
- "id": "string",
- "name": "string"
}
]
}
Label a prospect.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
The label that can be used
label | string |
{- "label": "string"
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
Transfer a Prospect to a group or user. The integration (linked to the apiKey) must have a user configured. Also, the integrationType scope must have integration:act-as-user
.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
Define the destination user or group.
group | string (ObjectId) ^[a-z0-9]{24}$ |
user | string (ObjectId) ^[a-z0-9]{24}$ |
{- "group": "string",
- "user": "string"
}
{- "success": true,
- "error": "string"
}
Archives a Prospect with an archiving reason. The integration (linked to the apiKey) must have a user configured. Also, the integrationType scope must have integration:act-as-user
.
prospectId required | string^[a-z0-9]{24}$ The ID of the prospect. |
The archiving reason that can be used
archivingReason | string When the prospect is archived this property contains the code of the reason why it was filed. |
firstName | string |
lastName | string |
phone | string Phone to add to the prospect |
string <email> Email to add to the prospect | |
label | string Change Label of the prospect |
{- "archivingReason": "string",
- "firstName": "Jorge",
- "lastName": "Letona",
- "phone": "string",
- "label": "string"
}
{- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "account": "string",
- "accountId": "string",
- "group": "string",
- "groupId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "Jorge",
- "label": "warm",
- "lastName": "Letona",
- "category": "used",
- "status": "unclaimed",
- "nin": [
- {
- "type": "DNI",
- "number": "23345223"
}
], - "userMade": true,
- "archivingReason": "string",
- "phones": [
- "+54 11 4552 0371"
], - "additionalData": { },
- "merged": true,
- "absenceMessage": "string",
- "leads": [
- {
- "priority": 0,
- "created": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "source": "string",
- "comments": "string",
- "utmSource": "string",
- "providerKey": "string",
- "company": "Southern Group",
- "store": "Freedom Branch",
- "agent": "Marcos García",
- "type": "retail",
- "product": { }
}
], - "agent": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}, - "assigned": "2019-08-24T14:15:22Z",
- "nextReminder": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z",
- "sentWorkingHourMessage": "2019-08-24T14:15:22Z"
}
{- "id": "string",
- "name": "string",
- "providerKey": "string",
- "groupId": "string",
- "group": "string",
- "user": "string",
- "language": "string",
- "account": "string",
- "accountId": "string"
}
Returns the active integrations in the scope of the API Key
[- {
- "id": "string",
- "name": "string",
- "providerKey": "string",
- "groupId": "string",
- "group": "string",
- "user": "string",
- "language": "string",
- "account": "string",
- "accountId": "string"
}
]
Send a custom event to Zenvia Conversion. Other Apps can receive these events through Webhooks.
event required | string |
type required | string (CustomEventType) Enum: "prospect" "user" The type of the event |
prospectId | string (ObjectId) ^[a-z0-9]{24}$ |
userId | string (ObjectId) ^[a-z0-9]{24}$ |
required | object (CustomEventData) |
{- "event": "string",
- "type": "prospect",
- "prospectId": "string",
- "userId": "string",
- "data": {
- "apiKey": "string",
- "details": { }
}
}
{- "messageId": "string",
- "status": "string"
}
Returns the agents from group
group required | string The groups to get the agents. |
active | string Status of the agent/s. |
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}
]
Returns the groups that are within the scope of the App
parent | string^[a-z0-9]{24}$ The ID of the parent group. |
[- {
- "id": "string",
- "displayName": "string",
- "name": "string",
- "parent": "string",
- "ancestors": [
- "string"
], - "descendants": [
- "string"
], - "type": [
- "string"
], - "timezone": "string"
}
]
Returns all immediate children of provided group. If no group is provided then the group where the API Access api-key is located will be assumed as the parent.
parent | string^[a-z0-9]{24}$ The ID of the parent group. |
format | string Enum: "csv" "json" An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. |
[- {
- "id": "string",
- "displayName": "string",
- "name": "string",
- "parent": "string",
- "ancestors": [
- "string"
], - "descendants": [
- "string"
], - "type": [
- "string"
], - "timezone": "string"
}
]
Returns the group that corresponds to the given groupId
groupId required | string^[a-z0-9]{24}$ The ID of the group. |
{- "id": "string",
- "displayName": "string",
- "name": "string",
- "parent": "string",
- "ancestors": [
- "string"
], - "descendants": [
- "string"
], - "type": [
- "string"
], - "timezone": "string"
}
Returns all online agents for the provided group.
groupId required | string^[a-z0-9]{24}$ The ID of the group. |
availableAgents | boolean Filter by available agents. |
{- "officeHours": true,
- "agents": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "legacyId": "string",
- "externalId": { }
}
]
}
[- {
- "name": "string"
}
]
Webhooks allow you to receive notifications to a desired callback URL when something happens in Zenvia Conversion without constantly having to poll the API. Through the API, you can subscribe to the following topics: prospects (contacts), interactions (operations), quotes and agents.
You can review or delete the available subscriptions at any time, directly via the Notifications API.
If your service has problems handling notifications at any time, we will or will not attempt to re-send failed notifications depending on the case:
We will retry up to 20 times in the following cases:
We will not retry in the following cases:
Successful Request | Failed Request |
---|---|
Status Code < 400 | Timeout or Status Code >= 400 |
Get notified of changes on prospects or when a new prospect is created.
When you subscribe to this topic, your webhook will receive a request with the following schema:
subscriptionId | string (Subscription Id) |
topic | string |
type | string (Notification type) Enum: "updated" "created" |
received | string <date-time> (Notification time) |
sent | string <date-time> (Notification time) |
attempts | number |
Array of objects (Prospect Information) | |
updatedAt | string <date-time> (Date and time of the update) |
operationId | string |
whatsAppDueAt | string <date-time> (in case the prospect has an open Whatsapp conversation, this field indicates until when the window to send free messages is open) |
facebookDueAt | string <date-time> (in case the prospect has an open Facebook Messenger conversation, this field indicates until when the window to send free messages is open) |
updates | Array of objects (List of updates related to this prospect) |
{- "subscriptionId": "string",
- "topic": "prospects",
- "type": "updated",
- "received": "2019-08-24T14:15:22Z",
- "sent": "2019-08-24T14:15:22Z",
- "attempts": 0,
- "prospect": [
- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "group": "string",
- "groupId": "string",
- "account": "string",
- "accountId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "string",
- "lastName": "string",
- "category": "string",
- "userMade": true,
- "status": "string",
- "additionalData": { },
- "phones": [
- "+54 9 11 4552 0371"
], - "contactMediums": [
- { }
], - "leads": [
- {
- "created": "string",
- "createdBy": "string",
- "source": "string",
- "utmSource": "string",
- "providerKey": "string",
- "comments": "string",
- "type": "string"
}
], - "agent": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string"
}
], - "assigned": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z"
}
], - "updatedAt": "2019-08-24T14:15:22Z",
- "operationId": "string",
- "whatsAppDueAt": "2019-08-24T14:15:22Z",
- "facebookDueAt": "2019-08-24T14:15:22Z",
- "updates": [
- { }
]
}
Notification | Payload change |
---|---|
New prospect created | Type: “created” |
The information of a prospect has been edited | Type: “updated” "status": "followUp" / “archived”/”unclaimed”/”new”/etc “Updates”: list of changes |
Events related to existing or new interactions are notified in this topic.
When you subscribe to this topic, your webhook will receive a request with the following schema:
subscriptionId | string (Subscription Id) |
topic | string |
type | string (Notification type) Enum: "updated" "created" |
received | string <date-time> (Notification time) |
sent | string <date-time> (Notification time) |
attempts | number |
Array of objects (Prospect Information) | |
updatedAt | string <date-time> (Date and time of the update) |
operationId | string |
Array of objects (interaction related to this notification) | |
finishedAt | string <date-time> |
proactive | boolean |
Array of objects (events.output) | |
via | string (channel used) Enum: "inboundCall" "outboundCall" "whatsApp" "sms" "email" "walkIn" "visit" "other" "testDrive" "phoneCall" "facebook → FbMessenenger" "webAction" "customApp" |
{- "subscriptionId": "string",
- "topic": "interactions",
- "type": "updated",
- "received": "2019-08-24T14:15:22Z",
- "sent": "2019-08-24T14:15:22Z",
- "attempts": 0,
- "prospect": [
- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "group": "string",
- "groupId": "string",
- "account": "string",
- "accountId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "string",
- "lastName": "string",
- "category": "string",
- "userMade": true,
- "status": "string",
- "additionalData": { },
- "phones": [
- "+54 9 11 4552 0371"
], - "contactMediums": [
- { }
], - "leads": [
- {
- "created": "string",
- "createdBy": "string",
- "source": "string",
- "utmSource": "string",
- "providerKey": "string",
- "comments": "string",
- "type": "string"
}
], - "agent": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string"
}
], - "assigned": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z"
}
], - "updatedAt": "2019-08-24T14:15:22Z",
- "operationId": "string",
- "interaction": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "created",
- "prospectId": "string",
- "agentId": "string",
- "agent": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string"
}
]
}
], - "finishedAt": "2019-08-24T14:15:22Z",
- "proactive": true,
- "output": [
- {
- "message": [
- {
- "via": "whatsApp",
- "body": "string",
- "content": "string",
- "performer": "string",
- "delivered": true,
- "providerId": "string",
- "sender": "string",
- "recipient": "string",
- "template": "string",
- "templateParameters": [
- { }
], - "templateConfig": "string"
}
]
}
], - "via": "inboundCall"
}
Interactions can have Type: “created” or Type: “updated”.
Events related to existing or new quotes are notified in this topic.
When you subscribe to this topic, your webhook will receive a request with the following schema:
subscriptionId | string (Subscription Id) |
topic | string |
type | string (Notification type) Enum: "updated" "created" |
received | string <date-time> (Notification time) |
sent | string <date-time> (Notification time) |
attempts | number |
Array of objects (Prospect Information) | |
updatedAt | string <date-time> (Date and time of the update) |
operationId | string |
Array of objects (events.quote) | |
updates | Array of objects (list of updates related to this quote) |
{- "subscriptionId": "string",
- "topic": "quotes",
- "type": "updated",
- "received": "2019-08-24T14:15:22Z",
- "sent": "2019-08-24T14:15:22Z",
- "attempts": 0,
- "prospect": [
- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "group": "string",
- "groupId": "string",
- "account": "string",
- "accountId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "string",
- "lastName": "string",
- "category": "string",
- "userMade": true,
- "status": "string",
- "additionalData": { },
- "phones": [
- "+54 9 11 4552 0371"
], - "contactMediums": [
- { }
], - "leads": [
- {
- "created": "string",
- "createdBy": "string",
- "source": "string",
- "utmSource": "string",
- "providerKey": "string",
- "comments": "string",
- "type": "string"
}
], - "agent": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string"
}
], - "assigned": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z"
}
], - "updatedAt": "2019-08-24T14:15:22Z",
- "operationId": "string",
- "quote": [
- {
- "id": "string",
- "prospectId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "accepted",
- "total": 100,
- "additionalData": { },
- "acceptedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "quantity": 5,
- "price": 100,
- "concept": "t-shirt"
}
]
}
], - "updates": [
- { }
]
}
Notification | Payload change |
---|---|
Quote created | "type": "created" |
Quote changes to accepted, rejected or on hold | “Status”:”accepted” “Status”:”rejected” “Status”:”pending” |
Events related to agents (requires act-as-user scope).
When you subscribe to this topic, your webhook will receive a request with the following schema:
subscriptionId | string (Subscription Id) |
topic | string |
type | string (Notification type) Enum: "updated" "created" |
received | string <date-time> (Notification time) |
sent | string <date-time> (Notification time) |
attempts | number |
Array of objects (Prospect Information) | |
updatedAt | string <date-time> (Date and time of the update) |
operationId | string |
{- "subscriptionId": "string",
- "topic": "agents",
- "type": "updated",
- "received": "2019-08-24T14:15:22Z",
- "sent": "2019-08-24T14:15:22Z",
- "attempts": 0,
- "prospect": [
- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "group": "string",
- "groupId": "string",
- "account": "string",
- "accountId": "string",
- "initialGroup": "string",
- "initialGroupId": "string",
- "firstName": "string",
- "lastName": "string",
- "category": "string",
- "userMade": true,
- "status": "string",
- "additionalData": { },
- "phones": [
- "+54 9 11 4552 0371"
], - "contactMediums": [
- { }
], - "leads": [
- {
- "created": "string",
- "createdBy": "string",
- "source": "string",
- "utmSource": "string",
- "providerKey": "string",
- "comments": "string",
- "type": "string"
}
], - "agent": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string"
}
], - "assigned": "2019-08-24T14:15:22Z",
- "firstContactedAt": "2019-08-24T14:15:22Z"
}
], - "updatedAt": "2019-08-24T14:15:22Z",
- "operationId": "string"
}
Notification | Payload change |
---|---|
Prospect created from the agent that is acting on behalf of. | "type": "created" |
Prospect transfer to the agent that is acting on behalf of. | "type": "updated" "updates": |
Subscribe to notification topics. Note that subscriptions are currently limited to one per group, and subscribing twice will result in the first subscription being deactivated.
topics required | Array of strings An array of topic names to subscribe to. Use the Notification Topics endpoint to see the available topics. |
callbackUrl required | string |
{- "topics": [
- "string"
], - "callbackUrl": "string"
}
{- "id": "string",
- "topics": [
- "string"
], - "callbackUrl": "string"
}
Returns an active notification subscription by its ID.
subscriptionId required | string^[a-z0-9]{24}$ The ID of the subscription. |
{- "id": "string",
- "topics": [
- "string"
], - "callbackUrl": "string"
}
Apps should handle the following lifecycle webhooks from Zenvia Conversion. All requests that originate from Zenvia Conversion will include the corresponding Client ID and Secret, and Apps should reject requests with missing or invalid credentials. All requests from Zenvia Conversion include the API Key of the App instance as context.
Zenvia Conversion will call this endpoint whenever a new App instance is installed. This request will include essential information for the App instance like its API Key and initial state.
The App should store the API Key as it will be needed for future calls to the Zenvia Conversion API. See Authentication.
appId | string |
appSecret | string |
object |
{- "appId": "APP_ID",
- "appSecret": "APP_SECRET'",
- "integration": {
- "apiKey": "string",
- "enabled": true
}
}
Apps can design a settings form layout by returning a JSON object with the following schema:
title | string A title for the form. |
description | string A description for the form. CommonMark syntax MAY be used for rich text representation. |
hint | string A relevant note that the third-party want to communicate to the user. CommonMark syntax MAY be used for rich text representation. |
warning | string An warning that the third-party want to communicate to the user, but that does not prevent submit the form data. CommonMark syntax MAY be used for rich text representation. |
error | string An error that prevents sending the form. CommonMark syntax MAY be used for rich text representation. |
required | Array of objects A list of sections for the form |
Array of objects A list of validation that allow to the third-party to modify the form based on data completed by the user |
{- "title": "string",
- "description": "string",
- "hint": "string",
- "warning": "string",
- "error": "string",
- "sections": [
- {
- "name": "string",
- "title": "string",
- "description": "string",
- "hint": "string",
- "warning": "string",
- "error": "string",
- "hidden": true,
- "hiddenWhere": { },
- "disabled": true,
- "disabledWhere": { },
- "inputs": [
- {
- "name": "string",
- "type": "text",
- "label": "string",
- "hint": "string",
- "warning": "string",
- "error": "string",
- "hidden": true,
- "hiddenWhere": { },
- "disabled": true,
- "disabledWhere": { },
- "customProps": { }
}
]
}
], - "validations": [
- {
- "where": { },
- "changes": [
- {
- "name": "string",
- "hint": "string",
- "warning": "string",
- "error": "string",
- "customProps": { }
}
]
}
]
}
When the user saves changes to the App settings, Zenvia Conversion will use the names of the inputs as keys and send them to the PUT settings
App Lifecycle endpoint.
Zenvia Conversion will request the App for a settings object from time to time. Apps can store any relevant settings needed for the App instance.
The keys in the settings object should match with the form inputs names, so they can be edited in the App settings screen by the user.
App response example
{
"automaticReplyEnabled": true
}
Whenever a user changes the App settings, Zenvia Conversion will send the updated settings object to this endpoint. It is recommended to make a merge with the updated settings since Zenvia Conversion will just send the new ones and not the entire set.
Request payload example
{
"automaticReplyEnabled": false
}
Whenever a user disables or enables the App, Zenvia Conversion will notify the App backend of this. Use this to pause or resume the execution of your App instance if applicable.
Any call made to the API by a disabled App will return an error.
enabled | boolean |
{- "enabled": true
}
Zenvia Conversion may refresh the App's API Keys at any time, and send the new API Key using this endpoint. Avoid using API Keys that have been refreshed.
newApiKey | string |
{- "newApiKey": "abc123"
}
Whenever a user deletes the App, Zenvia Conversion will notify the App backend of this and will 'soft' delete it (logical delete)
Response example
{
"success": true
}
App developers can leverage the following Extension Points, allowing them to go beyond what is possible to achieve as a Zenvia Conversion user or through the API.
Apps may add custom reports to the Reports section for managers to use. Users can interact with the App directly through these embedded reports.
Report definition schema:
key | string Unique identifier for the report. |
name | string Report name and title. Must be localizable. |
url | string <uri> Report URL. May contain placeholders. |
{- "key": "string",
- "name": "string",
}
Zenvia Conversion will add the following query parameters automatically:
Query Parameter | Description | Example |
---|---|---|
sirenaAppId |
App instance ID | 507f191e810c19729de860eb |
range |
Date range of the Report. Can be last-month , this-month , yesterday , today , last30 , last7 or custom |
custom |
start |
Report starting date in YYYY-MM-DD format (only applies for range=custom ) |
2020-12-01 |
end |
Report ending date in YYYY-MM-DD format (only applies for range=custom ) |
2020-12-31 |
group |
ID of the group selected for the report | 507f191e810c19729de860ee |
parentGroup |
ID of the group of the user viewing the report | 507f191e810c19729de860ef |
signature |
See Request signature below | a08116905e92633e4f30eefd1276206b259305c8783642fc5b7f51c089187939 |
The report URL may contain placeholders as follows:
https://app.example.com/prospect/${prospect._id}?lang=${group.language}
Supported placeholders:
Placeholder | Description | Example |
---|---|---|
user._id |
ID of the user viewing the report | 507f191e810c19729de860ea |
user.firstName |
First name of the user | Jorge |
user.lastName |
Last name of the user | Letona |
user.cellPhone |
Cell Phone number of the user | +15417543010 |
user.phone |
Phone number of the user | +15417543010 |
user.email |
Email of the user | [email protected] |
group._id |
ID of the group of the user viewing the report | 507f191e810c19729de860ec |
group.name |
Name of the group | Sales |
group.language |
Language of the group in ISO 639-1 format | en |
group.displayName |
Display name of the group | Sales |
Apps may add custom buttons to the conversation toolbar for agents to use. Once clicked, these buttons open embedded dialogs where the agent can interact with the App directly.
Button definition schema:
key | string Unique identifier for the button. |
name | string Button name and label. Localizable. |
url | string <uri> Embedded dialog URL. May contain placeholders. |
icon | string <data-uri> Icon in Data URI format. A 64x64 px PNG image is recommended. |
{- "key": "string",
- "name": "string",
- "icon": "string"
}
Zenvia Conversion will add the following query parameters automatically:
Query Parameter | Description | Example |
---|---|---|
sirenaAppId |
App instance ID | 507f191e810c19729de860eb |
signature |
See Request signature below | a08116905e92633e4f30eefd1276206b259305c8783642fc5b7f51c089187939 |
The URL can contain placeholders as follows:
https://app.example.com/prospect/${prospect._id}?lang=${group.language}
Supported placeholders:
Placeholder | Description | Example |
---|---|---|
prospect._id |
ID of the contact whose conversation the button is clicked on | 507f191e810c19729de860ea |
prospect.firstName |
First name of the contact | John |
prospect.lastName |
Last name of the contact | Smith |
prospect.phones |
Phone numbers of the contact. Numbers must be comma separated. | +15417543010 |
prospect.emails |
Emails of the contact. Numbers must be comma separated. | +15417543010 |
user._id |
ID of the user viewing the report | 507f191e810c19729de860ea |
user.firstName |
First name of the user | Jorge |
user.lastName |
Last name of the user | Letona |
user.cellPhone |
Cell Phone number of the user | 15417543010 |
user.phone |
Phone number of the user | 15417543010 |
user.email |
Email of the user | [email protected] |
group._id |
ID of the group | 507f191e810c19729de860ea |
group.name |
Name of the group | Sales |
group.language |
Language of the group in ISO 639-1 format | en |
group.displayName |
Display name of the group | Sales |
prospect.source |
Source of the contact | Whatsapp |
prospect.providerLeadId |
External id of the contact | ABC-123-xyz |
In order to avoid the forging of requests, Zenvia Conversion adds a signature parameter. To verify it follow these steps:
signature
query parameter. Make a copy of the request URL WITHOUT the signature
.const hmac = crypto.createHmac('sha256', PRIVATE_KEY)
hmac.update(URL)
const EXPECTED_SIGNATURE = hmac.digest('hex')
signature
with EXPECTED_SIGNATURE
and reject the request if they don't match.An array of fields to add to the prospect and user entities, respectively. Each field definition contains the following elements:
An array of fields to add to the prospect and user entities, respectively. Each field definition contains the following elements:
All localizable strings need an English variant that will be used by default and may define additional variants for other languages or locales.
They should be objects with the following schema:
fieldName: {
en: 'Text in English', // mandatory
es: 'Text in Spanish',
pt: 'Text in Portuguese'
}