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

# PublicApiGetCampaignAnalytics

> GET /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/analytics

Use this endpoint through the Developer API or the matching `firstsales` CLI command when available. Responses use the stable FirstSales public error envelope.


## OpenAPI

````yaml GET /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/analytics
openapi: 3.1.0
info:
  title: FirstSales Developer API
  version: 1.0.0
  description: >-
    Public v1 developer API for FirstSales.io. Generated from live step
    definitions — do not hand-edit.
servers:
  - url: https://sandbox.api.app.firstsales.io
  - url: https://api.app.firstsales.io
security:
  - bearerAuth: []
tags:
  - name: Activities
  - name: Alerts
  - name: API Keys
  - name: Authentication
  - name: Billing
  - name: Blocked Domains
  - name: Campaigns
  - name: Companies
  - name: Connectors
  - name: Contacts
  - name: Copilot
  - name: Dashboard
  - name: Deals
  - name: Direct Email
  - name: Email Authentication
  - name: Inbox
  - name: Knowledge Bases
  - name: Learning
  - name: Offerings
  - name: Organizations
  - name: Product Updates
  - name: Sequence Library
  - name: Signals
    description: >-
      Beta. Find people who comment on or react to LinkedIn posts by a keyword,
      a person or a company page. Each scan costs 10x the scraper cost in
      credits (1 credit = $0.01), capped by the daily budget of the signal. A
      scan that adds no new person is free.
  - name: Suppression
  - name: Team
  - name: Tracking Domains
  - name: Warmup
paths:
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/analytics:
    get:
      tags:
        - Campaigns
      summary: PublicApiGetCampaignAnalytics
      operationId: getCampaignAnalytics
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: range
          in: query
          required: false
          schema:
            type: string
            enum:
              - 7d
              - 30d
              - all
            default: all
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCampaignAnalyticsResponse'
        '400':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '401':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '403':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '404':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '429':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '500':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '503':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
      security:
        - developerKeyBearer: []
components:
  schemas:
    PublicCampaignAnalyticsResponse:
      type: object
      properties:
        campaignId:
          type: string
        goal:
          type: string
          enum:
            - meeting
            - demo
            - download
            - order
            - reply
            - custom
            - default
        startedAt:
          anyOf:
            - type: string
            - type: 'null'
        lastUpdatedAt:
          type: string
        windowStart:
          anyOf:
            - type: string
            - type: 'null'
        windowEnd:
          type: string
        totalContacts:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        goalKpis:
          type: object
          properties:
            goalsAchieved:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            goalRate:
              type: number
              minimum: 0
              maximum: 1
            avgDaysToGoal:
              anyOf:
                - type: number
                - type: 'null'
            byType:
              type: object
              properties:
                demo:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                download:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                order:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                meeting:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - demo
                - download
                - order
                - meeting
              additionalProperties: false
            revenue:
              type: object
              properties:
                total:
                  type: number
                currency:
                  type: string
                orderCount:
                  type: number
                otherCurrencies:
                  type: array
                  items:
                    type: object
                    properties:
                      currency:
                        type: string
                      total:
                        type: number
                      orderCount:
                        type: number
                    required:
                      - currency
                      - total
                      - orderCount
                    additionalProperties: false
              required:
                - total
                - currency
                - orderCount
              additionalProperties: false
          required:
            - goalsAchieved
            - goalRate
            - avgDaysToGoal
            - byType
          additionalProperties: false
        engagementKpis:
          type: object
          properties:
            sent:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            delivered:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            opened:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            clicked:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            replied:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            bounced:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unsubscribed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            openRate:
              type: number
              minimum: 0
              maximum: 1
            clickRate:
              type: number
              minimum: 0
              maximum: 1
            replyRate:
              type: number
              minimum: 0
              maximum: 1
            bounceRate:
              type: number
              minimum: 0
              maximum: 1
            unsubscribeRate:
              type: number
              minimum: 0
              maximum: 1
          required:
            - sent
            - delivered
            - opened
            - clicked
            - replied
            - bounced
            - unsubscribed
            - openRate
            - clickRate
            - replyRate
            - bounceRate
            - unsubscribeRate
          additionalProperties: false
        contactPipeline:
          type: object
          properties:
            attachedListContacts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            attachedListActive:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            attachedListInactive:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            importedContacts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyStarted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyNotStarted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyCompleted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            completedWithGoal:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyBounced:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyUnsubscribed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyInProgress:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - attachedListContacts
            - attachedListActive
            - attachedListInactive
            - importedContacts
            - journeyStarted
            - journeyNotStarted
            - journeyCompleted
            - completedWithGoal
            - journeyBounced
            - journeyUnsubscribed
            - journeyInProgress
          additionalProperties: false
        upcomingPipeline:
          type: object
          properties:
            next7Days:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                  firstTouch:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  followup:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  total:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - date
                  - firstTouch
                  - followup
                  - total
                additionalProperties: false
            pendingBacklog:
              type: object
              properties:
                pendingContacts:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                awaitingSchedule:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                draftJobsOpen:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                total:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - pendingContacts
                - awaitingSchedule
                - draftJobsOpen
                - total
              additionalProperties: false
          required:
            - next7Days
            - pendingBacklog
          additionalProperties: false
        outcomeProjection:
          type: object
          properties:
            asOf:
              type: string
            denominator:
              type: string
              const: campaignContacts
            delivered:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            safelyWaiting:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            exhausted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unexplained:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            safelyWaitingCohorts:
              type: array
              items:
                type: object
                properties:
                  count:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  reason:
                    type: string
                  scope:
                    type: string
                    enum:
                      - campaignContact
                      - campaignEmail
                  retryable:
                    type: boolean
                  nextAction:
                    type: string
                  nextReevaluation:
                    type: string
                required:
                  - count
                  - reason
                  - scope
                  - retryable
                additionalProperties: false
            exhaustedCohorts:
              type: array
              items:
                type: object
                properties:
                  count:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  reason:
                    type: string
                  scope:
                    type: string
                    enum:
                      - campaignContact
                      - campaignEmail
                  retryable:
                    type: boolean
                  nextAction:
                    type: string
                  nextReevaluation:
                    type: string
                required:
                  - count
                  - reason
                  - scope
                  - retryable
                additionalProperties: false
          required:
            - asOf
            - denominator
            - delivered
            - safelyWaiting
            - exhausted
            - unexplained
            - total
            - safelyWaitingCohorts
            - exhaustedCohorts
          additionalProperties: false
        funnel:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
                enum:
                  - sent
                  - delivered
                  - opened
                  - clicked
                  - replied
                  - goal
              count:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              pctOfSent:
                type: number
                minimum: 0
                maximum: 1
              dropoffPct:
                type: number
                minimum: 0
                maximum: 1
            required:
              - stage
              - count
              - pctOfSent
              - dropoffPct
            additionalProperties: false
        timeseries:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
              sent:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              delivered:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              opened:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              replied:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              goals:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - date
              - sent
              - delivered
              - opened
              - replied
              - goals
            additionalProperties: false
        perStep:
          type: array
          items:
            type: object
            properties:
              stepId:
                type: integer
                minimum: 1
                maximum: 9007199254740991
              stepName:
                type: string
              sent:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              opens:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              clicks:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              replies:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              goals:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              replyRate:
                type: number
                minimum: 0
                maximum: 1
              goalRate:
                type: number
                minimum: 0
                maximum: 1
              avgGoalRate:
                type: number
                minimum: 0
                maximum: 1
              variants:
                type: array
                items:
                  type: object
                  properties:
                    templateId:
                      type: string
                    sent:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    clicks:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    replies:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    goals:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    replyRate:
                      type: number
                      minimum: 0
                      maximum: 1
                    goalRate:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - templateId
                    - sent
                    - opens
                    - clicks
                    - replies
                    - goals
                    - replyRate
                    - goalRate
                  additionalProperties: false
              promotion:
                type: object
                properties:
                  winnerTemplateId:
                    type: string
                  decidingMetric:
                    type: string
                    enum:
                      - goal
                      - open
                  confidence:
                    type: number
                    minimum: 0
                    maximum: 1
                  promotedAt:
                    type: string
                required:
                  - winnerTemplateId
                  - decidingMetric
                  - confidence
                  - promotedAt
                additionalProperties: false
            required:
              - stepId
              - stepName
              - sent
              - opens
              - clicks
              - replies
              - goals
              - replyRate
              - goalRate
              - avgGoalRate
            additionalProperties: false
        perSender:
          type: array
          items:
            type: object
            properties:
              connectorId:
                type: string
              email:
                type: string
              sent:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              bounced:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              bounceRate:
                type: number
                minimum: 0
                maximum: 1
              globalWarmupScore:
                type: number
                minimum: 0
                maximum: 100
            required:
              - connectorId
              - email
              - sent
              - bounced
              - bounceRate
              - globalWarmupScore
            additionalProperties: false
        abTest:
          type: object
          properties:
            enabled:
              type: boolean
              const: true
            winner:
              anyOf:
                - type: string
                  enum:
                    - A
                    - B
                - type: 'null'
            confidence:
              anyOf:
                - type: number
                  minimum: 0
                  maximum: 1
                - type: 'null'
            lockedAt:
              anyOf:
                - type: string
                - type: 'null'
            groups:
              type: object
              properties:
                A:
                  type: object
                  properties:
                    sent:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    openRate:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - sent
                    - opens
                    - openRate
                  additionalProperties: false
                B:
                  type: object
                  properties:
                    sent:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    openRate:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - sent
                    - opens
                    - openRate
                  additionalProperties: false
              required:
                - A
                - B
              additionalProperties: false
          required:
            - enabled
            - winner
            - confidence
            - lockedAt
            - groups
          additionalProperties: false
      required:
        - campaignId
        - goal
        - startedAt
        - lastUpdatedAt
        - windowStart
        - windowEnd
        - totalContacts
        - goalKpis
        - engagementKpis
        - contactPipeline
        - upcomingPipeline
        - outcomeProjection
        - funnel
        - timeseries
        - perStep
        - perSender
      additionalProperties: false
    PublicErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Legacy compatibility bearer scheme for generated consumers.
    developerKeyBearer:
      type: http
      scheme: bearer
      description: FirstSales developer API key bearer token (fs-key-*).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.