POST
/
integrations
/
{templateId}
/
clone
Clone an integration template
curl --request POST \
  --url https://api.callab.ai/v1/integrations/{templateId}/clone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "flow_name": "<string>",
  "tag_name": "<string>",
  "category_name": "<string>",
  "dynamicVariables": {}
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": "123e4567-e89b-12d3-a456-426614174001",
  "company_id": "123e4567-e89b-12d3-a456-426614174001",
  "workspace_id": "default",
  "name": "VTIGER BRING CONTACTS",
  "logo": "<string>",
  "retry_delay": 5,
  "retry_delay_unit": "seconds",
  "max_retries": 3,
  "status": "scheduled",
  "created_at": "2023-10-01T12:34:56Z",
  "updated_at": "2023-10-02T12:34:56Z",
  "deleted_at": "2023-10-03T12:34:56Z",
  "executions": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "status": "scheduled",
      "attempt_number": 123,
      "next_retry_at": "2023-11-07T05:31:56Z",
      "executed_at": "2023-11-07T05:31:56Z",
      "finished_at": "2023-11-07T05:31:56Z",
      "error_message": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "steps": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "step_number": 123,
      "webhook_url": "<string>",
      "webhook_url_params": {},
      "webhook_method": "GET",
      "webhook_headers": {},
      "webhook_body": {},
      "webhook_timeout": 123,
      "depends_on_step": 123,
      "retry_limit": 3,
      "timeout": 123,
      "success_condition": {},
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z"
    }
  ],
  "is_template": false,
  "flow_direction": "inbound",
  "flow_mapping": {},
  "predefinedVariables": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "variables": [
    {
      "name": "<string>",
      "location": "<string>",
      "stepId": 123,
      "type": "<string>",
      "dataType": "<string>",
      "customValue": "<string>"
    }
  ],
  "tag_name": "lead1",
  "category_name": "all leads"
}
The Clone Integration endpoint creates a copy of an existing integration flow. This is useful when you want to create a similar flow with minor modifications or test changes without affecting the original flow.

Effects

  • Creates a new integration flow with a unique ID
  • Copies all configuration settings from the source flow
  • Sets the initial status to SCHEDULED
  • Maintains the same steps and variable definitions
  • Creates fresh execution history

Common Use Cases

  • Creating test versions of production flows
  • Setting up similar flows for different environments
  • Backup before major changes
  • Template-based flow creation

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

templateId
string<uuid>
required

ID of the integration template (or existing flow) to clone.

Body

application/json

Data for the new cloned flow.

Data required to clone an integration or webhook template.

flow_name
string
required

The desired name for the new cloned flow.

tag_name
string
required

Tag for the new cloned flow.

category_name
string
required

Category for the new cloned flow.

dynamicVariables
object | null

Optional dynamic variables (key-value pairs) to override in the cloned flow.

Response

Integration flow cloned successfully.

Represents an integration flow.

id
string<uuid>
required

Unique identifier for the flow

Example:

"123e4567-e89b-12d3-a456-426614174000"

created_by
string<uuid>
required

ID of the user who created the flow

Example:

"123e4567-e89b-12d3-a456-426614174001"

company_id
string<uuid>
required

ID of the company who created the flow

Example:

"123e4567-e89b-12d3-a456-426614174001"

workspace_id
string
default:default
required

ID of the workspace the flow belongs to. Defaults to "default" if not specified.

Example:

"default"

name
string
required

Name of the flow

Example:

"VTIGER BRING CONTACTS"

Logo of the the flow

retry_delay
integer
required

Retry delay in specified units

Example:

5

retry_delay_unit
enum<string>
required

Unit of retry delay

Available options:
seconds,
minutes,
hours,
days
max_retries
integer
default:3
required

Maximum number of retries

Example:

3

status
enum<string>
default:scheduled
required

Current status of the flow

Available options:
scheduled,
in-progress,
running,
failed,
stopped,
deleted
created_at
string<date-time>
required

Timestamp when the flow was created

Example:

"2023-10-01T12:34:56Z"

updated_at
string<date-time>
required

Timestamp when the flow was last updated

Example:

"2023-10-02T12:34:56Z"

executions
object[]
required

List of executions associated with the flow

steps
object[]
required

List of steps associated with the flow

is_template
boolean
default:false
required

Indicates if the flow is a template

Example:

false

flow_direction
enum<string>
default:inbound
required

Direction of the flow

Available options:
inbound,
outbound
flow_mapping
object
required

Flow mapping configuration (any JSON object structure)

tag_name
string
required

Tag of the flow

Example:

"lead1"

category_name
string
required

Category of the flow

Example:

"all leads"

deleted_at
string<date-time> | null

Timestamp when the flow was deleted

Example:

"2023-10-03T12:34:56Z"

predefinedVariables
object[] | null

Predefined variables for the flow

variables
object[] | null

Variables used in flow steps