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

# Get Lead Activity

> Retrieve the activity timeline and campaign memberships for a lead.

## Path Parameters

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

## Response

<ResponseField name="data" type="object">
  <Expandable title="Activity data">
    <ResponseField name="activities" type="array">
      Chronological list of activities (most recent first, up to 100).

      <Expandable title="Activity object">
        <ResponseField name="id" type="string">Activity identifier.</ResponseField>
        <ResponseField name="type" type="string">`email_sent` or `reply_received`.</ResponseField>
        <ResponseField name="subject" type="string">Email subject line.</ResponseField>
        <ResponseField name="bodyPreview" type="string">First 200 characters of the body.</ResponseField>
        <ResponseField name="status" type="string">For `email_sent`: `sent`, `failed`, or `bounced`.</ResponseField>
        <ResponseField name="campaignName" type="string">Name of the associated campaign.</ResponseField>
        <ResponseField name="sequenceStep" type="integer">Sequence step number (for `email_sent`).</ResponseField>
        <ResponseField name="emailType" type="string">For `email_sent`: `campaign`, `reply`, or `warmup`.</ResponseField>
        <ResponseField name="openedAt" type="string">ISO 8601 timestamp if email was opened.</ResponseField>
        <ResponseField name="clickedAt" type="string">ISO 8601 timestamp if a link was clicked.</ResponseField>
        <ResponseField name="category" type="string">AI category (for `reply_received`).</ResponseField>
        <ResponseField name="timestamp" type="string">ISO 8601 timestamp of the activity.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="campaigns" type="array">
      All campaign memberships for this lead.

      <Expandable title="Campaign membership">
        <ResponseField name="campaignId" type="string">Campaign ID.</ResponseField>
        <ResponseField name="campaignName" type="string">Campaign name.</ResponseField>
        <ResponseField name="status" type="string">`pending`, `sent`, `paused`, or `completed`.</ResponseField>
        <ResponseField name="currentStep" type="integer">Current sequence step.</ResponseField>
        <ResponseField name="totalSent" type="integer">Emails sent in this campaign.</ResponseField>
        <ResponseField name="totalOpened" type="integer">Emails opened.</ResponseField>
        <ResponseField name="lastSentAt" type="string">ISO 8601 timestamp of last email sent.</ResponseField>
        <ResponseField name="nextSendAt" type="string">ISO 8601 timestamp of next scheduled email.</ResponseField>
        <ResponseField name="repliedAt" type="string">ISO 8601 timestamp if lead replied.</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.foxreach.io/api/v1/leads/cld_xyz789/activity" \
    -H "X-API-Key: otr_your_key"
  ```

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

  response = requests.get(
      "https://api.foxreach.io/api/v1/leads/cld_xyz789/activity",
      headers={"X-API-Key": "otr_your_key"},
  )
  data = response.json()
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    "https://api.foxreach.io/api/v1/leads/cld_xyz789/activity",
    {
      headers: { "X-API-Key": "otr_your_key" },
    }
  );
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "activities": [
        {
          "id": "rpl_abc123",
          "type": "reply_received",
          "subject": "Re: Quick question",
          "bodyPreview": "Thanks for reaching out! I'd love to learn more...",
          "status": null,
          "campaignName": "Q1 Outreach",
          "sequenceStep": null,
          "emailType": null,
          "openedAt": null,
          "clickedAt": null,
          "category": "interested",
          "timestamp": "2025-01-20T14:30:00"
        },
        {
          "id": "eml_001",
          "type": "email_sent",
          "subject": "Quick question, John",
          "bodyPreview": "Hi John, I noticed Acme recently expanded...",
          "status": "sent",
          "campaignName": "Q1 Outreach",
          "sequenceStep": 1,
          "emailType": "campaign",
          "openedAt": "2025-01-19T10:15:00",
          "clickedAt": null,
          "category": null,
          "timestamp": "2025-01-18T09:00:00"
        }
      ],
      "campaigns": [
        {
          "campaignId": "cmp_def456",
          "campaignName": "Q1 Outreach",
          "status": "sent",
          "currentStep": 1,
          "totalSent": 1,
          "totalOpened": 1,
          "lastSentAt": "2025-01-18T09:00:00",
          "nextSendAt": null,
          "repliedAt": "2025-01-20T14:30:00"
        }
      ]
    }
  }
  ```
</ResponseExample>

## Errors

| Status | Description    |
| ------ | -------------- |
| `404`  | Lead not found |

## Rate Limit

* **100 requests per minute, per API key.** Fixed 60-second window.
* Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix epoch seconds).
* A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
