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

# Count contacts in a workspace

> Returns the total number of contacts in a workspace.



## OpenAPI

````yaml /openapi.json get /api/contacts.count
openapi: 3.0.3
info:
  title: Notifuse API
  description: API for Notifuse - a transactional email and newsletter management platform
  version: 1.0.0
  contact:
    name: Notifuse Support
    url: https://www.notifuse.com/support
    email: hello@notifuse.com
servers:
  - url: https://{notifuseDomain}
    description: Customer-specific Notifuse API server
    variables:
      notifuseDomain:
        description: Your unique Notifuse domain
        default: demo.notifuse.com
security: []
paths:
  /api/contacts.count:
    get:
      summary: Count contacts in a workspace
      description: Returns the total number of contacts in a workspace.
      operationId: countContacts
      parameters:
        - name: workspace_id
          in: query
          required: true
          schema:
            type: string
          description: The ID of the workspace
          example: ws_1234567890
      responses:
        '200':
          description: Contact count retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountContactsResponse'
        '400':
          description: Bad request - missing workspace ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Missing workspace ID
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    CountContactsResponse:
      type: object
      properties:
        total_contacts:
          type: integer
          description: Total number of contacts in the workspace
          example: 1523
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````