# List Email Campaigns

`lawmatics_list-email-campaigns` · Lawmatics MCP tool · Email Campaigns

List email campaigns from Lawmatics with optional pagination and sorting. Each row includes a `relationships` envelope of {id,type} pointers to its audience and custom email template.

## Input

- **page** `integer` (> 0) — Page number (1-based)
- **sortBy** `string` (enum: "id", "created_at", "updated_at") — Column to sort by
- **sortOrder** `string` (enum: "asc", "desc") — Sort direction; defaults to descending server-side

## Output

- **emailCampaigns** `array` (required) — Email campaigns on this page of results
  - **[]** `object`
    - **id** `string` (required) — Composite campaign ID (e.g. "MarketingCampaign-1"); pass this to get/stats tools to chain reads
    - **name** `string` (required) — Campaign name as shown in Lawmatics
    - **status** `number` (required) — Integer status code for the campaign (e.g. 0, 1); value meanings are not documented
    - **openRate** `number | null` (required) — Email open rate for the campaign; null when not yet computed
    - **sendCount** `number | null` (required) — Number of emails sent for this campaign; null when not yet computed
    - **sentAt** `string | null` (required) — When the campaign was sent, as an ISO 8601 timestamp; null if it has not been sent
    - **startedProcessingAt** `string | null` (required) — When the campaign started processing, as an ISO 8601 timestamp; null if it has not started
    - **campaignType** `string` (required) — Campaign kind; observed values are "MarketingCampaign" and "RecurringCampaign" ("DateCampaign" is documented but unobserved in responses)
    - **createdAt** `string` (required) — When the campaign was created, as an ISO 8601 timestamp
    - **relationships** `object` (required) — JSON:API relationship pointers to related records as {id,type} stubs. Not materialized — follow a pointer by calling that resource's own get tool (e.g. type 'custom_email' -> get-custom-email). PROVISIONAL: shape modeled from documentation, not yet live-confirmed.
      - **audience** `object | null` (required) — Audience this campaign targets (type 'audience') pointer; null when it has no audience
        - **id** `string` (required) — ID of the referenced Lawmatics record
        - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
      - **customEmail** `object | null` (required) — Custom email template this campaign sends (type 'custom_email') pointer; null when unset
        - **id** `string` (required) — ID of the referenced Lawmatics record
        - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
- **pagination** `object | null` (required) — Pagination metadata from the API response; null when the endpoint returns no meta envelope
  - **totalPages** `number | null` (required) — Total number of pages available; null if not reported
  - **limitPerPage** `number | null` (required) — Maximum campaigns returned per page; null if not reported
  - **totalEntries** `number | null` (required) — Total number of email campaigns across all pages; null if not reported
