Clone Automation

Clone an existing automation template into a specific WhatsApp channel.

Endpoint

POST /api/automation-template/import-automation

Base URL

https://api.rampwin.com

Description

This API allows you to clone a predefined automation template and attach it to a specific channel.

Use Cases

  • Reuse existing automation workflows
  • Quickly deploy automations across channels
  • Standardize automation setup

Authentication

This API supports:

  • API Key

Headers

HeaderTypeRequiredDescription
Content-TypestringYesapplication/json
AcceptstringYesapplication/json, text/plain, /
x-api-keystringYesYour Rampwin API key

Request Body

FieldTypeRequiredDescription
idnumberYesAutomation template ID
namestringYesName for the imported automation
channel_idstringYesWhatsApp channel ID

Example Request

curl --location 'https://api.rampwin.com/api/automation-template/import-automation' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json, text/plain, */*' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
  "id": 12345,
  "name": "Welcome Automation",
  "channel_id": "YOUR_CHANNEL_ID"
}'

Response

Success (200)

{
  "success": true,
  "message": "Automation imported successfully",
  "data": {
    "automation_id": "auto_12345",
    "name": "Welcome Automation",
    "channel_id": "channel_id"
  }
}

Error (400)

{
  "success": false,
  "message": "Invalid template ID or channel ID"
}

Business Logic Notes

  • The id must be a valid existing automation template
  • The automation will be cloned/imported, not modified from the original
  • Imported automation is linked to the provided channel_id
  • You can rename automation using the name field during import

Common Errors

ErrorDescription
Invalid template IDTemplate does not exist
Invalid channel IDChannel not found
UnauthorizedInvalid API key