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

> Retrieves performance statistics for a specific campaign.

# Get Campaign Stats

<Warning>
  Careful, the route starts with `/v2/`. Make sure to include the version in the path.
</Warning>


## OpenAPI

````yaml get /v2/campaigns/{campaignId}/stats
openapi: 3.0.0
info:
  title: lemlist API
  version: 1.0.0
  description: >-
    Welcome to the lemlist Developer Documentation.


    lemlist is very customizable and open. You'll find on this page all the API
    and integration you can do with lemlist.


    # Rate Limit


    lemlist's API rate limits requests in order to prevent abuse and overload of
    our services.  

    Rate limits are applied on all routes and per API key performing the
    request.  

    The rate limits are **20** requests per **2** seconds.  

    The response provides any information you may need about it:


    | Header | Description |

    | --- | --- |

    | Retry-After | The number of seconds in which you can retry |

    | X-RateLimit-Limit | The maximum requests in that time |

    | X-RateLimit-Remaining | The number of remaining requests you can make |

    | X-RateLimit-Reset | The date when the rate limit will reset |


    _Example of values for the rate limit headers_


    ``` json

    {
        "Retry-After": 2,
        "X-RateLimit-Limit": 20,
        "X-RateLimit-Remaining": 7,
        "X-RateLimit-Reset" : "Tue Feb 16 2021 09:02:42 GMT+0100 (Central European Standard Time)"
    }

     ```

    # Definitions


    ## Team


    A team is the entity of lemlist that can handle users and billing.


    ## Credits


    Credits are the coins a team uses to enrich emails, LinkedIn URLs, etc. via
    the enrich route. Each enrichment feature needs a certain amount of credits
    to run.


    ## User


    You use a user account to connect to lemlist and send messages via the
    connected emails or LinkedIn account.


    ## Campaign


    A campaign is the entity to automate outreach. A campaign has multiple
    sequences composed of steps.


    ## Lead


    A lead is a person that you try to contact via a campaign.


    ## Activity


    An activity is the history of all the steps.


    ## Unsubscribe


    An unsubscribe occurs when a person decides they don't want to receive
    emails from you anymore.


    # Authentication


    All API routes use the dedicated subdomain `api.lemlist.com`.


    lemlist uses API keys to allow access to the API. You can get your lemlist
    API key at our [integration
    page](https://app.lemlist.com/settings/integrations).


    You need to add the `Authorization` header using the `Basic` authentication
    type. `login:password` **where the login is always empty and the password is
    the API key**.


    ⚠️ **Don't forget to add the semicolon (**`:`**) before your API key in curl
    command.**


    > To authorize, use this code: 
      

    ``` shell

    curl https://api.lemlist.com/api/team \
      --user ":YourApiKey"

     ```

    **Make sure to replace** **`YourApiKey`** **with your API key.**


    # Give feedback


    If you want to report a bug, ask for data, or share with us a use case,
    please fill this [form](https://lemlist.typeform.com/to/mfVlkyGf). It will
    help us centralize your needs!
servers:
  - url: https://api.lemlist.com/api
security:
  - basicAuth: []
paths:
  /v2/campaigns/{campaignId}/stats:
    get:
      tags:
        - Campaigns
      summary: Get Campaign Stats
      description: >-
        Retrieve detailed statistics for a specific campaign, with filtering
        options by date, user, A/B testing, and communication channels.
      parameters:
        - name: campaignId
          in: path
          required: true
          description: Unique campaign ID
          example: cam_123
          schema:
            type: string
        - name: startDate
          in: query
          required: true
          description: Start date in ISO 8601 format
          example: '2024-01-07T22:00:00.000Z'
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          required: true
          description: End date in ISO 8601 format
          example: '2025-07-10T21:59:59.999Z'
          schema:
            type: string
            format: date-time
        - name: sendUser
          in: query
          required: false
          description: >-
            Filter stats by send user. Format: `sendUserId|sendUserEmail`. The
            sendUserId should begin with 'usr_' and the sendUserEmail should be
            a valid sender email. If the param is specified, both sendUserId and
            sendUserEmail are mandatory.
          example: usr_OcIHizJyIeaDxicQP|email@example.com
          schema:
            type: string
        - name: ABSelected
          in: query
          required: false
          description: A/B version filter
          example: A
          schema:
            type: string
            enum:
              - A
              - B
        - name: channels
          in: query
          required: false
          description: >-
            JSON array of channels to include. Possible values: 'email',
            'linkedin', 'others'
          example: '["others", "linkedin", "email"]'
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  nbLeads:
                    type: integer
                    description: Total number of leads in the campaign
                  nbLeadsLaunched:
                    type: integer
                    description: Number of leads launched in the campaign
                  nbLeadsReached:
                    type: integer
                    description: Number of leads that were successfully reached
                  nbLeadsOpened:
                    type: integer
                    description: Number of leads that opened messages
                  nbLeadsInteracted:
                    type: integer
                    description: >-
                      Number of leads that interacted with messages (clicked,
                      replied)
                  nbLeadsAnswered:
                    type: integer
                    description: Number of leads that answered
                  nbLeadsInterested:
                    type: integer
                    description: Number of leads marked as interested
                  nbLeadsNotInterested:
                    type: integer
                    description: Number of leads marked as not interested
                  nbLeadsUnsubscribed:
                    type: integer
                    description: Number of leads that unsubscribed
                  nbLeadsInterrupted:
                    type: integer
                    description: Number of leads with interrupted sequences
                  messagesSent:
                    type: integer
                    description: Total number of messages sent
                  messagesNotSent:
                    type: integer
                    description: Number of messages that failed to send
                  messagesBounced:
                    type: integer
                    description: Number of messages that bounced
                  delivered:
                    type: integer
                    description: Number of messages successfully delivered
                  opened:
                    type: integer
                    description: Number of messages opened
                  clicked:
                    type: integer
                    description: Number of messages with clicks
                  replied:
                    type: integer
                    description: Number of messages that received replies
                  invitationAccepted:
                    type: integer
                    description: Number of LinkedIn invitations accepted
                  meetingBooked:
                    type: integer
                    description: Number of meetings booked
                  steps:
                    type: array
                    description: Detailed metrics for each step in the campaign
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          description: Step index in the sequence
                        sequenceId:
                          type: string
                          description: ID of the sequence
                        sequenceStep:
                          type: integer
                          description: Step number within the sequence
                        abTest:
                          type: string
                          description: A/B test variant (if applicable)
                        taskType:
                          type: string
                          description: Type of task
                          enum:
                            - email
                            - linkedinVisit
                            - linkedinInvite
                            - linkedinSend
                            - phone
                            - manual
                            - conditional
                        conditionLabel:
                          type: string
                          description: Label for conditional steps
                        invited:
                          type: integer
                          description: Number of LinkedIn invitations sent
                        sent:
                          type: integer
                          description: Number of messages sent
                        delivered:
                          type: integer
                          description: Number of messages delivered
                        opened:
                          type: integer
                          description: Number of messages opened
                        clicked:
                          type: integer
                          description: Number of clicks from a message from this step
                        replied:
                          type: integer
                          description: Number of replies
                        notDelivered:
                          type: integer
                          description: Number of messages not delivered
                        bounced:
                          type: integer
                          description: Number of messages bounced
                        unsubscribed:
                          type: integer
                          description: Number of unsubscribes from this step
              example:
                nbLeads: 32
                nbLeadsLaunched: 32
                nbLeadsReached: 32
                nbLeadsOpened: 31
                nbLeadsInteracted: 4
                nbLeadsAnswered: 16
                nbLeadsInterested: 1
                nbLeadsNotInterested: 0
                nbLeadsUnsubscribed: 1
                nbLeadsInterrupted: 1
                messagesSent: 72
                messagesNotSent: 0
                messagesBounced: 0
                delivered: 72
                opened: 47
                clicked: 4
                replied: 16
                invitationAccepted: 0
                meetingBooked: 0
                steps:
                  - index: 1
                    sequenceId: seq_rH5RD3fMkkt2gM3YC
                    sequenceStep: 0
                    taskType: linkedinSend
                    invited: 0
                    sent: 32
                    delivered: 32
                    opened: 15
                    clicked: 0
                    replied: 15
                    notDelivered: 0
                    bounced: 0
                    unsubscribed: 1
                  - index: 2
                    sequenceId: seq_rH5RD3fMkkt2gM3YC
                    sequenceStep: 1
                    invited: 0
                    sent: 20
                    delivered: 20
                    opened: 17
                    clicked: 1
                    replied: 1
                    notDelivered: 0
                    bounced: 0
                    unsubscribed: 0
                  - index: 3
                    sequenceId: seq_rH5RD3fMkkt2gM3YC
                    sequenceStep: 2
                    invited: 0
                    sent: 20
                    delivered: 20
                    opened: 15
                    clicked: 3
                    replied: 0
                    notDelivered: 0
                    bounced: 0
                    unsubscribed: 0
        '400':
          description: Bad request - Invalid parameters
          content:
            text/plain:
              examples:
                badTeam:
                  summary: Bad team
                  value: Bad team
                missingDates:
                  summary: Missing dates
                  value: 'Bad params: startDate and endDate are required'
                invalidChannels:
                  summary: Invalid channels format
                  value: 'Bad params: channels must be a valid array'
                invalidChannelValues:
                  summary: Invalid channel values
                  value: >-
                    Bad params: channels must be empty or contain "others",
                    "email" or "linkedin"
                invalidAB:
                  summary: Invalid A/B selection
                  value: 'Bad params: ABSelected must be A or B'
                invalidSendUserFormat:
                  summary: Invalid send user format
                  value: >-
                    Bad param format: sendUser must be formatted as follow:
                    <sendUserId>|<sendUserEmail>
                invalidSendUser:
                  summary: Send user email mismatch
                  value: >-
                    Bad params: the send user email is not related to the send
                    user id
        '401':
          description: Unauthorized
        '404':
          description: Campaign not found
          content:
            text/plain:
              example: Campaign not found
        '405':
          description: Method not allowed
          content:
            text/plain:
              example: Bad method
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````