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

# Get durable campaign message metrics

> Count durable sent-message rows for an owned Outbound

**CLI:**

```bash theme={null}
pixie campaign message-metric --id <id>
```

## Overview

Returns the cumulative number of durable sent-message rows for an Outbound owned by the authenticated caller. The server verifies ownership, then performs an exact count of `campaign_prospect_messages` rows for that Outbound whose `sent_at` value is set.

The response contains one non-negative integer, `campaign_total_sent`. It includes sent messages and LinkedIn connection notes represented by durable outbox rows. Bare LinkedIn invitations without a note are excluded because they do not create a message row.

This is a lightweight read when you need the sent-message total without loading the full [Outbound detail](/api-reference/campaigns/get-campaign). It does not modify the Outbound.

## AI agent notes

* Treat `campaign_total_sent` as a cumulative message count, not a recipient count: one recipient can have multiple sent message rows.
* A successful response with `campaign_total_sent: 0` is valid when no durable message or connection-note row has been sent.
* Surface `401`, `404`, and `500` errors. Do not retry an unchanged `401` or `404`; correct authentication or the Outbound ID first.


## OpenAPI

````yaml get /api/campaigns/{id}/message-metrics
openapi: 3.0.3
info:
  title: Pixie API
  version: 1.0.0
  description: >-
    HTTP API for the Pixie GTM platform - Lead Finder search preparation,
    campaign-backed Outbound execution, Pixie Agent runs, sender management, and
    Unibox reply workflows. Designed for operation by both humans and autonomous
    AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Pixie Support
    url: https://pixie.ai
servers:
  - url: https://app.pixie.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
paths:
  /api/campaigns/{id}/message-metrics:
    get:
      tags:
        - Campaigns
      summary: Get durable campaign message metrics
      description: >-
        Return the exact cumulative sent message count for an owned campaign
        without loading full campaign detail.
      operationId: getCampaignMessageMetrics
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Campaign UUID
      responses:
        '200':
          description: Exact durable campaign sent-message count.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign_total_sent:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                    description: >-
                      Cumulative direct messages or emails. LinkedIn
                      connection-request notes are excluded.
                required:
                  - campaign_total_sent
                additionalProperties: false
        '401':
          description: Missing authentication.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Campaign not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Database or server failure.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````