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
| Header | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Yes | application/json |
| Accept | string | Yes | application/json, text/plain, / |
| x-api-key | string | Yes | Your Rampwin API key |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | Yes | Automation template ID |
| name | string | Yes | Name for the imported automation |
| channel_id | string | Yes | WhatsApp 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
idmust 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
namefield during import
Common Errors
| Error | Description |
|---|---|
| Invalid template ID | Template does not exist |
| Invalid channel ID | Channel not found |
| Unauthorized | Invalid API key |
