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

# Search Workflows

> Search for workflows using sort, filter and pagination.



## OpenAPI

````yaml POST /workflow/search
openapi: 3.0.1
info:
  title: Machina Sports SDK
  description: >-
    Machina Sports API for seamless AI integration in sports, offering real-time
    insights, personalized content, and fan sentiment analysis.
  version: '1.0'
  termsOfService: http://machina.gg/tos/
  contact:
    email: support@machina.gg
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{api-address}.org.machina.gg
    description: Production server
    variables:
      api-address:
        default: https://api.machina.gg
        description: Your api-address
  - url: http://local.machina:5001
    description: Local development server
security:
  - ApiToken: []
paths:
  /workflow/search:
    post:
      tags:
        - workflows
      summary: Search Workflows
      description: Search for workflows using sort, filter and pagination.
      operationId: searchWorkflows
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filters:
                  type: object
                  description: Query filters object
                  default: {}
                sorters:
                  type: array
                  description: Array containing field name and sort direction
                  items:
                    type: string
                  default:
                    - name
                    - 1
                  example:
                    - name
                    - 1
                page:
                  type: integer
                  description: Page number (starts from 1)
                  default: 1
                page_size:
                  type: integer
                  description: Number of items per page
                  default: 10
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: Unique identifier of the workflow
                        name:
                          type: string
                          description: Unique name of the workflow
                        title:
                          type: string
                          description: Display title of the workflow
                        description:
                          type: string
                          description: Description of the workflow's purpose
                        status:
                          type: string
                          enum:
                            - active
                            - inactive
                          description: Current status of the workflow
                        created:
                          type: string
                          description: Creation timestamp
                    description: Array of matching workflows
                  total_documents:
                    type: integer
                    description: Total number of matching workflows
                  status:
                    type: boolean
                    description: Operation status
                example:
                  data:
                    - _id: 67db52c32ae92018b93310a1
                      created: Wed, 20 Mar 2025 14:30:00 GMT
                      name: thread
                      value:
                        messages:
                          - test
                      metadata:
                        agent_id: '123'
                      status: active
                      date: Wed, 20 Mar 2025 14:30:00 GMT
                  total_documents: 15
                  status: true
        '400':
          description: Bad request
        '401':
          description: Unauthorized
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      name: x-api-token
      in: header
      description: API key authentication

````