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.
conversationID) for this flow.The conversation identification number in DANAConnect can be found on the activation reports page for each flow inside the Conversation Manager. Important: Every time a conversation is reactivated, a new Conversation ID will be generated.
You must have the codes of the required fields in the database used with this conversation. For example, Conversation with ID (123456) would require:
NAMESURNAMEEMAILDEBTEXPIRATION_DATEFor 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.
Here is a video explaining how to find the conversation ID:
Endpoints for starting and managing conversation workflows. Use these endpoints to trigger automated communication flows with contacts, either individually or in batches.
Starts a conversation with a record identified by recordUID (rowId)
Optional JSON object with additional field values to merge with the existing record
object Dynamic key-value pairs where keys are field codes configured in the conversation workflow |
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
Override fields example
{- "EMAIL": "updated@example.com"
}Result of a successful request
{- "wsResult": {
- "idResult": 0,
- "resultDescription": "OK"
}
}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/2.0/rest/conversation/${conversationId}/start/list`, { method: 'POST', headers: { 'X-DEBUG': '0', Authorization: 'Bearer <access_token>' } } ); const data = await resp.text(); console.log(data); } makeRequest()
Result of a successful request
{- "wsResult": {
- "idResult": 0,
- "resultDescription": "OK"
}
}Starts a conversation with a batch of up to 100 new contacts with the given information
JSON array of contact objects (max 100 items)
object Dynamic key-value pairs where keys are field codes configured in the conversation workflow |
Successful Request
Request Internal Error
Unauthorized User
Illegal Argument
Batch contacts example
[- {
- "EMAIL": "user1@example.com",
- "NAME": "User One"
}, - {
- "EMAIL": "user2@example.com",
- "NAME": "User Two"
}
]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 object with field codes as keys and their values
object Dynamic key-value pairs where keys are field codes configured in the conversation workflow |
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
Contact data example
{- "EMAIL": "john.doe@example.com",
- "NAME": "John Doe",
- "PHONE_NUMBER": "+34659000000"
}Result of a successful request
{- "wsResult": {
- "idResult": 23617,
- "resultDescription": "OK"
}
}Retrieves all configured field names for a specific conversation workflow
Successful Request
Request Internal Error
Unauthorized User
Conversation Not Found
Successful Result
{- "wsResult": {
- "idConversation": 12345,
- "fieldList": [
- "EMAIL",
- "NAME",
- "PHONE_NUMBER"
]
}
}Alternative endpoints that use ProjectID instead of ConversationID. Useful when you have project-level access rather than specific conversation IDs.
Starts a conversation with one new record using the data given in the JSON
JSON object with field codes as keys and their values
object Dynamic key-value pairs where keys are field codes configured in the conversation workflow |
Successful Request
Request Internal Error
Unauthorized user
Illegal Argument
{- "EMAIL": "john.doe@example.com",
- "NAME": "John Doe",
- "PHONE_NUMBER": "+34659000000",
- "CUSTOM_FIELD": "custom value"
}Result of a successful request
{- "wsResult": {
- "idResult": 23617,
- "resultDescription": "OK"
}
}Retrieves all configured field names for a specific ProjectId workflow
Successful Request
Request Internal Error
Unauthorized User
Conversation Not Found
Successful Result
{- "wsResult": {
- "idConversation": 12345,
- "fieldList": [
- "EMAIL",
- "NAME",
- "PHONE_NUMBER"
]
}
}Endpoints for retrieving contact data and conversation field configurations. Use these to fetch stored contact information or discover required fields.
Multiple values are returned for each contact
Successful Request
Request Internal Error
Unauthorized User
Illegal Argument
curl -i -X GET \ -H 'Authorization: Bearer <access_token>' \ -H 'Accept: application/json' \ 'https://appserv.danaconnect.com/api/2.0/rest/conversation/data/:danaparam?fields=EMAIL,NAME,PHONE_NUMBER'
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"
}