Skip to main content
POST
/
api
/
marketplace
/
{id}
/
import-to-automations
Import SMS template to multiple automations
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"
  ]
}
'
{
  "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
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

application/json
automationIds
string[]
required

Mongo ObjectIds of caller-owned automations to receive the template body; each must be SMS-enabled and is processed in a single Mongo transaction.

Required array length: 1 - 50 elements

Response

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.

success
boolean
required
results
object[]
required
stats
object
required
message
string