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

# Get campaign metrics

> Retrieve all-time email engagement metrics for a campaign.

<Warning>The metrics API must be enabled for your team.</Warning>


## OpenAPI

````yaml https://app.loops.so/openapi.json get /v1/campaigns/{campaignId}/metrics
openapi: 3.1.0
info:
  title: Loops OpenAPI Spec
  description: This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
  version: 1.22.0
servers:
  - url: https://app.loops.so/api
security: []
tags:
  - name: API key
  - name: Audience segments
    description: View audience segments
  - name: Campaigns
    description: Create and manage email campaigns
  - name: Campaign groups
    description: Organize campaigns into groups
  - name: Configuration
    description: View configuration settings
  - name: Contacts
    description: Manage contacts in your audience
  - name: Contact properties
    description: Manage contact properties
  - name: Components
    description: View email components
  - name: Email messages
    description: Manage email message content for campaigns
  - name: Events
    description: Trigger workflows with events
  - name: Event patterns
    description: View workflow event patterns
  - name: Mailing lists
    description: View mailing lists
  - name: Themes
    description: View email themes
  - name: Transactional emails
    description: Create, manage, and send transactional emails
  - name: Transactional groups
    description: Organize transactional emails into groups
  - name: Uploads
    description: Upload image assets
  - name: Workflows
    description: View and mutate workflow graphs
  - name: Workflow nodes
    description: View and mutate workflow nodes
  - name: Webhooks
    description: >-
      Events Loops sends to your configured webhook endpoint when certain events
      happen in your account. Configure an endpoint in Settings → Webhooks. Each
      account supports one webhook endpoint. Events are signed with
      `webhook-id`, `webhook-timestamp`, and `webhook-signature` headers and
      delivered at a maximum rate of 10 per second. See
      https://loops.so/docs/webhooks for setup, verification, and payload
      details.
paths:
  /v1/campaigns/{campaignId}/metrics:
    parameters:
      - name: campaignId
        in: path
        required: true
        description: The ID of the campaign.
        schema:
          type: string
          examples:
            - clc4m6n8p0q2r4s6t8u0v2x4
    get:
      tags:
        - Campaigns
      summary: Get campaign metrics
      description: >-
        Retrieve all-time email engagement metrics for a campaign. The metrics
        API must be enabled for your team.
      operationId: getCampaignMetrics
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMetricsResponse'
        '400':
          description: >-
            Invalid `campaignId`, the campaign has not been sent yet, or the
            campaign has no email message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignFailureResponse'
        '401':
          description: Invalid API key or metrics API not enabled for this team.
        '404':
          description: Campaign not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignFailureResponse'
        '405':
          description: Wrong HTTP request method.
      security:
        - apiKey: []
components:
  schemas:
    EmailMetricsResponse:
      type: object
      description: >-
        All-time email engagement counters. Opens and clicks count sends, not
        events: a send opened five times counts once. A recipient who received
        the email twice is counted once per send, not once per person.
      properties:
        sends:
          type: integer
          description: Number of sends.
          examples:
            - 4210
        opens:
          type: integer
          description: Number of sends that were opened at least once.
          examples:
            - 1922
        clicks:
          type: integer
          description: Number of sends where at least one link was clicked.
          examples:
            - 301
        unsubscribes:
          type: integer
          description: Number of unsubscribes.
          examples:
            - 12
        spamReports:
          type: integer
          description: Number of sends reported as spam.
          examples:
            - 1
        hardBounces:
          type: integer
          description: Number of sends that hard bounced.
          examples:
            - 9
        softBounces:
          type: integer
          description: Number of sends that soft bounced.
          examples:
            - 13
      required:
        - sends
        - opens
        - clicks
        - unsubscribes
        - spamReports
        - hardBounces
        - softBounces
      examples:
        - sends: 4210
          opens: 1922
          clicks: 301
          unsubscribes: 12
          spamReports: 1
          hardBounces: 9
          softBounces: 13
    CampaignFailureResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      examples:
        - message: Campaign not found.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

## Related topics

- [Get transactional email metrics](/docs/api-reference/get-transactional-email-metrics.md)
- [Get workflow node metrics](/docs/api-reference/get-workflow-node-metrics.md)
- [Get a campaign](/docs/api-reference/get-campaign.md)
- [Get a campaign group](/docs/api-reference/get-campaign-group.md)
- [Understanding metrics](/docs/goals/metrics.md)
