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

# Test the trigger

> Execute the flow's trigger in test mode to generate sample events. The trigger must be configured (not EMPTY). Returns a list of sample events that the trigger produces.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workflow/{flow_id}/trigger/test
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/workflow/{flow_id}/trigger/test:
    post:
      tags:
        - Workflows - Testing
      summary: Test the trigger
      description: >-
        Execute the flow's trigger in test mode to generate sample events. The
        trigger must be configured (not EMPTY). Returns a list of sample events
        that the trigger produces.
      operationId: test_trigger_v1_workflow__flow_id__trigger_test_post
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            title: Flow Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerTestResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    TriggerTestResponse:
      properties:
        events:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Events
      type: object
      title: TriggerTestResponse
      description: Result of testing a trigger.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````