Skip to content

Workflows ​

APIs for managing workflows (automation journeys) in your Lindris account.

As a reminder, all requests must be authenticated and use the base URL: https://api.lindris.com

List workflows ​

GET api/workflows

Retrieve workflows for the authenticated account. Omit page to receive the full list in a flat {data:[...]} shape; pass page for a paginated envelope with meta/links. Filter by status with active / paused.

Query Parameters ​

  • status string optional - Comma-separated statuses to filter by. Example: active
    • Must be one of:
      • active
      • paused. Omit
      • or pass both values
      • to return workflows of any status
  • page integer optional - Page number for paginated results. Omit to return all. Example: 1
  • perPage integer optional - Items per page. Defaults to 10; a larger value is clamped to the maximum of 100, and a value below 1 falls back to the default (out-of-range values are corrected, not rejected). Example: 25

Response Fields ​

  • data[] array
    • id string optional - The workflow id.
    • name string optional - The workflow name.
    • enabled boolean optional - Whether the workflow is currently active.
  • trigger object optional - The workflow trigger ({ type, tagIds?, sourceId? }).
    • type string optional - The trigger type. Enum: manual,list_subscription,list_unsubscription,tag,untag,workflow_completed,unsupported. A trigger built in the dashboard outside this set reads as unsupported.
  • links object optional - UI handoff links.
    • edit string optional - URL to the workflow builder.

Request ​

bash
curl --request GET \
    --get "https://api.lindris.com/api/workflows?status=active&page=1&perPage=25" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
        'query' => [
            'status' => 'active',
            'page' => '1',
            'perPage' => '25',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows"
);

const params = {
    "status": "active",
    "page": "1",
    "perPage": "25",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Responses ​

json
{
   "data": [
      {
         "id": "42",
         "name": "Onboarding",
         "enabled": true,
         "trigger": {
            "type": "tag",
            "tagIds": [
               3
            ]
         },
         "links": {
            "edit": "https://app.lindris.com/workflows/42/editor"
         }
      },
      {
         "id": "57",
         "name": "Re-engagement",
         "enabled": false,
         "trigger": {
            "type": "manual"
         },
         "links": {
            "edit": "https://app.lindris.com/workflows/57/editor"
         }
      }
   ]
}
json
{
   "data": [
      {
         "id": "42",
         "name": "Onboarding",
         "enabled": true,
         "trigger": {
            "type": "tag",
            "tagIds": [
               3
            ]
         },
         "links": {
            "edit": "https://app.lindris.com/workflows/42/editor"
         }
      }
   ],
   "meta": {
      "currentPage": 1,
      "lastPage": 1,
      "from": 1,
      "to": 1,
      "total": 1,
      "perPage": 10,
      "path": "/api/workflows"
   },
   "links": {
      "next": null,
      "prev": null,
      "first": "/api/workflows?page=1",
      "last": "/api/workflows?page=1"
   }
}

Create workflow ​

POST api/workflows

Create a workflow from an in-scope trigger. Supported trigger types: manual, list_subscription, list_unsubscription, tag, untag, workflow_completed. Rule-based triggers (custom field / website event) and series-completion triggers are not yet supported and return a 422. To duplicate an existing workflow, use POST /workflows/{id}/clone.

Request Body ​

  • name string required - The workflow name. Example: Onboarding
  • trigger object optional - The trigger ({ type, tagIds?, sourceId? }). Defaults to manual.

Example: []

* `type` <small class="prop-details"> string _optional_</small> - optional
  Example: `tag`
* Must be one of:
* `manual`
* `list_subscription`
* `list_unsubscription`
* `tag`
* `untag`
* `workflow_completed`
* `tagIds` <small class="prop-details"> integer[] _optional_</small> - Tag ids for tag/untag triggers.
  Example: `[
  3
  ]`
* `sourceId` <small class="prop-details"> integer _optional_</small> - The workflow id for the workflow_completed trigger.

Response Fields ​

  • data array
    • id string optional - The new workflow id.
    • name string optional - The workflow name.
    • enabled boolean optional - Whether the workflow is active (new workflows start paused).
    • trigger object optional - The workflow trigger.
    • links object optional - UI handoff links.

Request ​

bash
curl --request POST \
    "https://api.lindris.com/api/workflows" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"Onboarding\",
    \"trigger\": {
        \"type\": \"tag\",
        \"tagIds\": [
            3
        ]
    }
}"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'name' => 'Onboarding',
            'trigger' => [
                'type' => 'tag',
                'tagIds' => [
                    3,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Onboarding",
    "trigger": {
        "type": "tag",
        "tagIds": [
            3
        ]
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Responses ​

json
{
   "data": {
      "id": "42",
      "name": "Onboarding",
      "enabled": false,
      "trigger": {
         "type": "tag",
         "tagIds": [
            3
         ]
      },
      "links": {
         "edit": "https://app.lindris.com/workflows/42/editor"
      },
      "flow": {
         "emailCount": 0
      },
      "emails": []
   }
}
json
{
   "message": "Your account is not active. Resolve your billing status to perform this action."
}
json
{
   "message": "This trigger type is not supported yet.",
   "status_code": 422,
   "errors": {
      "trigger.type": [
         "This trigger type is not supported yet."
      ]
   }
}

Get workflow ​

GET api/workflows/{id}

Retrieve a single workflow including its trigger, a read-only flow summary, and the read-only send-email actions in its flow (each with an informational draft flag and an editor link). The action graph is authored in the builder (links.edit).

URL Parameters ​

  • id string required - The workflow id. Example: 42

Response Fields ​

  • data array
    • id string optional - The workflow id.
    • name string optional - The workflow name.
    • enabled boolean optional - Whether the workflow is currently active.
  • trigger object optional - The workflow trigger ({ type, tagIds?, sourceId? }).
    • type string optional - The trigger type. Enum: manual,list_subscription,list_unsubscription,tag,untag,workflow_completed,unsupported. A trigger built in the dashboard outside this set reads as unsupported; omit trigger on update to keep it.
  • flow object optional - Read-only flow summary.
    • emailCount integer optional - Number of send-email actions in the flow.
    • emails string[] optional - The read-only send-email actions.
  • emails[] array
    • id integer optional - The send-email action id.
    • name string optional - The email subject/name.
    • draft boolean optional - Whether the email is still a draft (not yet published in the builder). A draft email does not send.
  • links object optional - UI handoff links (edit).
    • edit string optional - URL to the email editor, or null when the email has no local mirror (e.g. a step whose mirror was skipped during a best-effort duplicate). Guard for null.
  • links object optional - UI handoff links.
    • edit string optional - URL to the workflow builder.

Request ​

bash
curl --request GET \
    --get "https://api.lindris.com/api/workflows/42" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows/42';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows/42"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Responses ​

json
{
   "data": {
      "id": "42",
      "name": "Onboarding",
      "enabled": true,
      "trigger": {
         "type": "tag",
         "tagIds": [
            3
         ]
      },
      "links": {
         "edit": "https://app.lindris.com/workflows/42/editor"
      },
      "flow": {
         "emailCount": 2
      },
      "emails": [
         {
            "id": 100,
            "name": "Welcome email",
            "draft": false,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575xyz/editor"
            }
         },
         {
            "id": 104,
            "name": "Day 3 nudge",
            "draft": true,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575abc/editor"
            }
         }
      ]
   }
}
json
{
   "message": "Workflow not found"
}

Update workflow ​

PUT api/workflows/{id}

Update a workflow's name and, optionally, its trigger (in-scope types only). When no trigger is supplied the existing trigger is preserved. A workflow built in the dashboard reads back as trigger.type: "unsupported"; omit trigger to keep it rather than sending unsupported back, which returns a 422.

URL Parameters ​

  • id string required - The workflow id. Example: 42

Request Body ​

  • name string required - The new workflow name. Example: Onboarding v2
  • trigger object optional - The trigger ({ type, tagIds?, sourceId? }). Omit to keep the stored trigger.

Example: []

* `type` <small class="prop-details"> string _optional_</small> - optional
  Example: `tag`
* Must be one of:
* `manual`
* `list_subscription`
* `list_unsubscription`
* `tag`
* `untag`
* `workflow_completed`
* `tagIds` <small class="prop-details"> integer[] _optional_</small> - Tag ids for tag/untag triggers.
  Example: `[
  3
  ]`
* `sourceId` <small class="prop-details"> integer _optional_</small> - The workflow id for the workflow_completed trigger.

Request ​

bash
curl --request PUT \
    "https://api.lindris.com/api/workflows/42" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"Onboarding v2\",
    \"trigger\": {
        \"type\": \"tag\",
        \"tagIds\": [
            3
        ]
    }
}"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows/42';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'name' => 'Onboarding v2',
            'trigger' => [
                'type' => 'tag',
                'tagIds' => [
                    3,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows/42"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Onboarding v2",
    "trigger": {
        "type": "tag",
        "tagIds": [
            3
        ]
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Responses ​

json
{
   "data": {
      "id": "42",
      "name": "Onboarding",
      "enabled": true,
      "trigger": {
         "type": "tag",
         "tagIds": [
            3
         ]
      },
      "links": {
         "edit": "https://app.lindris.com/workflows/42/editor"
      },
      "flow": {
         "emailCount": 2
      },
      "emails": [
         {
            "id": 100,
            "name": "Welcome email",
            "draft": false,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575xyz/editor"
            }
         },
         {
            "id": 104,
            "name": "Day 3 nudge",
            "draft": true,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575abc/editor"
            }
         }
      ]
   }
}
json
{
   "message": "Your account is not active. Resolve your billing status to perform this action."
}
json
{
   "message": "Workflow not found"
}
json
{
   "message": "This trigger type is not supported yet.",
   "status_code": 422,
   "errors": {
      "trigger.type": [
         "This trigger type is not supported yet."
      ]
   }
}
json
{
   "message": "The workflow could not be saved. Please try again.",
   "status_code": 422,
   "errors": {
      "workflow": [
         "The workflow could not be saved. Please try again."
      ]
   }
}

Delete workflow ​

DELETE api/workflows/{id}

Permanently delete a workflow.

URL Parameters ​

  • id string required - The workflow id. Example: 42

Request ​

bash
curl --request DELETE \
    "https://api.lindris.com/api/workflows/42" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows/42';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows/42"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Responses ​

text
(No response body)
json
{
   "message": "Workflow not found"
}
json
{
   "message": "The workflow could not be saved. Please try again.",
   "status_code": 422,
   "errors": {
      "workflow": [
         "The workflow could not be saved. Please try again."
      ]
   }
}

Activate workflow ​

POST api/workflows/{id}/activate

Activate (enable) a workflow so it starts enrolling and sending to contacts going forward. By default it does not enroll contacts who already match the trigger. Pass applyToExisting: true to also backfill the contacts matching the workflow's stored entry filter — useful after building the workflow and its filter in the editor, then activating via the API. A manual trigger has no entry filter, so applyToExisting enrolls nobody on a manual workflow; it is meaningful only for triggered workflows carrying entry criteria.

URL Parameters ​

  • id string required - The workflow id. Example: 42

Request Body ​

  • applyToExisting boolean optional - Enroll the contacts already matching the workflow's stored entry filter. Defaults to false. No-op on a manual-trigger workflow (which carries no entry filter). Example: true

Request ​

bash
curl --request POST \
    "https://api.lindris.com/api/workflows/42/activate" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"applyToExisting\": true
}"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows/42/activate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'applyToExisting' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows/42/activate"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "applyToExisting": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Responses ​

json
{
   "data": {
      "id": "42",
      "name": "Onboarding",
      "enabled": true,
      "trigger": {
         "type": "tag",
         "tagIds": [
            3
         ]
      },
      "links": {
         "edit": "https://app.lindris.com/workflows/42/editor"
      },
      "flow": {
         "emailCount": 2
      },
      "emails": [
         {
            "id": 100,
            "name": "Welcome email",
            "draft": false,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575xyz/editor"
            }
         },
         {
            "id": 104,
            "name": "Day 3 nudge",
            "draft": true,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575abc/editor"
            }
         }
      ]
   }
}
json
{
   "message": "Your account is not active. Resolve your billing status to perform this action."
}
json
{
   "message": "Workflow not found"
}
json
{
   "message": "The workflow could not be saved. Please try again.",
   "status_code": 422,
   "errors": {
      "workflow": [
         "The workflow could not be saved. Please try again."
      ]
   }
}

Pause workflow ​

POST api/workflows/{id}/pause

Pause (disable) a workflow so it stops enrolling and sending to contacts.

URL Parameters ​

  • id string required - The workflow id. Example: 42

Request ​

bash
curl --request POST \
    "https://api.lindris.com/api/workflows/42/pause" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows/42/pause';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows/42/pause"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Responses ​

json
{
   "data": {
      "id": "42",
      "name": "Onboarding",
      "enabled": true,
      "trigger": {
         "type": "tag",
         "tagIds": [
            3
         ]
      },
      "links": {
         "edit": "https://app.lindris.com/workflows/42/editor"
      },
      "flow": {
         "emailCount": 2
      },
      "emails": [
         {
            "id": 100,
            "name": "Welcome email",
            "draft": false,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575xyz/editor"
            }
         },
         {
            "id": 104,
            "name": "Day 3 nudge",
            "draft": true,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575abc/editor"
            }
         }
      ]
   }
}
json
{
   "message": "Your account is not active. Resolve your billing status to perform this action."
}
json
{
   "message": "Workflow not found"
}
json
{
   "message": "The workflow could not be saved. Please try again.",
   "status_code": 422,
   "errors": {
      "workflow": [
         "The workflow could not be saved. Please try again."
      ]
   }
}

Clone workflow ​

POST api/workflows/{id}/clone

Duplicate an existing workflow into a new one, replicating its trigger and its send-email actions' local Email mirrors the way the dashboard duplicate does. The copy starts paused. A missing id, or an id that belongs to a drip series, answers 404 — the same owner-scoped resolution the other {id} routes use.

URL Parameters ​

  • id string required - The id of the workflow to duplicate. Example: 42

Request Body ​

  • name string optional - Name for the new workflow. Defaults to a "Copy of …" name when omitted. Example: Onboarding (copy)

Request ​

bash
curl --request POST \
    "https://api.lindris.com/api/workflows/42/clone" \
    --header "Authorization: Bearer {YOUR_API_KEY}" \
    --header "Content-Type: application/json" \
    --data "{
    \"name\": \"Onboarding (copy)\"
}"
php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/workflows/42/clone';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_KEY}',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'name' => 'Onboarding (copy)',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
javascript
const url = new URL(
    "https://api.lindris.com/api/workflows/42/clone"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Onboarding (copy)"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Responses ​

json
{
   "data": {
      "id": "42",
      "name": "Onboarding",
      "enabled": true,
      "trigger": {
         "type": "tag",
         "tagIds": [
            3
         ]
      },
      "links": {
         "edit": "https://app.lindris.com/workflows/42/editor"
      },
      "flow": {
         "emailCount": 2
      },
      "emails": [
         {
            "id": 100,
            "name": "Welcome email",
            "draft": false,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575xyz/editor"
            }
         },
         {
            "id": 104,
            "name": "Day 3 nudge",
            "draft": true,
            "links": {
               "edit": "https://app.lindris.com/emails/01hrhe0xbm3c1h5eaqde575abc/editor"
            }
         }
      ]
   }
}
json
{
   "message": "Your account is not active. Resolve your billing status to perform this action."
}
json
{
   "message": "Workflow not found"
}
json
{
   "message": "The workflow could not be duplicated. Please try again.",
   "status_code": 422,
   "errors": {
      "workflow": [
         "The workflow could not be duplicated. Please try again."
      ]
   }
}