---
title: "Preview a lead follow-up automation"
method: POST
path: "/automations/preview"
tags: ["Automations"]
---

# Preview a lead follow-up automation

`POST /automations/preview`

## Request

- Base URL: `https://api.leadping.ai`
- URL: `https://api.leadping.ai/automations/preview`
- Auth: HTTP bearer

Preview matched automation steps and messages for a sample lead without creating follow-up events, or use validate_only to check the automation configuration.

## Query parameters

- `validate_only` boolean

## Request body

- AutomationPreviewRequest: Defines the fields clients can send when working with automation preview.
  - `automation` AutomationRequestSnapshot, required: Public Leadping API schema for automation request snapshot data.
    - `timeZoneId` string: Time zone used by workflow time and day conditions in preview and runtime. Defaults to UTC.
    - `id` string, nullable: Unique Leadping identifier for this automation request snapshot.
    - `name` string, nullable: Display name for this automation request snapshot in the Leadping API.
    - `description` string, nullable: Human-readable description that explains this automation request snapshot to API users.
    - `enabled` boolean, nullable: Indicates whether this automation request snapshot is active and available in the Leadping API.
    - `organizationId` string, nullable: Organization ID captured when the automation request snapshot was created.
    - `createdByUserId` string, nullable: User ID of the person who created this automation request snapshot.
    - `scope` string, nullable: Scope that limits where this automation request snapshot applies in Leadping.
    - `visibility` string, nullable: Visibility level that controls who can see this automation request snapshot.
    - `managementLevel` string, nullable: Management level that controls whether Leadping or the organization owns this automation setting.
    - `isSystemManaged` boolean: Indicates whether Leadping manages this automation request snapshot automatically instead of a user.
    - `triggers` AutomationTrigger[]: Automation triggers that can start this workflow.
      - `id` string: Unique Leadping identifier for this automation trigger.
      - `type` string: Type classification used to route and interpret this automation trigger in the Leadping API.
      - `displayName` string, nullable: Human-readable display name shown for this automation trigger.
      - `isEnabled` boolean: Indicates whether this automation trigger is active and allowed to run.
      - `settings` object: Key-value settings that configure how this automation trigger behaves.
    - `conditionGroups` AutomationConditionGroup[]: Grouped automation conditions used to decide whether this workflow should run.
      - `id` string: Unique Leadping identifier for this automation condition group.
      - `mode` string: Execution mode that controls how this automation condition group is evaluated.
      - `conditions` AutomationCondition[]: Automation conditions evaluated before an action or workflow runs.
        - `id` string: Unique Leadping identifier for this automation condition.
        - `type` string: Type classification used to route and interpret this automation condition in the Leadping API.
        - `operator` string, nullable: Automation comparison operator used by this condition.
        - `isEnabled` boolean: Indicates whether this automation condition is active and allowed to run.
        - `settings` object: Key-value settings that configure how this automation condition behaves.
    - `actions` AutomationAction[]: Automation actions configured or returned for this workflow.
      - `id` string: Unique Leadping identifier for this automation action.
      - `type` string: Type classification used to route and interpret this automation action in the Leadping API.
      - `order` integer: Sort order used to evaluate or display this automation action.
      - `isEnabled` boolean: Indicates whether this automation action is active and allowed to run.
      - `settings` object: Key-value settings that configure how this automation action behaves.
    - `connections` AutomationConnection[]: Directed connections between nodes in this automation graph.
      - `id` string: Unique identifier for this connection.
      - `sourceNodeId` string: Graph node identifier where the connection begins.
      - `targetNodeId` string: Graph node identifier where the connection ends.
      - `weight` integer: Percentage chance assigned to this connection when it leaves a weighted random split. Ignored for connections from other node types.
  - `triggerType` string, nullable: Automation trigger type that starts the workflow.

## Response `200`

Returns the automation preview response.

- AutomationPreviewResponse: Describes automation preview data returned by Leadping.
  - `triggerType` string, nullable: Automation trigger type that starts the workflow.
  - `samplePayload` object: Example payload clients can use to understand this automation preview response format.
  - `validation` AutomationValidationResult: Result schema for the Leadping API automation validation result returned by lookup and validation endpoints.
    - `errors` string[]: Validation or processing errors returned for this automation validation result.
    - `warnings` string[]: Warnings returned for this automation validation result that do not necessarily block processing.
  - `conditionResults` AutomationPreviewConditionResult[]: Condition evaluation results returned by the automation preview.
    - `conditionId` string, nullable: Automation condition ID evaluated by this preview result.
    - `summary` string: Short human-readable summary of this automation preview condition result for lists, timelines, and notifications.
    - `passed` boolean: Indicates whether this automation preview condition result passed the preview or validation check.
  - `actionResults` AutomationPreviewActionResult[]: Action preview results showing what the automation would do.
    - `actionId` string, nullable: Automation action ID executed or evaluated by this automation preview action result.
    - `summary` string: Short human-readable summary of this automation preview action result for lists, timelines, and notifications.
    - `renderedOutput` string: Rendered preview output produced by this automation preview action result.
    - `wouldHaveSideEffect` boolean: Indicates whether the automation preview would perform an external action if executed live.
    - `warnings` string[]: Warnings returned for this automation preview action result that do not necessarily block processing.
  - `warnings` string[]: Warnings returned for this automation preview response that do not necessarily block processing.

## Other responses

- `400`: The request was invalid or failed validation.
- `401`: Authentication credentials are missing or invalid.
- `403`: The caller does not have permission to perform this operation.
- `404`: The requested resource or required account context was not found.
- `415`: The request content type is not supported by this endpoint.
- `429`: The client or account rate limit was exceeded. Retry after the interval in the Retry-After header.
- `500`: An unexpected error prevented the server from completing the request.

## Changes

- **2026-11-11** `81aed8c9afb7`: 3 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `415`
  - added the non-success response with the status `500`

[Operation history](https://skmtc.dev/leadping/apis/leadping-api/changes/automations/preview/post.md)

---

[API](https://skmtc.dev/leadping/apis/leadping-api.md) - [All operations](https://skmtc.dev/leadping/apis/leadping-api/llms.txt) - [OpenAPI document](https://skmtc.dev/leadping/apis/leadping-api/revisions/bf1852acaf45?raw)
