> ## 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.

# Save step sample data

> Save custom sample data for a step or trigger. This is useful for triggers that use SIMULATION strategy (like functionCall) where you can't auto-generate test data — instead, provide it manually. The saved data will be used as mock input when testing downstream steps.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workflow/{flow_id}/steps/{step_name}/sample-data
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}/steps/{step_name}/sample-data:
    post:
      tags:
        - Workflows - Testing
      summary: Save step sample data
      description: >-
        Save custom sample data for a step or trigger. This is useful for
        triggers that use SIMULATION strategy (like functionCall) where you
        can't auto-generate test data — instead, provide it manually. The saved
        data will be used as mock input when testing downstream steps.
      operationId: >-
        save_step_sample_data_v1_workflow__flow_id__steps__step_name__sample_data_post
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
            title: Flow Id
        - name: step_name
          in: path
          required: true
          schema:
            type: string
            title: Step Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveSampleDataRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowAllResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    SaveSampleDataRequest:
      properties:
        payload:
          title: Payload
          description: The sample data to save (JSON object or value)
        type:
          type: string
          title: Type
          description: 'Data type: INPUT or OUTPUT'
          default: OUTPUT
        dataType:
          type: string
          title: Datatype
          description: 'Format: JSON or STRING'
          default: JSON
      type: object
      required:
        - payload
      title: SaveSampleDataRequest
      description: Request to save custom sample data for a step.
    FlowAllResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        created:
          type: string
          format: date-time
          title: Created
        updated:
          type: string
          format: date-time
          title: Updated
        status:
          anyOf:
            - $ref: '#/components/schemas/FlowStatus'
            - type: 'null'
        flow_category:
          anyOf:
            - $ref: '#/components/schemas/FlowCategory'
            - type: 'null'
        trigger:
          anyOf:
            - $ref: '#/components/schemas/TriggerResponse'
            - type: 'null'
        produced_variables:
          items:
            type: string
          type: array
          title: Produced Variables
        consumed_variables:
          items:
            type: string
          type: array
          title: Consumed Variables
      type: object
      required:
        - id
        - created
        - updated
      title: FlowAllResponse
      description: Flow response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FlowStatus:
      type: string
      enum:
        - ENABLED
        - DISABLED
      title: FlowStatus
    FlowCategory:
      type: string
      enum:
        - post_call
        - during_call
        - pre_call
        - call_launcher
        - empty
      title: FlowCategory
    TriggerResponse:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        valid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Valid
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        settings:
          anyOf:
            - $ref: '#/components/schemas/TriggerSettingsResponse'
            - type: 'null'
        nextAction:
          anyOf:
            - $ref: '#/components/schemas/StepResponse'
            - type: 'null'
      type: object
      title: TriggerResponse
      description: Trigger definition.
    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
    TriggerSettingsResponse:
      properties:
        pieceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Piecename
        pieceVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Pieceversion
        triggerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Triggername
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
        propertySettings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Propertysettings
        sampleData:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Sampledata
      type: object
      title: TriggerSettingsResponse
      description: Trigger settings.
    StepResponse:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        valid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Valid
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        skip:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Skip
        settings:
          anyOf:
            - $ref: '#/components/schemas/StepSettingsResponse'
            - type: 'null'
        children:
          anyOf:
            - items:
                $ref: '#/components/schemas/StepResponse'
              type: array
            - type: 'null'
          title: Children
        nextAction:
          anyOf:
            - $ref: '#/components/schemas/StepResponse'
            - type: 'null'
      type: object
      title: StepResponse
      description: Step/action (recursive).
    StepSettingsResponse:
      properties:
        pieceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Piecename
        pieceVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Pieceversion
        actionName:
          anyOf:
            - type: string
            - type: 'null'
          title: Actionname
        triggerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Triggername
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
        propertySettings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Propertysettings
        sampleData:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Sampledata
        branches:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Branches
        executionType:
          anyOf:
            - type: string
            - type: 'null'
          title: Executiontype
      type: object
      title: StepSettingsResponse
      description: Step/action settings.
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````