Saltar al contenido principal
GET
/
leads
/
{id}
/
history
Get lead history
curl --request GET \
  --url https://api.getnexor.ai/api/public/leads/{id}/history \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "lead": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+1234567890",
    "email": "john@example.com",
    "source": "api",
    "created_at": "2026-01-10T08:00:00Z"
  },
  "history": [
    {
      "type": "activity",
      "channel": "system",
      "activity_type": "workflow_assigned",
      "title": "Assigned to Sales Outreach",
      "description": "Lead enrolled via API",
      "actor_type": "system",
      "timestamp": "2026-01-10T08:00:00Z"
    },
    {
      "type": "message",
      "id": "11111111-1111-1111-1111-111111111111",
      "channel": "whatsapp",
      "direction": "outbound",
      "content": "Hi John, thanks for your interest!",
      "message_type": "template",
      "media_url": null,
      "attachments": null,
      "status": "delivered",
      "provider_message_id": "wamid.HBgL...",
      "sent_at": "2026-01-10T09:00:00Z",
      "delivered_at": "2026-01-10T09:00:05Z",
      "read_at": null,
      "reaction": null,
      "buttons": [
        {
          "type": "URL",
          "text": "Book a call",
          "url": "https://cal.example.com/john"
        }
      ],
      "timestamp": "2026-01-10T09:00:00Z"
    },
    {
      "type": "message",
      "id": "22222222-2222-2222-2222-222222222222",
      "channel": "whatsapp",
      "direction": "inbound",
      "content": "Yes, I'd like to learn more about pricing",
      "message_type": "text",
      "status": "read",
      "reaction": "👍",
      "sent_at": "2026-01-10T09:05:00Z",
      "timestamp": "2026-01-10T09:05:00Z"
    },
    {
      "type": "call_missed",
      "id": "33333333-3333-3333-3333-333333333333",
      "channel": "call",
      "call_status": "not_connected",
      "disconnection_reason": "dial_no_answer",
      "content": "Missed call — No answer",
      "provider_call_id": "call_abc123",
      "timestamp": "2026-01-10T13:00:00Z"
    },
    {
      "type": "call",
      "id": "44444444-4444-4444-4444-444444444444",
      "channel": "call",
      "duration_seconds": 185,
      "call_status": "ended",
      "call_successful": true,
      "summary": "Discussed pricing tiers and scheduled a demo for next week",
      "recording_url": "https://storage.example.com/recordings/abc123.wav",
      "sentiment": "positive",
      "disconnection_reason": "user_hangup",
      "provider_call_id": "call_def456",
      "timestamp": "2026-01-10T14:00:00Z"
    },
    {
      "type": "meeting",
      "id": "55555555-5555-5555-5555-555555555555",
      "channel": "system",
      "subtype": "booked",
      "title": "Product demo with John Doe",
      "status": "scheduled",
      "starts_at": "2026-01-15T17:00:00Z",
      "ends_at": "2026-01-15T17:30:00Z",
      "location_type": "video",
      "meeting_url": "https://meet.example.com/abc",
      "attendee_name": "John Doe",
      "attendee_email": "john@example.com",
      "timestamp": "2026-01-10T14:02:00Z"
    },
    {
      "type": "email",
      "id": "66666666-6666-6666-6666-666666666666",
      "channel": "email",
      "direction": "outbound",
      "subject": "Your demo is confirmed",
      "content": "Hi John, confirming our demo for Jan 15...",
      "status": "delivered",
      "sender": "Alice <alice@starkindustries.com>",
      "recipient": "john@example.com",
      "is_reply": false,
      "delivered_at": "2026-01-10T14:03:00Z",
      "opened_at": "2026-01-10T14:10:00Z",
      "timestamp": "2026-01-10T14:03:00Z"
    },
    {
      "type": "activity",
      "channel": "call",
      "activity_type": "status_changed",
      "title": "Status changed to Qualified",
      "description": "Lead qualified after discovery call",
      "actor_type": "ai",
      "timestamp": "2026-01-10T14:05:00Z"
    },
    {
      "type": "conversion",
      "id": "77777777-7777-7777-7777-777777777777",
      "channel": "system",
      "conversion_type": "Deal Won",
      "amount": 1200,
      "currency": "USD",
      "notes": "Annual plan",
      "timestamp": "2026-01-20T11:00:00Z"
    },
    {
      "type": "meeting",
      "id": "55555555-5555-5555-5555-555555555555",
      "channel": "system",
      "subtype": "completed",
      "title": "Product demo with John Doe",
      "status": "completed",
      "starts_at": "2026-01-15T17:00:00Z",
      "ends_at": "2026-01-15T17:30:00Z",
      "outcome_notes": "Demo went well, sending proposal",
      "timestamp": "2026-01-15T17:00:00Z"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "has_more": false
  }
}

Autorizaciones

X-API-Key
string
header
requerido

API key for authentication. Keys are prefixed with nxr_live_.

Parámetros de ruta

id
string<uuid>
requerido

Lead ID

Parámetros de consulta

channel
string

Comma-separated channel filter. Valid values: call, whatsapp, email, system. Example: channel=call,whatsapp. The system channel covers meetings, conversions, and activities.

limit
integer
predeterminado:50

Maximum number of history items to return (default 50, max 200)

Rango requerido: 1 <= x <= 200
offset
integer
predeterminado:0

Pagination offset

Rango requerido: x >= 0

Respuesta

Lead history retrieved successfully

success
boolean
requerido
lead
object
requerido
history
object[]
requerido
pagination
object
requerido
Última modificación el 18 de junio de 2026