# Get lead counts by status

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /lead/count/lead-status:
    get:
      summary: Get lead counts by status
      deprecated: false
      description: >-
        Retrieve the number of leads for each status in a workspace. Optionally
        filter by campaign.
      tags:
        - Lead
      parameters:
        - name: workspace_id
          in: query
          description: workspace identifier
          required: true
          schema:
            type: string
            examples:
              - 65f3c92d3dbe5dbb35374a9a
        - name: campaign_id
          in: query
          description: Optional campaign id to filter lead counts.
          required: false
          schema:
            type: string
            examples:
              - 60f3d92d3dbe5dbb35374b8c
        - name: x-api-key
          in: header
          description: Your PlusVibe.ai account's API Key
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: Successful response with lead status counts.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    status:
                      type: string
                      description: Lead status category.
                      examples:
                        - NOT_CONTACTED
                    count:
                      type: integer
                      description: Number of leads in this status.
                      examples:
                        - 22001
                  x-apidog-orders:
                    - status
                    - count
              example:
                - status: NOT_CONTACTED
                  count: 22001
                - status: CONTACTED
                  count: 41
                - status: COMPLETED
                  count: 19
                - status: REPLIED
                  count: 5
                - status: RESCHEDULED
                  count: 0
                - status: UNSUBSCRIBED
                  count: 0
                - status: BOUNCED
                  count: 0
                - status: SKIPPED
                  count: 2
          headers: {}
          x-apidog-name: OK
        '400':
          description: Bad request if required parameters are missing or invalid.
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: Internal server error.
          headers: {}
          x-apidog-name: Server Error
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Lead
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-21402115-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
