Skip to main content
GET
/
api
/
v1
/
leads
/
:leadId
/
action-logs
const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
const options = {
  method: 'GET',
  headers: {
    'x-api-key': '<your-api-key>',
  },
};

fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/action-logs`, options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
[
  {
    "id": "4b6911e8-be8f-448f-9313-d5f1f3eddb37",
    "type": "MESSAGE",
    "status": "COMPLETED",
    "summary": "Incoming sms: No subject",
    "input": {
      "channel": "SMS",
      "direction": "INBOUND",
      "metadata": {
        "twilioData": {
          "to": "+14156886308",
          "from": "+14155099231",
          "numMedia": "1"
        }
      }
    },
    "output": null,
    "messages": [
      {
        "id": "b32ffde0-c769-4070-ae2d-364d1bf22f87",
        "channel": "SMS",
        "direction": "INBOUND",
        "body": "",
        "documents": [
          {
            "id": "47c2616a-789d-4418-b701-5facfa947530",
            "filename": "sms_attachment_0_1760383152664.png",
            "mimeType": "image/png",
            "size": 332998
          }
        ]
      }
    ],
    "createdAt": "2025-10-13T19:19:11.928Z",
    "completedAt": "2025-10-13T19:19:11.927Z"
  }
]
This endpoint fetches all action logs (activity history) for a specific lead. Action logs include messages, tool executions, follow-ups, and other agent actions.

Path Parameters

leadId
string
required
The unique identifier of the lead

Response

actionLogs
array
Array of action log objects
id
string
Unique identifier for the action log
type
string
Type of action (e.g., “MESSAGE”, “FOLLOW_UP_MESSAGE”, “TOOL_CALL”)
status
string
Status of the action (e.g., “COMPLETED”, “PENDING”, “FAILED”)
summary
string
Brief summary of the action
input
object
Input data for the action
output
object
Output data from the action
error
string
Error message if the action failed
messages
array
Array of messages associated with this action
createdAt
string
ISO 8601 timestamp when the action was created
completedAt
string
ISO 8601 timestamp when the action was completed
scheduledAt
string
ISO 8601 timestamp when the action is scheduled (for future actions)
const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
const options = {
  method: 'GET',
  headers: {
    'x-api-key': '<your-api-key>',
  },
};

fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/action-logs`, options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
[
  {
    "id": "4b6911e8-be8f-448f-9313-d5f1f3eddb37",
    "type": "MESSAGE",
    "status": "COMPLETED",
    "summary": "Incoming sms: No subject",
    "input": {
      "channel": "SMS",
      "direction": "INBOUND",
      "metadata": {
        "twilioData": {
          "to": "+14156886308",
          "from": "+14155099231",
          "numMedia": "1"
        }
      }
    },
    "output": null,
    "messages": [
      {
        "id": "b32ffde0-c769-4070-ae2d-364d1bf22f87",
        "channel": "SMS",
        "direction": "INBOUND",
        "body": "",
        "documents": [
          {
            "id": "47c2616a-789d-4418-b701-5facfa947530",
            "filename": "sms_attachment_0_1760383152664.png",
            "mimeType": "image/png",
            "size": 332998
          }
        ]
      }
    ],
    "createdAt": "2025-10-13T19:19:11.928Z",
    "completedAt": "2025-10-13T19:19:11.927Z"
  }
]