Skip to main content
POST
/
automations
Create a business lead follow-up automation
curl --request POST \
  --url https://api.leadping.ai/automations \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "enabled": true,
  "adminEnablementOverride": {
    "enabled": true,
    "reason": "<string>",
    "updatedByUserId": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "businessId": "<string>",
  "createdByUserId": "<string>",
  "scope": "<string>",
  "visibility": "<string>",
  "managementLevel": "<string>",
  "isSystemManaged": true,
  "triggers": [
    {
      "id": "<string>",
      "type": "<string>",
      "displayName": "<string>",
      "isEnabled": true,
      "settings": {}
    }
  ],
  "conditionGroups": [
    {
      "id": "<string>",
      "mode": "<string>",
      "conditions": [
        {
          "id": "<string>",
          "type": "<string>",
          "operator": "<string>",
          "isEnabled": true,
          "settings": {}
        }
      ]
    }
  ],
  "actions": [
    {
      "id": "<string>",
      "type": "<string>",
      "order": "<string>",
      "isEnabled": true,
      "settings": {}
    }
  ],
  "version": "<string>",
  "id": "<string>"
}
'
{
  "description": "<string>",
  "enabled": true,
  "adminEnablementOverride": {
    "enabled": true,
    "reason": "<string>",
    "updatedByUserId": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "businessId": "<string>",
  "createdByUserId": "<string>",
  "scope": "<string>",
  "visibility": "<string>",
  "managementLevel": "<string>",
  "isSystemManaged": true,
  "triggers": [
    {
      "id": "<string>",
      "type": "<string>",
      "displayName": "<string>",
      "isEnabled": true,
      "settings": {}
    }
  ],
  "conditionGroups": [
    {
      "id": "<string>",
      "mode": "<string>",
      "conditions": [
        {
          "id": "<string>",
          "type": "<string>",
          "operator": "<string>",
          "isEnabled": true,
          "settings": {}
        }
      ]
    }
  ],
  "actions": [
    {
      "id": "<string>",
      "type": "<string>",
      "order": "<string>",
      "isEnabled": true,
      "settings": {}
    }
  ],
  "lastRunAt": "2023-11-07T05:31:56Z",
  "lastRunStatus": "<string>",
  "lastRunError": "<string>",
  "recentRuns": [
    {
      "id": "<string>",
      "automationId": "<string>",
      "businessId": "<string>",
      "leadId": "<string>",
      "triggerType": "<string>",
      "sourceEventId": "<string>",
      "executionKey": "<string>",
      "status": "<string>",
      "executionMode": "<string>",
      "startedAt": "2023-11-07T05:31:56Z",
      "completedAt": "2023-11-07T05:31:56Z",
      "processingAttempts": "<string>",
      "lastAttemptAt": "2023-11-07T05:31:56Z",
      "error": "<string>",
      "failureCode": "<string>",
      "skippedReason": "<string>",
      "contextSnapshot": {},
      "actions": [
        {
          "id": "<string>",
          "automationRunId": "<string>",
          "actionId": "<string>",
          "actionType": "<string>",
          "executionKey": "<string>",
          "order": "<string>",
          "status": "<string>",
          "integrationKey": "<string>",
          "startedAt": "2023-11-07T05:31:56Z",
          "scheduledAt": "2023-11-07T05:31:56Z",
          "completedAt": "2023-11-07T05:31:56Z",
          "failedAt": "2023-11-07T05:31:56Z",
          "processingAttempts": "<string>",
          "nextRetryAt": "2023-11-07T05:31:56Z",
          "output": "<string>",
          "error": "<string>",
          "failureCode": "<string>"
        }
      ]
    }
  ],
  "version": "<string>",
  "user": {
    "id": "<string>",
    "name": "<string>"
  },
  "business": {
    "id": "<string>",
    "name": "<string>"
  },
  "name": "<string>",
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "modifiedAt": "2023-11-07T05:31:56Z"
}

Body

The automation request payload for the operation.

Request payload for automation.

name
string
required

The display name for the entity.

Maximum string length: 255
description
string | null

The human-readable description of this automation.

enabled
boolean | null

Whether this automation is enabled.

adminEnablementOverride
object
businessId
string | null

The business ID associated with this automation.

createdByUserId
string | null

The created by user ID associated with this automation.

scope
string | null

The scope value for this automation.

visibility
string | null

The visibility value for this automation.

managementLevel
string | null

The management level value for this automation.

isSystemManaged
boolean

Whether this automation is system managed.

triggers
object[]

The triggers included with this automation.

conditionGroups
object[]

The condition groups included with this automation.

actions
object[]

The actions included with this automation.

version
string<int32>

The version value for this automation.

Pattern: ^-?(?:0|[1-9]\d*)$
id
string | null

The unique identifier for the entity, when updating an existing entity.

Response

The automation response was created successfully.

API response containing automation data returned to callers.

description
string | null

The human-readable description of this automation.

enabled
boolean | null

Whether this automation is enabled.

adminEnablementOverride
object
businessId
string | null

The business ID associated with this automation.

createdByUserId
string | null

The created by user ID associated with this automation.

scope
string | null

The scope value for this automation.

visibility
string | null

The visibility value for this automation.

managementLevel
string | null

The management level value for this automation.

isSystemManaged
boolean

Whether this automation is system managed.

triggers
object[]

The triggers included with this automation.

conditionGroups
object[]

The condition groups included with this automation.

actions
object[]

The actions included with this automation.

lastRunAt
string<date-time> | null

The date and time for the last run at value on this automation.

lastRunStatus
string | null

The current last run status for this automation.

lastRunError
string | null

The date and time for the last run error value on this automation.

recentRuns
object[]

The recent runs included with this automation.

version
string<int32>

The version value for this automation.

Pattern: ^-?(?:0|[1-9]\d*)$
user
object

The user value for this automation.

business
object

The business value for this automation.

name
string

The display name for the entity.

id
string

The unique identifier for the entity.

createdAt
string<date-time>

The date and time when the entity was created.

modifiedAt
string<date-time> | null

The date and time when the entity was last modified, if applicable.