Interactions
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.
Authorization
ApiKeyAuth X-API-Key<token>
API key generated from your Vayaflow dashboard Settings page
In: header
Path Parameters
interactionId*string
The interaction ID (int_xxx format)
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/int_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": {
"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 a field library entry
Returns a single field library entry by its unique key. The key is the internal identifier used throughout the system (e.g. "first_name", "retainer_document").
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.