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

# List clients

> Lists client account aggregates derived from conversations in the API key workspace.



## OpenAPI

````yaml /openapi.json get /api/v1/clients
openapi: 3.1.0
info:
  title: Woes REST API
  summary: >-
    Public REST API for Woes workspace conversations, issues, clients, agents,
    sources, definitions, usage, and analytics.
  description: >-
    Use workspace API keys to work with Woes support conversations, messages,
    issues, client account aggregates, public agent metadata, API context
    sources, workspace definitions, usage meters, and sanitized analytics from
    server-side integrations.
  version: '2026-06-29'
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://woes.dev
    description: Production
security:
  - workspaceApiKey: []
tags:
  - name: Conversations
    description: Create, read, update, and message support conversations.
  - name: Issues
    description: Create, read, and update support issues.
  - name: Clients
    description: Read client account aggregates derived from workspace conversations.
  - name: Agents
    description: Read named support agent metadata and public widget keys.
  - name: Sources
    description: Create, inspect, update, delete, and rescan API context sources.
  - name: Definitions
    description: Read workspace tags, statuses, priorities, and custom field definitions.
  - name: Usage
    description: Read current-month public API and live API check usage.
  - name: Analytics
    description: Read sanitized workspace analytics aggregates.
paths:
  /api/v1/clients:
    get:
      tags:
        - Clients
      summary: List clients
      description: >-
        Lists client account aggregates derived from conversations in the API
        key workspace.
      operationId: listClients
      parameters:
        - $ref: '#/components/parameters/ClientSearch'
        - $ref: '#/components/parameters/ClientHealth'
        - $ref: '#/components/parameters/ListLimit'
      responses:
        '200':
          description: Client list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientListResponse'
              examples:
                clients:
                  value:
                    object: list
                    hasMore: false
                    truncated: false
                    clients:
                      - object: client
                        id: example-api-co
                        name: Example API Co
                        health: watch
                        healthScore:
                          label: watch
                          score: 72
                          activity: 85
                          conversations: 66
                          resolutions: 70
                          reasons:
                            - 1/4 conversations still open.
                            - 75% resolution rate.
                        metrics:
                          conversations: 4
                          openConversations: 1
                          messages: 38
                          verifiedContacts: 2
                          visits: 6
                        channels:
                          - channel: live-chat
                            count: 3
                          - channel: email
                            count: 1
                        contacts:
                          - id: cus_123
                            name: Ada Lovelace
                            email: ada@example.com
                            identitySource: headers
                            lastMessageAt: '2026-06-29T13:00:00.000Z'
                            online: false
                            visits: 4
                        recentConversations:
                          - id: 6f6b6f9a-1b6a-4e42-9f71-1b9a3f3d2a33
                            channel: live-chat
                            subject: OAuth redirect URI mismatch
                            preview: Customer reports a redirect_uri mismatch.
                            status: open
                            lastMessageAt: '2026-06-29T13:00:00.000Z'
                        tasks:
                          - id: 6f6b6f9a-1b6a-4e42-9f71-1b9a3f3d2a33
                            subject: OAuth redirect URI mismatch
                            preview: Customer reports a redirect_uri mismatch.
                            status: open
                            priority: High
                            lastMessageAt: '2026-06-29T13:00:00.000Z'
                        firstContactAt: '2026-06-20T16:00:00.000Z'
                        lastMessageAt: '2026-06-29T13:00:00.000Z'
                        latestConversationId: 6f6b6f9a-1b6a-4e42-9f71-1b9a3f3d2a33
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    ClientSearch:
      name: search
      in: query
      required: false
      description: Search by client id, name, channel, or contact.
      schema:
        type: string
        minLength: 1
        maxLength: 160
      example: example
    ClientHealth:
      name: health
      in: query
      required: false
      description: Filter clients by computed health label.
      schema:
        $ref: '#/components/schemas/ClientHealth'
      example: watch
    ListLimit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: Number of records to return.
      example: 10
  schemas:
    ClientListResponse:
      type: object
      additionalProperties: false
      required:
        - object
        - hasMore
        - truncated
        - clients
      properties:
        object:
          type: string
          const: list
        hasMore:
          type: boolean
        truncated:
          type: boolean
        clients:
          type: array
          items:
            $ref: '#/components/schemas/Client'
    ClientHealth:
      type: string
      enum:
        - attention
        - healthy
        - watch
    Client:
      type: object
      additionalProperties: false
      required:
        - object
        - id
        - name
        - health
        - healthScore
        - metrics
        - channels
        - contacts
        - recentConversations
        - tasks
        - firstContactAt
        - lastMessageAt
        - latestConversationId
      properties:
        object:
          type: string
          const: client
        id:
          type: string
        name:
          type: string
        health:
          $ref: '#/components/schemas/ClientHealth'
        healthScore:
          $ref: '#/components/schemas/ClientHealthScore'
        metrics:
          $ref: '#/components/schemas/ClientMetrics'
        channels:
          type: array
          items:
            $ref: '#/components/schemas/ClientChannel'
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/ClientContact'
        recentConversations:
          type: array
          items:
            $ref: '#/components/schemas/ClientConversationSummary'
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/ClientTask'
        firstContactAt:
          type: string
          format: date-time
        lastMessageAt:
          type: string
          format: date-time
        latestConversationId:
          type: string
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - code
        - error
      properties:
        code:
          type: string
        error:
          type: string
    ClientHealthScore:
      type: object
      additionalProperties: false
      required:
        - label
        - score
        - activity
        - conversations
        - resolutions
        - reasons
      properties:
        label:
          $ref: '#/components/schemas/ClientHealth'
        score:
          type: integer
          minimum: 0
          maximum: 100
        activity:
          type: integer
          minimum: 0
          maximum: 100
        conversations:
          type: integer
          minimum: 0
          maximum: 100
        resolutions:
          type: integer
          minimum: 0
          maximum: 100
        reasons:
          type: array
          items:
            type: string
    ClientMetrics:
      type: object
      additionalProperties: false
      required:
        - conversations
        - openConversations
        - messages
        - verifiedContacts
        - visits
      properties:
        conversations:
          type: integer
          minimum: 0
        openConversations:
          type: integer
          minimum: 0
        messages:
          type: integer
          minimum: 0
        verifiedContacts:
          type: integer
          minimum: 0
        visits:
          type: integer
          minimum: 0
    ClientChannel:
      type: object
      additionalProperties: false
      required:
        - channel
        - count
      properties:
        channel:
          type: string
        count:
          type: integer
          minimum: 0
    ClientContact:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - email
        - identitySource
        - lastMessageAt
        - online
        - visits
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type:
            - string
            - 'null'
          format: email
        identitySource:
          type: string
        lastMessageAt:
          type: string
          format: date-time
        online:
          type: boolean
        visits:
          type: integer
          minimum: 0
    ClientConversationSummary:
      type: object
      additionalProperties: false
      required:
        - id
        - channel
        - subject
        - preview
        - status
        - lastMessageAt
      properties:
        id:
          type: string
        channel:
          type: string
        subject:
          type: string
        preview:
          type: string
        status:
          $ref: '#/components/schemas/ConversationStatus'
        lastMessageAt:
          type: string
          format: date-time
    ClientTask:
      type: object
      additionalProperties: false
      required:
        - id
        - subject
        - preview
        - status
        - priority
        - lastMessageAt
      properties:
        id:
          type: string
        subject:
          type: string
        preview:
          type: string
        status:
          $ref: '#/components/schemas/ConversationStatus'
        priority:
          type: string
        lastMessageAt:
          type: string
          format: date-time
    ConversationStatus:
      type: string
      enum:
        - open
        - waiting
        - solved
  responses:
    InvalidRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidRequest:
              value:
                code: invalid_request
                error: Request body is invalid.
    Unauthorized:
      description: Missing, unknown, revoked, or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              value:
                code: unauthorized
                error: A valid workspace API key is required.
    InsufficientScope:
      description: API key does not include the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientScope:
              value:
                code: insufficient_scope
                error: This API key is missing the required scope.
    RateLimited:
      description: Too many API requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                code: rate_limited
                error: Too many API requests. Slow down and try again shortly.
    InternalError:
      description: Unexpected API failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              value:
                code: internal_error
                error: The API request could not be completed.
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key that starts with woesk_. Paste your own key into the
        docs playground; never expose it in browser code.
      x-default: woesk_your_api_key_here

````