> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getomni.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Lead Action Logs

> Fetch all action logs (activity history) for a specific lead

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

<ParamField path="leadId" type="string" required>
  The unique identifier of the lead
</ParamField>

## Response

<ResponseField name="actionLogs" type="array">
  Array of action log objects

  <Expandable title="actionLogs">
    <ResponseField name="id" type="string">
      Unique identifier for the action log
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of action (e.g., `MESSAGE`, `FOLLOW_UP_MESSAGE`, `TOOL_CALL`, `MANUAL_UPDATE`)
    </ResponseField>

    <ResponseField name="status" type="string">
      Status of the action (e.g., `COMPLETED`, `PENDING`, `CANCELLED`, `AWAITING_APPROVAL`, `FAILED`)
    </ResponseField>

    <ResponseField name="summary" type="string">
      Brief summary of the action
    </ResponseField>

    <ResponseField name="input" type="object" nullable>
      Input data for the action (structure varies by action type)
    </ResponseField>

    <ResponseField name="output" type="object" nullable>
      Output data from the action (structure varies by action type)
    </ResponseField>

    <ResponseField name="error" type="string" nullable>
      Error message if the action failed
    </ResponseField>

    <ResponseField name="parentActionId" type="string" nullable>
      ID of the parent action that triggered this action
    </ResponseField>

    <ResponseField name="scheduledAt" type="string" nullable>
      ISO 8601 timestamp when the action is scheduled (for future actions)
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp when the action was created
    </ResponseField>

    <ResponseField name="completedAt" type="string" nullable>
      ISO 8601 timestamp when the action was completed
    </ResponseField>

    <ResponseField name="tool" type="object" nullable>
      Tool information if this is a tool call action

      <Expandable title="tool">
        <ResponseField name="id" type="string">
          Unique identifier for the tool
        </ResponseField>

        <ResponseField name="name" type="string">
          Name of the tool
        </ResponseField>

        <ResponseField name="description" type="string">
          Description of what the tool does
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="messages" type="array">
      Array of messages associated with this action

      <Expandable title="messages">
        <ResponseField name="id" type="string">
          Unique identifier for the message
        </ResponseField>

        <ResponseField name="channel" type="string">
          Channel of the message (e.g., "EMAIL", "SMS")
        </ResponseField>

        <ResponseField name="direction" type="string">
          Direction of the message (e.g., "INBOUND", "OUTBOUND")
        </ResponseField>

        <ResponseField name="subject" type="string" nullable>
          Subject of the message (for email messages)
        </ResponseField>

        <ResponseField name="body" type="string">
          Body content of the message
        </ResponseField>

        <ResponseField name="documents" type="array">
          Array of documents attached to the message

          <Expandable title="documents">
            <ResponseField name="id" type="string">
              Unique identifier for the document
            </ResponseField>

            <ResponseField name="filename" type="string">
              Filename of the document
            </ResponseField>

            <ResponseField name="mimeType" type="string">
              MIME type of the document
            </ResponseField>

            <ResponseField name="size" type="number">
              Size of the document in bytes
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```javascript Node.js theme={null}
  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));
  ```

  ```python Python theme={null}
  import requests

  lead_id = '4ef30123-90c2-4dc0-bd28-b43eee8664ea'
  url = f"https://api-v2.getomni.ai/api/v1/leads/{lead_id}/action-logs"
  headers = {
      "x-api-key": "<your-api-key>"
  }

  response = requests.request("GET", url, headers=headers)
  print(response.json())
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://api-v2.getomni.ai/api/v1/leads/4ef30123-90c2-4dc0-bd28-b43eee8664ea/action-logs \
    --header 'x-api-key: <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "25a6e7dc-2cdf-46b8-b0d5-9f1655ae154a",
      "type": "TOOL_CALL",
      "status": "COMPLETED",
      "summary": "Successfully executed deep research",
      "input": {
        "toolType": "deep_research",
        "companyInfo": "Vital Climbing Gym LLC",
        "instructions": "Conduct comprehensive company research"
      },
      "output": {
        "success": true,
        "summary": "Completed deep research for VITAL Climbing Gym...",
        "researchResult": {
          "address": "29990 Technology Dr, Unit 22, Murrieta, CA 92563",
          "companyName": "VITAL Climbing Gym (Vital Climbing, LLC)",
          "website": "https://www.vitalclimbinggym.com"
        }
      },
      "error": null,
      "parentActionId": null,
      "scheduledAt": "2025-09-07T23:51:06.209Z",
      "createdAt": "2025-09-07T23:51:06.210Z",
      "completedAt": "2025-09-07T23:54:29.052Z",
      "tool": {
        "id": "0a58309e-9657-4f35-a08d-4de9af03a5b7",
        "name": "update-checklist-item",
        "description": "Update a lead checklist item with a new value"
      },
      "messages": []
    },
    {
      "id": "e8ff3def-d6fc-40f7-902c-264d18fda1c5",
      "type": "FOLLOW_UP_MESSAGE",
      "status": "COMPLETED",
      "summary": "Requested business details to start loan application process",
      "input": {
        "channel": "EMAIL",
        "attemptNumber": 1,
        "adminTriggered": true,
        "missingItemsCount": 11
      },
      "output": {
        "isReply": false,
        "messageMetadata": {
          "to": ["annapojawis@yahoo.com"],
          "from": "Mark Ding <support@agent.getomni.ai>",
          "subject": "Finishing up your application"
        }
      },
      "error": null,
      "parentActionId": null,
      "scheduledAt": "2025-09-07T23:56:21.587Z",
      "createdAt": "2025-09-07T23:56:21.588Z",
      "completedAt": "2025-09-07T23:56:45.426Z",
      "tool": null,
      "messages": [
        {
          "id": "a261a0ca-c77d-4226-a3f9-5cf63d0e8634",
          "channel": "EMAIL",
          "direction": "OUTBOUND",
          "subject": "Finishing up your application",
          "body": "Hi Anna,<br><br>This is Mark with Omni Capital...",
          "documents": []
        }
      ]
    }
  ]
  ```
</ResponseExample>
