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

# Search Time Logs

> Search for **StopWatch Time Log** records using HubSpot's flexible **CRM Search** engine.
<Note>
  See [HubSpot API documentation](https://developers.hubspot.com/docs/api-reference/latest/crm/search-the-crm) for the expected request **Body** structure
</Note>




## OpenAPI

````yaml /apis/stopwatch-openapi.yaml post /stopwatch/v1/timelogs/search
openapi: 3.0.3
info:
  title: StopWatch API
  description: >
    An authentication wrapper for read-only access to HubSpot App Object APIs. 

    This API allows programmatic access to StopWatch Time Log records,
    bypassing 

    standard HubSpot scope restrictions for App Objects.
  version: 1.0.0
servers:
  - url: https://api.threadi.au
    description: Production server
security:
  - bearerAuth: []
paths:
  /stopwatch/v1/timelogs/search:
    post:
      summary: Search Time Logs
      description: >
        Search for **StopWatch Time Log** records using HubSpot's flexible **CRM
        Search** engine.

        <Note>
          See [HubSpot API documentation](https://developers.hubspot.com/docs/api-reference/latest/crm/search-the-crm) for the expected request **Body** structure
        </Note>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequestBody'
      responses:
        '200':
          description: A page of StopWatch Time Log records matching the search criteria.
          content:
            application/json:
              schema:
                type: object
                properties:
                  paging:
                    type: object
                    properties:
                      next:
                        type: object
                        properties:
                          after:
                            type: string
                            example: 100
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Timelog'
                  total:
                    type: integer
                    example: 123
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailableError'
components:
  schemas:
    SearchRequestBody:
      type: object
      properties:
        limit:
          type: integer
          example: 100
          description: The maximum number of records to return. Maximum is 200.
        after:
          type: string
          example: 100
          description: >-
            The paging cursor for fetching the next page of results. Supplied in
            the response as `paging.next.after`.
        properties:
          type: array
          items:
            type: string
          description: >-
            The **StopWatch Time Log** properties that you'd like included in
            the response
          example:
            - a552213_record_id
            - hubspot_owner_id
            - a552213_category_text
        query:
          type: string
          example: Meeting about Project XYZ
          description: >-
            A free text search query to apply to the search. See [HubSpot API
            documentation](https://developers.hubspot.com/docs/api-reference/latest/crm/search-the-crm)
            for more details on how this is applied.
        sorts:
          type: array
          items:
            type: object
            properties:
              propertyName:
                type: string
                example: hs_lastmodifieddate
                description: >-
                  The property name to sort on. Must be a valid **StopWatch Time
                  Log** property.
              direction:
                type: string
                example: DESCENDING
                enum:
                  - ASCENDING
                  - DESCENDING
                description: The direction to sort results in.
        filterGroups:
          type: array
          items:
            $ref: '#/components/schemas/FilterGroup'
      example:
        limit: 100
        after: 100
        properties:
          - a552213_record_id
          - hubspot_owner_id
          - a552213_category_text
        sorts:
          - propertyName: hs_lastmodifieddate
            direction: DESCENDING
        filterGroups:
          - filters:
              - propertyName: a552213_category_text
                operator: CONTAINS_TOKEN
                value: Meetings
    Timelog:
      type: object
      properties:
        id:
          type: string
          example: 1234567890
        properties:
          type: object
          properties:
            a552213_record_id:
              type: string
              example: 28270412 -- 2026-03-20 04:22:15.536
            a552213_assoc_obj_type:
              type: string
              enum:
                - contact
                - company
                - deal
                - ticket
                - appointment
                - course
                - listing
                - service
                - project
                - other
            a552213_toggle:
              type: boolean
            a552213_assoc_record_id:
              type: string
              example: 9876543210
            a552213_first_start_date:
              type: string
              format: date-time
              example: '2026-02-27T21:24:18.038Z'
            a552213_first_end_date:
              type: string
              format: date-time
              example: '2026-02-28T21:24:18.038Z'
            a552213_last_start_date:
              type: string
              format: date-time
              example: '2026-02-27T21:24:18.038Z'
            a552213_last_end_date:
              type: string
              format: date-time
              example: '2026-02-28T21:24:18.038Z'
            a552213_total_minutes:
              type: number
              example: 1440
            a552213_total_hours:
              type: number
              example: 24
            a552213_total_days:
              type: number
              example: 1
            a552213_total_years:
              type: number
              example: 0.00273785
            a552213_total_decades:
              type: number
              example: 0.00027379
            a552213_total_centuries:
              type: number
              example: 0.00002738
            a552213_num_sessions:
              type: number
              example: 1
            a552213_week_year:
              type: string
              format: date
              example: '2026-02-23T00:00:00.000Z'
            a552213_month_year:
              type: string
              format: date
              example: '2026-02-01T00:00:00.000Z'
            a552213_is_split_week_record:
              type: boolean
            a552213_is_split_month_record:
              type: boolean
            a552213_workflow_managed_tag:
              type: string
              example: example_tag
            a552213_billable_minutes:
              type: number
              example: 0
            a552213_billable_hours:
              type: number
              example: 0
            a552213_billable_days:
              type: number
              example: 0
            a552213_billable_years:
              type: number
              example: 0
            a552213_billable_decades:
              type: number
              example: 0
            a552213_billable_centuries:
              type: number
              example: 0
            a552213_billable_amount:
              type: number
              example: 0
            a552213_cost_amount:
              type: number
              example: 0
            a552213_margin_amount:
              type: number
              example: 0
            a552213_is_one_time_log_per_session_record:
              type: boolean
            a552213_category_text:
              type: string
              example: Meetings
            a552213_description:
              type: string
              example: Meeting about Project XYZ
            a552213_billable_percentage:
              type: number
              example: 0
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
          example: '2026-02-27T21:24:18.038Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-02-28T21:24:18.038Z'
        archived:
          type: boolean
    Error400:
      type: object
      properties:
        error:
          type: string
          example: HubSpot API Error
        details:
          type: string
          example: <hubspot error as string>
    FilterGroup:
      type: object
      required:
        - filters
      properties:
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
    Error401:
      type: object
      properties:
        error:
          type: string
          example: Invalid API key
    Error403:
      type: object
      properties:
        error:
          type: string
          example: API key has been deactivated
    Error429:
      type: object
      properties:
        error:
          type: string
          example: Daily quota exceeded
        details:
          type: string
          example: >-
            This API key has reached its UTC daily request limit. Use response
            header x-stopwatch-ratelimit-reset to know when this quota will
            reset.
    Error500:
      type: object
      properties:
        error:
          type: string
          example: Internal Server Error
        details:
          type: string
          example: An unexpected error occurred.
    Error503:
      type: object
      properties:
        error:
          type: string
          example: Service temporarily busy
        details:
          type: string
          example: Unable to process request right now. Please retry shortly.
    Filter:
      type: object
      required:
        - propertyName
        - operator
      properties:
        propertyName:
          type: string
          example: a552213_record_id
          description: >-
            The property name to filter on. Must be a valid **StopWatch Time
            Log** property.
        operator:
          type: string
          example: EQ
          enum:
            - LT
            - LTE
            - GT
            - GTE
            - EQ
            - NEQ
            - BETWEEN
            - IN
            - NOT_IN
            - HAS_PROPERTY
            - NOT_HAS_PROPERTY
            - CONTAINS_TOKEN
            - NOT_CONTAINS_TOKEN
          description: >-
            The operator to use for filtering. See [HubSpot API
            documentation](https://developers.hubspot.com/docs/api-reference/latest/crm/search-the-crm)
            for available operators.
        value:
          type: string
          example: '1234567890'
          description: The value to filter on.
        highValue:
          type: string
          example: '1234567899'
          description: >-
            The upper bound value to filter on. Only used with the `BETWEEN`
            operator.
        values:
          type: array
          items:
            type: string
          example:
            - '1234567890'
            - '0987654321'
          description: The values to filter on. Only used for `IN` and `NOT_IN` operators.
  responses:
    UnauthorizedError:
      description: API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error401'
    ForbiddenError:
      description: API key has been deactivated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error403'
    TooManyRequestsError:
      description: UTC daily API quota exceeded for this API key.
      headers:
        x-stopwatch-ratelimit-reset:
          description: UTC timestamp indicating when the daily quota resets.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error429'
    InternalServerError:
      description: An unexpected error occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error500'
    ServiceUnavailableError:
      description: Service is temporarily busy.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error503'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Bearer Authorization header of the form Bearer {token}, where {token} is
        your API key.

        By default, each API key is **rate-limited to 1,000 requests per day**
        (UTC). If you need a higher daily limit, please submit a [support
        request](https://www.threadi.au/support?app_name=stopwatch).

````