---
title: "Duplicate Automation"
method: POST
path: "/automations/{automation_id}/duplicate"
tags: ["automations"]
---

# Duplicate Automation

`POST /automations/{automation_id}/duplicate`

## Request

- Base URL: `https://api.reeldrop.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.reeldrop.io/automations/{automation_id}/duplicate`
- Auth: HTTP bearer

Clone an automation, config and all, as a new paused one — see
automation_service.duplicate_automation.

## Path parameters

- `automation_id` string, required

## Query parameters

- `workspace_id` string, nullable: Workspace this request applies to. Defaults to the caller's personal workspace. Must be one the caller belongs to.

## Response `201`

Successful Response

- AutomationOut
  - `id` string, required
  - `workspace_id` string, required
  - `ig_user_id` string, required
  - `name` string, required
  - `status` string, required
  - `trigger` AutomationTriggerOutput, required
    - `type` 'comment' | 'dm' | 'story_reply' | 'ai_dm' | 'ice_breaker', required
    - `post_target` 'all' | 'specific' | 'scheduled' | 'attach_later'
    - `post_ids` string[]
    - `keywords` string[]
    - `keyword_match` 'exact' | 'contains' | 'any'
    - `ice_breakers` string[]
    - `ice_breaker_replies` IceBreakerReplyOutput[]
      - `messages` string[]
      - `buttons` MessageButton[]
        - `type` 'web_url' | 'postback'
        - `title` string, required
        - `url` string
        - `payload` string
        - `kind` 'link' | 'pdf' | 'cards'
        - `asset_key` string
        - `asset_name` string
        - `cards` MessageCard[]
          - `title` string, required
          - `subtitle` string
          - `image_url` string
          - `button_title` string
          - `url` string
  - `actions` AutomationActionOutput[], required
    - `type` 'public_reply' | 'private_dm', required
    - `messages` string[]
    - `buttons` MessageButton[]
      - `type` 'web_url' | 'postback'
      - `title` string, required
      - `url` string
      - `payload` string
      - `kind` 'link' | 'pdf' | 'cards'
      - `asset_key` string
      - `asset_name` string
      - `cards` MessageCard[]
        - `title` string, required
        - `subtitle` string
        - `image_url` string
        - `button_title` string
        - `url` string
    - `reply_limit` integer, nullable
  - `opening_message` OpeningMessage, required: Gated flow: send this card with a tappable button; deliver the private_dm only on tap.
    - `enabled` boolean
    - `text` string
    - `button_label` string
  - `ask_for_follow` boolean, required
  - `follow_gate_message` string, required
  - `follow_gate_button_label` string, required
  - `follow_up` AutomationFollowUp, required
    - `enabled` boolean
    - `delay_seconds` integer
    - `message` string
  - `ai` AiDmConfig, required: The brief for an ai_dm automation: what the AI is trying to do, what it is allowed to know, and where it has to stop. Only read when trigger.type == "ai_dm". It is stored on every automation regardless so that toggling the trigger type in the builder never destroys a paragraph of typed context.
    - `goal` string
    - `context` string
    - `exit_condition` string
    - `max_turns` integer
    - `inquiries_only` boolean
    - `first_message_enabled` boolean
    - `first_message` string
    - `handoff_message` string
    - `fallback_message` string
    - `tone` 'friendly' | 'professional' | 'playful' | 'concise'
    - `link` string
  - `stats` AutomationStats, required
    - `dms_sent` integer
    - `dms_failed` integer
    - `public_replies_sent` integer
    - `events_received` integer
    - `button_taps` integer
    - `replies_received` integer
    - `follow_ups_sent` integer
    - `follow_ups_missed_window` integer
    - `ai_replies_sent` integer
    - `ai_conversations` integer
    - `ai_handoffs` integer
    - `ai_failures` integer
    - `ai_replies_skipped` integer
    - `ai_quota_blocks` integer
    - `ai_link_violations` integer
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `public_reply_usage` integer, nullable
  - `ice_breakers_synced_at` string, date-time, nullable
  - `ice_breakers_sync_error` string, nullable
  - `stalled` AutomationStall: Why an active automation is not firing, for the automations list. Written by the engine (services/automation_engine._record_skip) and reset the moment the automation matches again, so `skips` reads as "since this last worked" rather than as a lifetime total.
    - `reason` string, required
    - `skips` integer, required
    - `last_media_id` string, nullable
    - `last_at` string, date-time, required
  - `paused_reason` string, nullable
  - `deleted_post_ids` string[]

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/reeldrop/apis/reeldrop-api.md) · [All operations](https://skmtc.dev/reeldrop/apis/reeldrop-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reeldrop/apis/reeldrop-api/revisions/d3b2a338556c?raw)
