LeadSail
Interactions

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.

GET
/api/v1/interactions/lead/{leadId}

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Vayaflow dashboard Settings page

In: header

Path Parameters

leadId*string

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"
  }
}