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

# Count contacts

> Count active contacts associated with the workspace using the same filters and aliases as contact listing. Exact counts can be expensive; request a count only when a total is needed. Pagination parameters (limit, offset, pagination, cursor) are ignored; the total always covers all matching contacts.



## OpenAPI

````yaml https://api.salesforge.ai/public/v2/swagger/doc.json get /workspaces/{workspaceID}/contacts/count
openapi: 3.1.0
info:
  description: Get mailboxes associated with the workspace.
  termsOfService: https://www.salesforge.ai/terms
  title: Salesforge API
  version: '2.0'
servers:
  - url: https://api.salesforge.ai/public/v2
security:
  - ApiKeyAuth: []
externalDocs:
  description: ''
  url: ''
paths:
  /workspaces/{workspaceID}/contacts/count:
    get:
      tags:
        - contacts
      summary: Count contacts
      description: >-
        Count active contacts associated with the workspace using the same
        filters and aliases as contact listing. Exact counts can be expensive;
        request a count only when a total is needed. Pagination parameters
        (limit, offset, pagination, cursor) are ignored; the total always covers
        all matching contacts.
      parameters:
        - description: Workspace ID
          in: path
          name: workspaceID
          required: true
          schema:
            type: string
        - description: Filter by tag ids
          in: query
          name: tag_ids[]
          schema:
            items:
              type: string
            type: array
          style: form
        - description: Alias for tag_ids[]
          in: query
          name: tagIds
          schema:
            items:
              type: string
            type: array
          style: form
        - description: Filter by contacts not in sequence
          in: query
          name: not_in_sequence_id
          schema:
            type: string
        - description: Alias for not_in_sequence_id
          in: query
          name: notInSequenceId
          schema:
            type: string
        - description: Filter by validation statuses
          in: query
          name: validation_statuses[]
          schema:
            items:
              enum:
                - safe
                - valid
                - invalid
                - disabled
                - disposable
                - inbox_full
                - catch_all
                - role_account
                - spamtrap
                - unknown
                - unvalidated
              type: string
            type: array
          style: form
        - description: Alias for validation_statuses[]
          in: query
          name: validationStatus
          schema:
            items:
              enum:
                - safe
                - valid
                - invalid
                - disabled
                - disposable
                - inbox_full
                - catch_all
                - role_account
                - spamtrap
                - unknown
                - unvalidated
              type: string
            type: array
          style: form
        - description: Filter by valid LinkedIn profile URL
          in: query
          name: has_valid_linkedin
          schema:
            type: boolean
        - description: Exclude contacts whose email domain belongs to these ESPs
          in: query
          name: not_in_esps[]
          schema:
            items:
              type: string
            type: array
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.ContactsCountResponse'
          description: Exact matching contact count
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.Error'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.Error'
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    api.ContactsCountResponse:
      properties:
        total:
          type: integer
      required:
        - total
      type: object
    errors.Error:
      allOf:
        - $ref: '#/components/schemas/data'
      properties:
        data: {}
        message:
          type: string
      type: object
    data:
      properties:
        data:
          items:
            $ref: '#/components/schemas/api.DNCResponse'
          type: array
      type: object
    api.DNCResponse:
      properties:
        createdAt:
          type: string
        type:
          $ref: '#/components/schemas/models.DncType'
        value:
          type: string
      type: object
    models.DncType:
      enum:
        - email
        - domain
        - linkedin
      type: string
      x-enum-varnames:
        - DncTypeEmail
        - DncTypeDomain
        - DncTypeLinkedin
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey

````