# List Campaigns

`lawmatics_list-campaigns` · Lawmatics MCP tool · Marketing Campaigns

List marketing campaigns from Lawmatics with optional pagination and sorting. Each campaign includes its description, UTM match string, tracking number, PNC count, and a to-one {id,type} pointer to its source; use get-campaign for the full record including the attributed matters (prospects).

## 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; ascending or descending

## Output

- **campaigns** `array` (required) — Marketing campaigns on this page of results
  - **[]** `object`
    - **id** `string` (required) — Lawmatics marketing campaign ID
    - **name** `string` (required) — Campaign name
    - **description** `string | null` (required) — Free-text description of the campaign; null if unset
    - **utmMatch** `string | null` (required) — UTM parameter match string used to attribute traffic to this campaign; null if unset
    - **trackingNumber** `string | null` (required) — Phone tracking number for the campaign, in E.164 format (e.g. "+18556347246"); null if unset
    - **pncCount** `number | null` (required) — Count of PNCs (potential new clients) attributed to this campaign; null if not reported
    - **matterCount** `number` (required) — Number of matters currently attributed to this campaign
    - **createdAt** `string` (required) — When the campaign was created, as an ISO 8601 timestamp
    - **updatedAt** `string` (required) — When the campaign was last updated, as an ISO 8601 timestamp
    - **relationships** `object` (required) — To-one JSON:API relationship pointers as {id,type} stubs. Not materialized — follow a pointer by calling that resource's own tool. List rows carry to-one pointers only; use get-campaign for the full envelope incl. to-many attributed matters (prospects).
      - **source** `object | null` (required) — Marketing source this campaign belongs to (type 'source') pointer; null when it has no source
        - **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` (required) — Pagination metadata derived from the API `meta` envelope
  - **totalPages** `number` (required) — Total number of pages available
  - **limitPerPage** `number` (required) — Maximum campaigns returned per page
  - **totalEntries** `number` (required) — Total number of campaigns across all pages
