For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flows

List Flows

get

List all process flows associated with your company profile.

Pagination

Pagination is available for this request. Please see the section on using pagination for more details.

Available Includes

These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.

  • latestVersion

  • latestVersion_count

  • latestVersionExists

  • latestVersion.variables

  • deployedVersion

  • deployedVersion_count

  • deployedVersionExists

  • deployedVersion.variables

  • currentVersion

  • currentVersion_count

  • currentVersionExists

  • currentVersion.latestRun

  • currentVersion.steps

  • currentVersion.steps.connector

  • currentVersion.steps.connector.authenticationImplementation

  • currentVersion.steps.connector.authenticationImplementation.system

  • currentVersion.steps.variables

  • currentVersion.steps.cache

  • currentVersion.steps.dataPool

  • currentVersion.steps.scriptVersion

  • currentVersion.steps.scriptVersion.script

  • currentVersion.schedules

  • currentVersion.variables

  • versions

  • versions_count

  • versionsExists

  • versions.schedules

  • versions.variables

  • versions.deployedByUser

  • labels

  • labels_count

  • labelsExists

  • webhooks

  • webhooks_count

  • webhooksExists

  • callbacks

  • callbacks_count

  • callbacksExists

  • notificationGroups

  • notificationGroups_count

  • notificationGroupsExists

  • messageBrokers

  • messageBrokers_count

  • messageBrokersExists

  • messageBrokerQueues

  • messageBrokerQueues_count

  • messageBrokerQueuesExists

  • deployments

  • deployments_count

  • deploymentsExists

  • deployments.virtualEnvironment

  • deployments.flowVersion

  • deployments.package

  • deployments.enabledBy

Available Filters

These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.

  • name

  • marketplace_app_id

  • labelled

  • enabled

  • deployed

Available Fields

These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.

  • flows.id

  • flows.name

  • flows.enabled_at

Available Sorts

These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.

  • name

  • enabled_at

  • created_at

  • id

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[name]stringOptional

Filter results by name.

filter[marketplace_app_id]stringOptional

Filter results by marketplace_app_id.

filter[blueprint_id]stringOptional

Filter results by blueprint_id.

filter[blueprint_version_number]stringOptional

Filter results by blueprint_version_number.

filter[labelled]stringOptional

Filter results by label id.

filter[enabled]stringOptional

Filter results by enabled.

filter[deployed]stringOptional

Filter results by deployed.

filter[versions.id]stringOptional

Filter results by versions.id.

filter[,]stringOptional

Filter results by ,.

filter[versions]stringOptional

Filter results by versions.

filter[id]stringOptional

Filter results by id.

includestringOptional

Comma-separated list of relationships to include. Available: latestVersion, latestVersion.variables, deployedVersion, deployedVersion.variables, latestDeployedVersion, latestDeployedVersion.variables, latestDeployedVersion.steps.connector.authenticationImplementation.system, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion.script, latestDeployedVersion.steps.scriptVersion.script, latestDeployedVersion.steps.cache, latestDeployedVersion.steps.dataPool, deployedVersion.steps.connector.authenticationImplementation.system, deployedVersion.steps.connector.authenticationImplementation.system.endpoints, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script

sortstringOptional

Sort field. Prefix with - for descending. Available: name, enabled_at, created_at, id

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/flows
GET /api/v1/flows HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 0,
      "name": "string",
      "description": "string",
      "is_enabled": false,
      "enabled_at": null,
      "layout_direction": "TB",
      "use_queued_time": false,
      "remove_failed_payloads": false,
      "priority": 0,
      "prod_flag": false,
      "labels": [],
      "notification_group_ids": [],
      "webhooks": [],
      "callbacks": [],
      "message_brokers": [],
      "message_broker_queues": [],
      "created_at": "2024-01-01T00:00:00.000000Z",
      "updated_at": "2024-01-01T00:00:00.000000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://core.wearepatchworks.com/api/v1/flows",
    "per_page": 15,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://core.wearepatchworks.com/api/v1/flows?page=1",
    "last": "https://core.wearepatchworks.com/api/v1/flows?page=1",
    "prev": null,
    "next": null
  }
}

Create Flow

post

Create a new process flow.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow.name

string

flow.description

string

flow.prod_flag

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
Responses
200

Successful response

application/json
post/api/v1/flows
POST /api/v1/flows HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "flow": {
    "name": "string",
    "description": "string",
    "prod_flag": false
  }
}
{
  "data": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_enabled": false,
    "enabled_at": null,
    "layout_direction": "TB",
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false,
    "labels": [],
    "notification_group_ids": [],
    "webhooks": [],
    "callbacks": [],
    "message_brokers": [],
    "message_broker_queues": [],
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z"
  }
}

Get Flow

get

Retrieves details for a single process flow by the flow id.

Available Includes

These are the includes that can be used to include addition related data in the results. Please see the section on using includes for more details.

  • latestVersion

  • latestVersion_count

  • latestVersionExists

  • latestVersion.variables

  • deployedVersion

  • deployedVersion_count

  • deployedVersionExists

  • deployedVersion.variables

  • currentVersion

  • currentVersion_count

  • currentVersionExists

  • currentVersion.latestRun

  • currentVersion.steps

  • currentVersion.steps.connector

  • currentVersion.steps.connector.authenticationImplementation

  • currentVersion.steps.connector.authenticationImplementation.system

  • currentVersion.steps.variables

  • currentVersion.steps.cache

  • currentVersion.steps.dataPool

  • currentVersion.steps.scriptVersion

  • currentVersion.steps.scriptVersion.script

  • currentVersion.schedules

  • currentVersion.variables

  • versions

  • versions_count

  • versionsExists

  • versions.schedules

  • versions.variables

  • versions.deployedByUser

  • labels

  • labels_count

  • labelsExists

  • webhooks

  • webhooks_count

  • webhooksExists

  • callbacks

  • callbacks_count

  • callbacksExists

  • notificationGroups

  • notificationGroups_count

  • notificationGroupsExists

  • messageBrokers

  • messageBrokers_count

  • messageBrokersExists

  • messageBrokerQueues

  • messageBrokerQueues_count

  • messageBrokerQueuesExists

  • deployments

  • deployments_count

  • deploymentsExists

  • deployments.virtualEnvironment

  • deployments.flowVersion

  • deployments.package

  • deployments.enabledBy

Available Filters

These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.

  • name

  • marketplace_app_id

  • labelled

  • enabled

  • deployed

Available Fields

These are the fields that can be requested to limit the data returned. Please see the section on using fields for more details.

  • flows.id

  • flows.name

  • flows.enabled_at

Available Sorts

These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.

  • name

  • enabled_at

  • created_at

  • id

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Query parameters
filter[name]stringOptional

Filter results by name.

filter[marketplace_app_id]stringOptional

Filter results by marketplace_app_id.

filter[blueprint_id]stringOptional

Filter results by blueprint_id.

filter[blueprint_version_number]stringOptional

Filter results by blueprint_version_number.

filter[labelled]stringOptional

Filter results by label id.

filter[enabled]stringOptional

Filter results by enabled.

filter[deployed]stringOptional

Filter results by deployed.

filter[versions.id]stringOptional

Filter results by versions.id.

filter[,]stringOptional

Filter results by ,.

filter[versions]stringOptional

Filter results by versions.

filter[id]stringOptional

Filter results by id.

includestringOptional

Comma-separated list of relationships to include. Available: latestVersion, latestVersion.variables, deployedVersion, deployedVersion.variables, latestDeployedVersion, latestDeployedVersion.variables, latestDeployedVersion.steps.connector.authenticationImplementation.system, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script, latestDeployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion.script, latestDeployedVersion.steps.scriptVersion.script, latestDeployedVersion.steps.cache, latestDeployedVersion.steps.dataPool, deployedVersion.steps.connector.authenticationImplementation.system, deployedVersion.steps.connector.authenticationImplementation.system.endpoints, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.postScriptVersion, deployedVersion.steps.connector.authenticationImplementation.system.endpoints.preScriptVersion.script

sortstringOptional

Sort field. Prefix with - for descending. Available: name, enabled_at, created_at, id

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/flows/{flow}
GET /api/v1/flows/{flow} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_enabled": false,
    "enabled_at": null,
    "layout_direction": "TB",
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false,
    "labels": [],
    "notification_group_ids": [],
    "webhooks": [],
    "callbacks": [],
    "message_brokers": [],
    "message_broker_queues": [],
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z"
  }
}

Update Flow

put

Updates an existing process flow.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow.name

string

flow.description

string

flow.enabled_at

labels

labels.*.id

notification_groups

flow.use_queued_time

flow.remove_failed_payloads

flow.priority

integer

flow.prod_flag

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Body
notification_groupsstringOptional
Responses
200

Successful response

application/json
put/api/v1/flows/{flow}
PUT /api/v1/flows/{flow} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 190

{
  "flow": {
    "name": "string",
    "description": "string",
    "enabled_at": null,
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false
  },
  "labels": [],
  "notification_groups": []
}
{
  "data": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_enabled": false,
    "enabled_at": null,
    "layout_direction": "TB",
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false,
    "labels": [],
    "notification_group_ids": [],
    "webhooks": [],
    "callbacks": [],
    "message_brokers": [],
    "message_broker_queues": [],
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z"
  }
}

Delete Flow

delete

Deletes a given process flow.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Responses
200

Successful response

application/json
messagestringOptional
delete/api/v1/flows/{flow}
DELETE /api/v1/flows/{flow} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "string"
}

Export Flow

post

Export process flow as a JSON file.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_id

integer

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
flow_idintegerRequired
Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/export
POST /api/v1/flows/export HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "flow_id": 0
}
{
  "metadata": {
    "company_name": "string",
    "flow_name": "string",
    "exported_at": "2024-01-01T00:00:00+00:00",
    "exported_by": "string",
    "flow_id": 0,
    "flow_version": 0,
    "import_summary": {
      "setup_required": {
        "connectors_needing_config": 0,
        "auth_implementations_needing_credentials": 0,
        "variables_needing_values": 0
      },
      "dependencies": [],
      "imported_resources": [],
      "next_steps": []
    }
  },
  "flow": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_enabled": false,
    "enabled_at": null,
    "layout_direction": "string",
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false,
    "labels": [],
    "webhooks": [],
    "callbacks": [],
    "versions": []
  },
  "systems": [],
  "scripts": [],
  "dependencies": []
}

Import Flow

post

Import a previously exported process flow (from a JSON file).

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow

metadata

as_marketplace

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
flowstringRequired
metadatastringRequired
as_marketplacestringOptional
Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/import
POST /api/v1/flows/import HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "flow": "string",
  "metadata": "string",
  "as_marketplace": null
}
{
  "metadata": {
    "company_name": "string",
    "flow_name": "string",
    "exported_at": "2024-01-01T00:00:00+00:00",
    "exported_by": "string",
    "flow_id": 0,
    "flow_version": 0,
    "import_summary": {
      "setup_required": {
        "connectors_needing_config": 0,
        "auth_implementations_needing_credentials": 0,
        "variables_needing_values": 0
      },
      "dependencies": [],
      "imported_resources": [],
      "next_steps": []
    }
  },
  "flow": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_enabled": false,
    "enabled_at": null,
    "layout_direction": "string",
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false,
    "labels": [],
    "webhooks": [],
    "callbacks": [],
    "versions": []
  },
  "systems": [],
  "scripts": [],
  "dependencies": []
}

Initialise Flow Manually

post

Initialise a process flow manually - the equivalent of using the initialise flow button on the canvas. The flow starts immediately (it is not added to a queue). You can make up to 10 requests to this endpoint per minute. If you are implementing an automated, programmtic integration with Patchworks with greater request volumes, consider using the Start Flow endpoint instead.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_id

integer

version_id

integer

payload

string

flow_variables

virtual_environment_id

integer

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_idstringRequired

The unique identifier of the flow.

version_idstringRequired

The unique identifier of the version.

Body
flow_idintegerRequired
version_idintegerOptional
payloadstringRequired
flow_variablesstringOptional
virtual_environment_idintegerOptional
Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/{flow_id}/manual/{version_id}
POST /api/v1/flows/{flow_id}/manual/{version_id} HTTP/1.1
Host: start.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 99

{
  "flow_id": 0,
  "version_id": 0,
  "payload": "string",
  "flow_variables": null,
  "virtual_environment_id": null
}
{
  "message": "string",
  "data": {
    "flow_run_id": "string"
  }
}

Start Flow

post

Intended for programmatic, system-to-system integrations, where flows are scheduled via the API. In this case, flow runs are added to a queue and picked up when concurrency is available.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_id

integer

version_id

integer

payload

string

flow_variables

virtual_environment_id

integer

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_idstringRequired

The unique identifier of the flow.

version_idstringRequired

The unique identifier of the version.

Body
flow_idintegerRequired
version_idintegerOptional
payloadstringRequired
flow_variablesstringOptional
virtual_environment_idintegerOptional
Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/{flow_id}/start/{version_id}
POST /api/v1/flows/{flow_id}/start/{version_id} HTTP/1.1
Host: start.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 99

{
  "flow_id": 0,
  "version_id": 0,
  "payload": "string",
  "flow_variables": null,
  "virtual_environment_id": null
}
{
  "message": "string",
  "data": {
    "scheduled_flow_id": "string"
  }
}

Duplicate Flow

post

Duplicates - i.e. clones - an existing process flow. This is the API equivalent of what happens when you use the duplicate option in the dashboard. The result is a new process flow in the same company, with the same name appended with an incremental number.

Validation Rules

These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements

Field
Type
Required

flow_version_id

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Body
flow_version_idstringRequired
Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/{flow}/duplicate
POST /api/v1/flows/{flow}/duplicate HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "flow_version_id": "0"
}
{
  "data": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_enabled": false,
    "enabled_at": null,
    "layout_direction": "TB",
    "use_queued_time": false,
    "remove_failed_payloads": false,
    "priority": 0,
    "prod_flag": false,
    "labels": [],
    "notification_group_ids": [],
    "webhooks": [],
    "callbacks": [],
    "message_brokers": [],
    "message_broker_queues": [],
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z"
  }
}

Update Flow Layout Direction

patch

Toggles the canvas layout direction for a specific flow. If the flow is currently set to vertical then it switches to horizontal, and vice versa.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowstringRequired

The flow identifier.

Responses
200

Successful response

No content

patch/api/v1/flows/{flow}/layout-direction
PATCH /api/v1/flows/{flow}/layout-direction HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Update Flow Label Display Order

patch

Apply a global label display order across all flows. Accepts an ordered array of label IDs and updates the position on every flow that has those labels attached. Only labels already attached to a flow are affected — label attachment is not changed.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Body
label_idsstring[]Required

Ordered array of label IDs. The position of each label is set to its index in this array.

Responses
200

Label order updated

application/json
objectOptional
patch/api/v1/flows/labels/reorder
PATCH /api/v1/flows/labels/reorder HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "label_ids": [
    "label_abc123",
    "label_def456",
    "label_ghi789"
  ]
}
{
  "message": "Label order updated."
}

Initialise Flow Manually (Raw)

post

The raw variant of the Initialise Flow Manually endpoint. The flow starts immediately and is not added to a queue.

Instead of wrapping the payload inside a payload string field, the entire request body is passed directly as the JSON payload to the flow. Pass flow_variables and virtual_environment_id as query parameters if needed.

You can make up to 10 requests to this endpoint per minute. If you are implementing an automated, programmatic integration with Patchworks with greater request volumes, consider using the Start Flow (Raw) endpoint instead.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_idintegerRequired

The unique identifier of the flow.

version_idintegerRequired

The unique identifier of the flow version. Defaults to the latest deployed version.

Query parameters
flow_variablesobjectOptional

Key-value pairs of flow variables to pass to the flow run.

virtual_environment_idintegerOptional

The ID of the virtual environment to use for the flow run.

Body
objectOptional

Any valid JSON object. This is passed directly as the payload to the flow — there is no wrapping payload field.

Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/{flow_id}/manual/raw/{version_id}
POST /api/v1/flows/{flow_id}/manual/raw/{version_id} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "order_id": 1001,
  "status": "new"
}
{
  "message": "Flow initialised.",
  "data": {
    "flow_run_id": "01hvh37yjs9kt7dd1t27azryvb"
  }
}

Start Flow (Raw)

post

The raw variant of the Start Flow endpoint. Intended for programmatic, system-to-system integrations where flows are scheduled via the API. Flow runs are added to a queue and picked up when concurrency is available.

Instead of wrapping the payload inside a payload string field, the entire request body is passed directly as the JSON payload to the flow. Pass flow_variables and virtual_environment_id as query parameters if needed.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flow_idintegerRequired

The unique identifier of the flow.

version_idintegerRequired

The unique identifier of the flow version. Defaults to the latest deployed version.

Query parameters
flow_variablesobjectOptional

Key-value pairs of flow variables to pass to the flow run.

virtual_environment_idintegerOptional

The ID of the virtual environment to use for the flow run.

Body
objectOptional

Any valid JSON object. This is passed directly as the payload to the flow — there is no wrapping payload field.

Responses
200

Successful response

application/json
objectOptional
post/api/v1/flows/{flow_id}/start/raw/{version_id}
POST /api/v1/flows/{flow_id}/start/raw/{version_id} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "order_id": 1001,
  "status": "new"
}
{
  "message": "Flow scheduled.",
  "data": {
    "scheduled_flow_id": "01hvh0ztea5zzjqqfd0a8a5h8y"
  }
}

List Flow Changelogs

get

Return a paginated list of changelog entries for a flow, ordered most recent first.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowintegerRequired

The unique identifier of the flow.

Query parameters
per_pageintegerOptional

Number of results per page.

Responses
200

Successful response

application/json
objectOptional
get/api/v1/flows/{flow}/changelogs
GET /api/v1/flows/{flow}/changelogs HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 1,
      "flow_version_id": 5,
      "flow_id": 12,
      "summary": "Updated mapping step",
      "description": "Changed output field from order_id to external_id.",
      "saved_by": 42,
      "saved_by_user": {
        "id": 42,
        "name": "Jane Smith",
        "email": "[email protected]"
      },
      "created_at": "2024-06-01T10:00:00.000000Z",
      "updated_at": "2024-06-01T10:00:00.000000Z"
    }
  ]
}

Move Flow to Folder

patch

Move a flow into a folder, or remove it from its current folder by passing null.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowintegerRequired

The unique identifier of the flow.

Body
flow_folder_idinteger · nullableOptional

The ID of the destination folder. Pass null to remove the flow from its current folder.

Responses
200

Successful response

application/json
objectOptional
patch/api/v1/flows/{flow}/folder
PATCH /api/v1/flows/{flow}/folder HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20

{
  "flow_folder_id": 3
}
{
  "success": true
}

List Flow Labels

get

List all labels attached to a flow, ordered alphabetically by name.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
flowintegerRequired

The unique identifier of the flow.

Query parameters
filter[name]stringOptional

Filter results by name.

includestringOptional

Comma-separated list of relationships to include. Available: name, colour

sortstringOptional

Sort field. Prefix with - for descending. Available: created_at

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
objectOptional
get/api/v1/flows/{flow}/labels
GET /api/v1/flows/{flow}/labels HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "label_abc123",
      "name": "Production",
      "colour": "#22c55e"
    },
    {
      "id": "label_def456",
      "name": "Shopify",
      "colour": "#3b82f6"
    }
  ]
}

Last updated

Was this helpful?