Download OpenAPI specification:Download
The Conversation API is a REST web service that enables you to trigger smart conversation flows to a contact or a segment of contacts. A smart conversation flow is an automated workflow process implemented on the DANAConnect platform that is used to send messages to customers through different channels such as email, sms, push and others.
username and password in the DANAConnect platform.conversationID) for this flow.conversationID)?For most DANAConnect API requests, you will need to send the Conversation ID as a parameter.
This conversation ID refers to the number assigned to the activation of the flow and can be found by logging into the DANAConnect platform and looking in the activation report for the conversation you need to refer to.
It is important to mention that every time a conversation is reactivated, a new Conversation ID will be generated.
Here is a video explaining how to find the conversation ID:
Starts a conversation with the preloaded list
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
const fetch = require('node-fetch'); async function makeRequest(){ const conversationId = '<ConversationID>'; const resp = await fetch( `https://appserv.danaconnect.com/api/1.0/rest/conversation/${conversationId}/start/list`, { method: 'POST', headers: { 'X-DEBUG': '0', Authorization: 'Basic ' + Buffer.from('<username>@<companyCode>:%<Password>').toString('base64') } } ); const data = await resp.text(); console.log(data); } makeRequest()
Result of a successful request
{- "wsResult": {
- "idResult": 0,
- "resultDescription": "OK"
}
}Starts a conversation with one new record using the data given in the JSON
Json with the values to be used to create a new record \n Example:
{"NAME":"Dana", "EMAIL":"support@danaconnect.com"}
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
Request sent to a contact defined in the JSON
{- "NAME": "Dana",
- "EMAIL": "support@danaconnect.com"
}Result of a successful request
{- "wsResult": {
- "idResult": 23617,
- "resultDescription": "OK"
}
}Starts a conversation with a record identified by recordUID (idRow)
JSON with the values to be used to update the record
Example:
{"PHONE_NUMBER":"+19546441233","RECEIPT_FILE":"s3:\/\/Receipt\/receipt-example.pdf"}
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
JSON with the values to be used to update the record
{- "PHONE_NUMBER": "+19546441233",
- "RECEIPT_FILE": "s3://Receipt/receipt-example.pdf"
}Result of a successful request
{- "wsResult": {
- "idResult": 0,
- "resultDescription": "OK"
}
}Starts a conversation with a batch of up to 10 new contacts with the given information
JSON Array with different fields for each record to be created ( up to 10 new records )
Example:
[
{"LASTNAME":"MOLA","EMAIL":"954222233","ID_TYPE":"PASSPORT","NAME":"JOHN","GENDER":"M"},
{"LASTNAME":"BORDA","EMAIL":"939988777","ID_TYPE":"PASSPORT","NAME":"ROBERT","GENDER":"M"}]
Successful Request
Request Internal Error
Unauthorized User
Illegal Argument
JSON Array containing the records to be created
[- {
- "LASTNAME": "MOLA",
- "EMAIL": "954222233",
- "ID_TYPE": "PASSPORT",
- "NAME": "JOHN",
- "GENDER": "M"
}, - {
- "LASTNAME": "BORDA",
- "EMAIL": "939988777",
- "ID_TYPE": "PASSPORT",
- "NAME": "ROBERT",
- "GENDER": "M"
}
]Result of a successful request
[- {
- "wsResult": {
- "idResult": 3663,
- "resultDescription": "OK"
}
}, - {
- "wsResult": {
- "idResult": 3664,
- "resultDescription": "OK"
}
}
]Starts a conversation with one new record using the data given in the JSON
Json with the values to be used to create a new record
Example:
{"NAME":"Dana", "EMAIL":"support@danaconnect.com"}
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
Request sent to a contact defined in the JSON
{- "NAME": "Dana",
- "EMAIL": "support@danaconnect.com"
}Result of a successful request
{- "wsResult": {
- "idResult": 23617,
- "resultDescription": "OK"
}
}Multiple values are returned for each contact
Successful Request
Request Internal Error
Unauthorized User
Illegal Argument
curl -i -X GET \ -u <username@companycode>:<password> \ 'https://appserv.danaconnect.com/api/1.0/rest/conversation/data/:danaparam?fields=EMAIL,NAME,PHONE_NUMBER' \ -H 'Accept: application/json'
Successful Result
{- "record": {
- "TESTREST_NAME": "John",
- "TESTREST_SIGNATURES": "s3://WS/2021/3/05c8ae8f0a8bed9e0ffd361a214d1c21",
- "TESTREST_VALUE": "Doe",
- "TESTREST_PHONE_NUMBER": "+3465900000",
- "TESTREST_PLAN": "Medio",
- "TESTREST_EMAIL": "jdoe@danaconnect.com"
}, - "requestID": "5bc6bb89-82c7-4a2a-80a3-fbf5abedeee9"
}