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

# Preview a lead follow-up automation

> Previews automation execution for a sample lead, showing matched steps and messages without creating follow-up events.



## OpenAPI

````yaml /openapi.json post /automations/preview
openapi: 3.0.4
info:
  title: Leadping API
  description: >-
    Leadping API for lead intake, messaging, calling, automations, billing,
    business settings, and compliant lead communication workflows.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
  - url: https://api.leadping.ai
    description: Production
security: []
tags:
  - name: Analytics
  - name: Automations
  - name: Contact
  - name: Conversations
  - name: Dispositions
  - name: Feedback
  - name: Leads
  - name: LeadStatuses
  - name: Notifications
  - name: OutboundDelivery
  - name: Sources
  - name: Suppressions
  - name: Tags
  - name: Users
  - name: Calls
  - name: PhoneNumbers
  - name: Sms
  - name: Telephony
  - name: UserDataExports
  - name: CallEvents
  - name: Events
  - name: SmsEvents
  - name: Businesses
  - name: PaymentMethods
  - name: Transactions
  - name: Usage
  - name: Wallets
paths:
  /automations/preview:
    post:
      tags:
        - Automations
      summary: Preview a lead follow-up automation
      description: >-
        Previews automation execution for a sample lead, showing matched steps
        and messages without creating follow-up events.
      operationId: Automations_Preview
      requestBody:
        description: The automation preview request payload for the operation.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AutomationPreviewRequest'
              description: >-
                Request schema for the Leadping API automation preview request,
                including the fields clients can send.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AutomationPreviewRequest'
              description: >-
                Request schema for the Leadping API automation preview request,
                including the fields clients can send.
        required: true
      responses:
        '200':
          description: Returns the automation preview response.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/AutomationPreviewResponse'
                description: >-
                  Response schema for the Leadping API automation preview
                  response returned to authenticated clients.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    AutomationPreviewRequest:
      type: object
      properties:
        automation:
          allOf:
            - $ref: '#/components/schemas/AutomationRequestSnapshot'
          description: Automation configuration to evaluate without executing live actions.
        triggerType:
          type: string
          description: Automation trigger type that starts the workflow.
          nullable: true
      description: >-
        Request schema for the Leadping API automation preview request,
        including the fields clients can send.
    AutomationPreviewResponse:
      type: object
      properties:
        triggerType:
          type: string
          description: Automation trigger type that starts the workflow.
          nullable: true
        samplePayload:
          type: object
          additionalProperties:
            type: string
          description: >-
            Example payload clients can use to understand this automation
            preview response format.
        validation:
          allOf:
            - $ref: '#/components/schemas/AutomationValidationResult'
          description: Validation result returned for the automation configuration.
        conditionResults:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AutomationPreviewConditionResult'
            description: >-
              Result schema for the Leadping API automation preview condition
              result returned by lookup and validation endpoints.
          description: Condition evaluation results returned by the automation preview.
        actionResults:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AutomationPreviewActionResult'
            description: >-
              Result schema for the Leadping API automation preview action
              result returned by lookup and validation endpoints.
          description: Action preview results showing what the automation would do.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Warnings returned for this automation preview response that do not
            necessarily block processing.
      description: >-
        Response schema for the Leadping API automation preview response
        returned to authenticated clients.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          description: URI reference that identifies the problem type.
          nullable: true
        title:
          type: string
          description: Short, human-readable summary of the problem.
          nullable: true
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: HTTP status code returned for the problem.
          format: int32
          nullable: true
        detail:
          type: string
          description: >-
            Human-readable explanation specific to this occurrence of the
            problem.
          nullable: true
        instance:
          type: string
          description: >-
            URI reference that identifies this specific occurrence of the
            problem.
          nullable: true
    AutomationRequestSnapshot:
      type: object
      properties:
        id:
          type: string
          description: Unique Leadping identifier for this automation request snapshot.
          nullable: true
        name:
          type: string
          description: >-
            Display name for this automation request snapshot in the Leadping
            API.
          nullable: true
        description:
          type: string
          description: >-
            Human-readable description that explains this automation request
            snapshot to API users.
          nullable: true
        enabled:
          type: boolean
          description: >-
            Indicates whether this automation request snapshot is active and
            available in the Leadping API.
          nullable: true
        businessId:
          type: string
          description: >-
            Business ID captured when the automation request snapshot was
            created.
          nullable: true
        createdByUserId:
          type: string
          description: User ID of the person who created this automation request snapshot.
          nullable: true
        scope:
          type: string
          description: >-
            Scope that limits where this automation request snapshot applies in
            Leadping.
          nullable: true
        visibility:
          type: string
          description: >-
            Visibility level that controls who can see this automation request
            snapshot.
          nullable: true
        managementLevel:
          type: string
          description: >-
            Management level that controls whether Leadping or the business owns
            this automation setting.
          nullable: true
        isSystemManaged:
          type: boolean
          description: >-
            Indicates whether Leadping manages this automation request snapshot
            automatically instead of a user.
        triggers:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AutomationTrigger'
            description: Public Leadping API schema for automation trigger data.
          description: Automation triggers that can start this workflow.
        conditionGroups:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AutomationConditionGroup'
            description: Public Leadping API schema for automation condition group data.
          description: >-
            Grouped automation conditions used to decide whether this workflow
            should run.
        actions:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AutomationAction'
            description: Public Leadping API schema for automation action data.
          description: Automation actions configured or returned for this workflow.
      description: Public Leadping API schema for automation request snapshot data.
    AutomationValidationResult:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: >-
            Validation or processing errors returned for this automation
            validation result.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Warnings returned for this automation validation result that do not
            necessarily block processing.
      description: >-
        Result schema for the Leadping API automation validation result returned
        by lookup and validation endpoints.
    AutomationPreviewConditionResult:
      type: object
      properties:
        conditionId:
          type: string
          description: Automation condition ID evaluated by this preview result.
          nullable: true
        summary:
          type: string
          description: >-
            Short human-readable summary of this automation preview condition
            result for lists, timelines, and notifications.
        passed:
          type: boolean
          description: >-
            Indicates whether this automation preview condition result passed
            the preview or validation check.
      description: >-
        Result schema for the Leadping API automation preview condition result
        returned by lookup and validation endpoints.
    AutomationPreviewActionResult:
      type: object
      properties:
        actionId:
          type: string
          description: >-
            Automation action ID executed or evaluated by this automation
            preview action result.
          nullable: true
        summary:
          type: string
          description: >-
            Short human-readable summary of this automation preview action
            result for lists, timelines, and notifications.
        renderedOutput:
          type: string
          description: >-
            Rendered preview output produced by this automation preview action
            result.
        wouldHaveSideEffect:
          type: boolean
          description: >-
            Indicates whether the automation preview would perform an external
            action if executed live.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Warnings returned for this automation preview action result that do
            not necessarily block processing.
      description: >-
        Result schema for the Leadping API automation preview action result
        returned by lookup and validation endpoints.
    AutomationTrigger:
      type: object
      properties:
        id:
          type: string
          description: Unique Leadping identifier for this automation trigger.
        type:
          type: string
          description: >-
            Type classification used to route and interpret this automation
            trigger in the Leadping API.
        displayName:
          type: string
          description: Human-readable display name shown for this automation trigger.
          nullable: true
        isEnabled:
          type: boolean
          description: >-
            Indicates whether this automation trigger is active and allowed to
            run.
        settings:
          type: object
          additionalProperties:
            type: string
          description: >-
            Key-value settings that configure how this automation trigger
            behaves.
      description: Public Leadping API schema for automation trigger data.
    AutomationConditionGroup:
      type: object
      properties:
        id:
          type: string
          description: Unique Leadping identifier for this automation condition group.
        mode:
          type: string
          description: >-
            Execution mode that controls how this automation condition group is
            evaluated.
        conditions:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AutomationCondition'
            description: Public Leadping API schema for automation condition data.
          description: Automation conditions evaluated before an action or workflow runs.
      description: Public Leadping API schema for automation condition group data.
    AutomationAction:
      type: object
      properties:
        id:
          type: string
          description: Unique Leadping identifier for this automation action.
        type:
          type: string
          description: >-
            Type classification used to route and interpret this automation
            action in the Leadping API.
        order:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: Sort order used to evaluate or display this automation action.
          format: int32
        isEnabled:
          type: boolean
          description: >-
            Indicates whether this automation action is active and allowed to
            run.
        settings:
          type: object
          additionalProperties:
            type: string
          description: >-
            Key-value settings that configure how this automation action
            behaves.
      description: Public Leadping API schema for automation action data.
    AutomationCondition:
      type: object
      properties:
        id:
          type: string
          description: Unique Leadping identifier for this automation condition.
        type:
          type: string
          description: >-
            Type classification used to route and interpret this automation
            condition in the Leadping API.
        operator:
          type: string
          description: Automation comparison operator used by this condition.
          nullable: true
        isEnabled:
          type: boolean
          description: >-
            Indicates whether this automation condition is active and allowed to
            run.
        settings:
          type: object
          additionalProperties:
            type: string
          description: >-
            Key-value settings that configure how this automation condition
            behaves.
      description: Public Leadping API schema for automation condition data.

````