curl --request POST \
--url https://your-instance.example.com/api/marketplace/{id}/import-to-automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automationIds": [
"5f7b1c2e8a1d4e0012c3b4a5",
"6a8c2d3f9b1e5a0023d4c5b6"
]
}
'import requests
url = "https://your-instance.example.com/api/marketplace/{id}/import-to-automations"
payload = { "automationIds": ["5f7b1c2e8a1d4e0012c3b4a5", "6a8c2d3f9b1e5a0023d4c5b6"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({automationIds: ['5f7b1c2e8a1d4e0012c3b4a5', '6a8c2d3f9b1e5a0023d4c5b6']})
};
fetch('https://your-instance.example.com/api/marketplace/{id}/import-to-automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/marketplace/{id}/import-to-automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'automationIds' => [
'5f7b1c2e8a1d4e0012c3b4a5',
'6a8c2d3f9b1e5a0023d4c5b6'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/marketplace/{id}/import-to-automations"
payload := strings.NewReader("{\n \"automationIds\": [\n \"5f7b1c2e8a1d4e0012c3b4a5\",\n \"6a8c2d3f9b1e5a0023d4c5b6\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/marketplace/{id}/import-to-automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automationIds\": [\n \"5f7b1c2e8a1d4e0012c3b4a5\",\n \"6a8c2d3f9b1e5a0023d4c5b6\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/marketplace/{id}/import-to-automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"automationIds\": [\n \"5f7b1c2e8a1d4e0012c3b4a5\",\n \"6a8c2d3f9b1e5a0023d4c5b6\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Template imported to 2 of 3 automations",
"results": [
{
"automationId": "64a1b2c3d4e5f6001234567a",
"automationName": "New lead — first reply",
"success": true,
"changes": {
"smsEnabled": true,
"phoneNumber": "+14165550100",
"message": "Hi {{contact.firstName}}!"
}
},
{
"automationId": "64a1b2c3d4e5f6001234567b",
"automationName": "Tour follow-up",
"success": false,
"error": "SMS notification already enabled and conflicts with existing settings"
}
],
"stats": {
"total": 3,
"successful": 2,
"failed": 1
}
}{
"success": true,
"message": "Template imported to 2 of 3 automations",
"results": [
{
"automationId": "64a1b2c3d4e5f6001234567a",
"automationName": "New lead — first reply",
"success": true,
"changes": {
"smsEnabled": true,
"phoneNumber": "+14165550100",
"message": "Hi {{contact.firstName}}!"
}
},
{
"automationId": "64a1b2c3d4e5f6001234567b",
"automationName": "Tour follow-up",
"success": false,
"error": "SMS notification already enabled and conflicts with existing settings"
}
],
"stats": {
"total": 3,
"successful": 2,
"failed": 1
}
}{
"success": true,
"message": "Template imported to 2 of 3 automations",
"results": [
{
"automationId": "64a1b2c3d4e5f6001234567a",
"automationName": "New lead — first reply",
"success": true,
"changes": {
"smsEnabled": true,
"phoneNumber": "+14165550100",
"message": "Hi {{contact.firstName}}!"
}
},
{
"automationId": "64a1b2c3d4e5f6001234567b",
"automationName": "Tour follow-up",
"success": false,
"error": "SMS notification already enabled and conflicts with existing settings"
}
],
"stats": {
"total": 3,
"successful": 2,
"failed": 1
}
}{
"error": "Marketplace item not found"
}{
"error": "Marketplace item not found"
}Import SMS template to multiple automations
Import the SMS template body of a marketplace listing into one or more automations owned by the caller, in a single Mongo transaction. Each target automation must be SMS-enabled; per-automation failures are returned in failed[] with a 207 partial-success status when at least one target imported cleanly.
curl --request POST \
--url https://your-instance.example.com/api/marketplace/{id}/import-to-automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automationIds": [
"5f7b1c2e8a1d4e0012c3b4a5",
"6a8c2d3f9b1e5a0023d4c5b6"
]
}
'import requests
url = "https://your-instance.example.com/api/marketplace/{id}/import-to-automations"
payload = { "automationIds": ["5f7b1c2e8a1d4e0012c3b4a5", "6a8c2d3f9b1e5a0023d4c5b6"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({automationIds: ['5f7b1c2e8a1d4e0012c3b4a5', '6a8c2d3f9b1e5a0023d4c5b6']})
};
fetch('https://your-instance.example.com/api/marketplace/{id}/import-to-automations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/marketplace/{id}/import-to-automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'automationIds' => [
'5f7b1c2e8a1d4e0012c3b4a5',
'6a8c2d3f9b1e5a0023d4c5b6'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/marketplace/{id}/import-to-automations"
payload := strings.NewReader("{\n \"automationIds\": [\n \"5f7b1c2e8a1d4e0012c3b4a5\",\n \"6a8c2d3f9b1e5a0023d4c5b6\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/marketplace/{id}/import-to-automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automationIds\": [\n \"5f7b1c2e8a1d4e0012c3b4a5\",\n \"6a8c2d3f9b1e5a0023d4c5b6\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/marketplace/{id}/import-to-automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"automationIds\": [\n \"5f7b1c2e8a1d4e0012c3b4a5\",\n \"6a8c2d3f9b1e5a0023d4c5b6\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Template imported to 2 of 3 automations",
"results": [
{
"automationId": "64a1b2c3d4e5f6001234567a",
"automationName": "New lead — first reply",
"success": true,
"changes": {
"smsEnabled": true,
"phoneNumber": "+14165550100",
"message": "Hi {{contact.firstName}}!"
}
},
{
"automationId": "64a1b2c3d4e5f6001234567b",
"automationName": "Tour follow-up",
"success": false,
"error": "SMS notification already enabled and conflicts with existing settings"
}
],
"stats": {
"total": 3,
"successful": 2,
"failed": 1
}
}{
"success": true,
"message": "Template imported to 2 of 3 automations",
"results": [
{
"automationId": "64a1b2c3d4e5f6001234567a",
"automationName": "New lead — first reply",
"success": true,
"changes": {
"smsEnabled": true,
"phoneNumber": "+14165550100",
"message": "Hi {{contact.firstName}}!"
}
},
{
"automationId": "64a1b2c3d4e5f6001234567b",
"automationName": "Tour follow-up",
"success": false,
"error": "SMS notification already enabled and conflicts with existing settings"
}
],
"stats": {
"total": 3,
"successful": 2,
"failed": 1
}
}{
"success": true,
"message": "Template imported to 2 of 3 automations",
"results": [
{
"automationId": "64a1b2c3d4e5f6001234567a",
"automationName": "New lead — first reply",
"success": true,
"changes": {
"smsEnabled": true,
"phoneNumber": "+14165550100",
"message": "Hi {{contact.firstName}}!"
}
},
{
"automationId": "64a1b2c3d4e5f6001234567b",
"automationName": "Tour follow-up",
"success": false,
"error": "SMS notification already enabled and conflicts with existing settings"
}
],
"stats": {
"total": 3,
"successful": 2,
"failed": 1
}
}{
"error": "Marketplace item not found"
}{
"error": "Marketplace item not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Mongo ObjectIds of caller-owned automations to receive the template body; each must be SMS-enabled and is processed in a single Mongo transaction.
1 - 50 elementsResponse
Template imported to all automations
Mixed success/partial-success/all-failure envelope. HTTP 200 = all imported; HTTP 207 = some imported; HTTP 400 = none imported. Inspect stats and per-target results[] for detail.