List interactions for a lead
Returns all interactions for a specific lead, ordered by most recent first. Includes calls, SMS conversations, and email threads. Use this to see the full communication history for a lead.
Authorization
ApiKeyAuth API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
The lead ID
Response Body
application/json
application/json
application/json
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.leadsail.app/api/v1/interactions/lead/lead_abc123" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}{
"success": true,
"data": {
"interactions": [
{
"interactionId": "int_abc123",
"leadId": "string",
"campaignId": "string",
"clientId": "string",
"offerId": "string",
"type": "call",
"status": "in_progress",
"phone": "string",
"telephony": {
"provider": "vonage",
"messageId": "string",
"phoneNumber": "string"
},
"call": {
"source": "webrtc",
"direction": "inbound",
"duration": 0,
"recordingUrl": "string",
"terminationReason": "string",
"voiceAI": {
"provider": "elevenlabs",
"agentId": "string",
"conversationId": "string"
},
"spokenTo": true
},
"sms": {
"agentMode": true,
"direction": "inbound"
},
"summary": "string",
"transcript": [
{
"timestamp": "string",
"role": "agent",
"message": "string",
"source": "manual"
}
],
"errorCode": "string",
"errorMessage": "string",
"createdAt": "string",
"updatedAt": "string"
}
]
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}Get an interaction
Returns a single interaction by ID, including its full transcript, call or SMS details, status, and summary. Use this to check the result of a voice call or SMS conversation after initiation.
Fire a conversion pixel event
Sends a server-side conversion event to Facebook CAPI or TikTok Events API for a specific lead. The lead's contact info (email, phone), IP address, user agent, and platform click IDs (fbclid, ttclid, etc.) are automatically pulled from the lead record and included in the event payload. Use testEventCode to send events in test mode without affecting production data.