Leadping Automations API

Manages automated lead follow-up workflows and their execution history. Use these endpoints to configure SMS automation steps, preview eligible leads, run workflows, and inspect individual automation executions.

OpenAPI Specification

leadping-automations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Leadping Automations API
  description: The Leadping API helps businesses capture and manage leads, automate follow-up, send SMS and MMS messages, place calls, track conversations, enforce contact suppression, and analyze communication workflows. Use this OpenAPI 3.1 contract to integrate lead sources, build organization tools, or generate a typed API client. Authenticate protected operations with a Leadping user access token or WorkOS organization API key. Lead intake operations also accept a Leadping source key.
  termsOfService: https://leadping.ai/docs/terms-of-service
  contact:
    name: Leadping Support
    url: https://leadping.ai/contact
    email: support@leadping.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
  summary: Lead management, messaging, calling, and automation API
servers:
- url: https://api.leadping.ai
  description: Production
tags:
- name: Automations
  description: Manages automated lead follow-up workflows and their execution history. Use these endpoints to configure SMS automation steps, preview eligible leads, run workflows, and inspect individual automation executions.
paths:
  /automations:
    post:
      tags:
      - Automations
      summary: Create an organization lead follow-up automation
      description: Creates an automation for current-organization leads, configuring triggers, message steps, and follow-up behavior.
      operationId: Automations_Create
      requestBody:
        description: The automation request payload for the operation.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/AutomationRequest'
              description: Defines the fields clients can send when working with automation configuration.
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/AutomationRequest'
              description: Defines the fields clients can send when working with automation configuration.
        required: true
      responses:
        '201':
          description: The automation response was created successfully.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationResponse'
                description: Describes automation configuration data returned by Leadping.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /automations/{id}:
    put:
      tags:
      - Automations
      summary: Update an organization lead follow-up automation
      description: Updates an automation for current-organization leads, changing triggers, message steps, routing, or active follow-up settings.
      operationId: Automations_Update
      parameters:
      - name: id
        in: path
        description: The ID of the automation.
        required: true
        schema:
          type: string
      requestBody:
        description: The automation request payload for the operation.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/AutomationRequest'
              description: Defines the fields clients can send when working with automation configuration.
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/AutomationRequest'
              description: Defines the fields clients can send when working with automation configuration.
        required: true
      responses:
        '200':
          description: Returns the automation response.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationResponse'
                description: Describes automation configuration data returned by Leadping.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
    get:
      tags:
      - Automations
      summary: Get an organization lead follow-up automation
      description: Returns one automation for the current organization, including trigger criteria, message steps, routing settings, and enabled state.
      operationId: Automations_Get
      parameters:
      - name: id
        in: path
        description: The ID of the automation.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns the automation response.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationResponse'
                description: Describes automation configuration data returned by Leadping.
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
    delete:
      tags:
      - Automations
      summary: Delete an organization lead follow-up automation
      description: Deletes an automation for the current organization so it no longer schedules follow-up or routing work for captured leads.
      operationId: Automations_Delete
      parameters:
      - name: id
        in: path
        description: The ID of the automation.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns the bool.
          content:
            application/json:
              schema:
                type: boolean
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /automations/{id}/runs:
    get:
      tags:
      - Automations
      summary: Gets recent persisted execution runs for an automation console.
      description: Returns recent execution history for the specified automation in the current organization, including run state and console details.
      operationId: Automations_GetRuns
      parameters:
      - name: id
        in: path
        description: The unique identifier of the automation.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns the automation execution history.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationConsoleResponse'
                description: Recent persisted execution runs for an automation console.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /automations/{id}/runs/{runId}:
    get:
      tags:
      - Automations
      summary: Gets one persisted automation execution run for its console.
      description: Returns the specified persisted execution run for an automation in the current organization, including its current console state.
      operationId: Automations_GetRun
      parameters:
      - name: id
        in: path
        description: The unique identifier of the automation.
        required: true
        schema:
          type: string
      - name: runId
        in: path
        description: The unique identifier of the persisted automation run.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns the requested automation execution run.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationConsoleResponse'
                description: Recent persisted execution runs for an automation console.
        '404':
          description: The automation or execution run was not found.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /automations/all/my:
    post:
      tags:
      - Automations
      summary: List organization lead follow-up automations
      description: Lists current-user automations with paging, sorting, and filters for reviewing follow-up workflows and ownership.
      operationId: Automations_GetAllForCurrentUser
      requestBody:
        description: The filtering, sorting, and pagination options.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/RequestDataOptions'
              description: Defines cursor pagination, sorting, search, exact-match filters, and range filters for a structured API query.
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/RequestDataOptions'
              description: Defines cursor pagination, sorting, search, exact-match filters, and range filters for a structured API query.
        required: true
      responses:
        '200':
          description: Returns the paged automation table row.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PagedResultOfAutomationTableRow'
                description: Returns one page of query results together with page-size, optional total-count, and opaque continuation-cursor metadata.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /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: Defines the fields clients can send when working with automation preview.
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/AutomationPreviewRequest'
              description: Defines the fields clients can send when working with automation preview.
        required: true
      responses:
        '200':
          description: Returns the automation preview response.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationPreviewResponse'
                description: Describes automation preview data returned by Leadping.
        '400':
          description: The request was invalid or failed validation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user or organization does not have permission to perform this operation.
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
  /automations/{id}/run:
    post:
      tags:
      - Automations
      summary: Runs an automation through its Manual trigger.
      description: Starts the specified automation through its manual trigger and returns the newly created execution record.
      operationId: Automations_RunManual
      parameters:
      - name: id
        in: path
        description: The unique identifier of the automation to run.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns the newly created automation execution record.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/AutomationRunRecord'
                description: History record schema for Leadping API automation run record data exposed in automation and audit views.
        '400':
          description: The automation cannot be run with its current configuration or state.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '403':
          description: The authenticated user is not allowed to run this automation.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '401':
          description: Authentication credentials are missing or invalid.
          headers:
            WWW-Authenticate:
              description: Bearer authentication challenge returned when credentials are missing or invalid.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
        '429':
          description: The API rate limit for this account or client has been exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                minimum: 0
                type: integer
                format: int32
          content:
            application/problem+json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ProblemDetails'
                description: Standard problem-details response containing machine-readable and human-readable information about an HTTP API error.
      security:
      - Bearer: []
components:
  schemas:
    AutomationRequestSnapshot:
      type: object
      properties:
        id:
          type:
          - 'null'
          - string
          description: Unique Leadping identifier for this automation request snapshot.
        name:
          type:
          - 'null'
          - string
          description: Display name for this automation request snapshot in the Leadping API.
        description:
          type:
          - 'null'
          - string
          description: Human-readable description that explains this automation request snapshot to API users.
        enabled:
          type:
          - 'null'
          - boolean
          description: Indicates whether this automation request snapshot is active and available in the Leadping API.
        organizationId:
          type:
          - 'null'
          - string
          description: Organization ID captured when the automation request snapshot was created.
        createdByUserId:
          type:
          - 'null'
          - string
          description: User ID of the person who created this automation request snapshot.
        scope:
          type:
          - 'null'
          - string
          description: Scope that limits where this automation request snapshot applies in Leadping.
        visibility:
          type:
          - 'null'
          - string
          description: Visibility level that controls who can see this automation request snapshot.
        managementLevel:
          type:
          - 'null'
          - string
          description: Management level that controls whether Leadping or the organization owns this automation setting.
        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.
        connections:
          type: array
          items:
            allOf:
            - $ref: '#/components/schemas/AutomationConnection'
            description: A directed connection between two nodes in an automation graph.
          description: Directed connections between nodes in this automation graph.
      description: Public Leadping API schema for automation request snapshot data.
    AutomationRequest:
      required:
      - name
      type: object
      properties:
        description:
          type:
          - 'null'
          - string
          description: Human-readable description that explains this automation configuration request to API users.
        enabled:
          type:
          - 'null'
          - boolean
          description: Indicates whether this automation configuration request is active and available in the Leadping API.
        scope:
          type:
          - 'null'
          - string
          description: Scope that limits where this automation configuration request applies in Leadping.
        visibility:
          type:
          - 'null'
          - string
          description: Visibility level that controls who can see this automation configuration request.
        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:


# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/leadping/refs/heads/main/openapi/leadping-automations-api-openapi.yml