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

# List Campaigns

> Retrieve a paginated list of campaigns with engagement metrics.

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number
</ParamField>

<ParamField query="per_page" type="integer" default="20">
  Results per page (max 100)
</ParamField>

<ParamField query="status" type="string">
  Filter by status. Options: `draft`, `active`, `paused`, `completed`
</ParamField>

<ParamField query="type" type="string">
  Filter by campaign type. Options: `product_update`, `event_invitation`, `new_product_launch`, `newsletter`, `custom`
</ParamField>

<ParamField query="search" type="string">
  Search by campaign name
</ParamField>

## Response

<ResponseField name="data" type="array">
  <Expandable title="Campaign object">
    <ResponseField name="id" type="string">
      Unique identifier
    </ResponseField>

    <ResponseField name="name" type="string">
      Campaign name
    </ResponseField>

    <ResponseField name="description" type="string">
      Campaign description
    </ResponseField>

    <ResponseField name="type" type="string">
      Campaign type
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status
    </ResponseField>

    <ResponseField name="audience_count" type="integer">
      Number of recipients
    </ResponseField>

    <ResponseField name="metrics" type="object">
      <Expandable title="Engagement metrics">
        <ResponseField name="sent" type="integer">
          Emails sent
        </ResponseField>

        <ResponseField name="delivered" type="integer">
          Emails delivered
        </ResponseField>

        <ResponseField name="opened" type="integer">
          Emails opened
        </ResponseField>

        <ResponseField name="clicked" type="integer">
          Links clicked
        </ResponseField>

        <ResponseField name="open_rate" type="number">
          Open rate (0-1)
        </ResponseField>

        <ResponseField name="click_rate" type="number">
          Click rate (0-1)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="schedule" type="object">
      Schedule settings
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp
    </ResponseField>

    <ResponseField name="sent_at" type="string">
      Send timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.medstrato.com/v1/campaigns?status=completed&type=product_update" \
    -H "Authorization: Bearer sk_live_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const campaigns = await medstrato.campaigns.list({
    status: 'completed',
    type: 'product_update'
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "id": "cmp_abc123",
        "name": "TAVR 2.0 Product Launch",
        "description": "Announcing the new generation TAVR system",
        "type": "new_product_launch",
        "status": "completed",
        "audience_count": 150,
        "metrics": {
          "sent": 150,
          "delivered": 148,
          "opened": 112,
          "clicked": 45,
          "open_rate": 0.76,
          "click_rate": 0.30
        },
        "schedule": {
          "type": "immediate"
        },
        "created_at": "2024-01-05T10:00:00Z",
        "sent_at": "2024-01-05T14:00:00Z"
      }
    ],
    "meta": {
      "page": 1,
      "per_page": 20,
      "total": 12
    }
  }
  ```
</ResponseExample>
