---
title: "Update an automation flow"
method: PATCH
path: "/api/v1/automations/{id}"
tags: ["automation"]
---

# Update an automation flow

`PATCH /api/v1/automations/{id}`

## Request

- Base URL: `https://api.bundle.social`
- URL: `https://api.bundle.social/api/v1/automations/{id}`
- Auth: API key in header `x-api-key`

Update the name, trigger or steps of an automation flow. Changes to a published flow take effect on the next matching event.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `platformScope` 'INSTAGRAM' | 'FACEBOOK' | 'BOTH' | 'TIKTOK'
  - `definition` object
    - `trigger` object, required
      - `keywords` string[]
      - `matchMode` 'ANY' | 'ALL'
      - `caseSensitive` boolean
      - `senderExternalIds` string[]
      - `payloads` string[]
      - `actionDelaySeconds` integer
      - `id` string
      - `type` 'COMMENT_CREATED' | 'DM_RECEIVED' | 'QUICK_REPLY_CLICKED' | 'BUTTON_CLICKED' | 'MANUAL_TEST', required
      - `platform` 'INSTAGRAM' | 'FACEBOOK' | 'TIKTOK', required
      - `socialAccountId` string, required
      - `postId` string, nullable
    - `steps` union[], required
      - union
        - object
          - `id` string
          - `type` 'CONDITION', required
          - `conditions` object[], required
            - `id` string
            - `field` 'TEXT' | 'PAYLOAD' | 'PLATFORM' | 'SENDER_ID', required
            - `operator` 'CONTAINS' | 'EQUALS' | 'MATCHES_ANY', required
            - `value` string, required
            - `caseSensitive` boolean
        - object
          - `id` string
          - `type` 'SEND_MESSAGE', required
          - `message` object, required
            - `text` string
            - `attachments` object[]
              - …
            - `quickReplies` object[]
              - …
            - `buttons` union[]
              - …
            - `carousel` object
              - …
        - object
          - `id` string
          - `type` 'SEND_PRIVATE_REPLY', required
          - `message` object, required
            - `text` string
            - `attachments` object[]
              - …
            - `quickReplies` object[]
              - …
            - `buttons` union[]
              - …
            - `carousel` object
              - …
        - object
          - `id` string
          - `type` 'SEND_PUBLIC_COMMENT_REPLY', required
          - `text` string, required
        - object
          - `id` string
          - `type` 'LIKE_COMMENT', required
        - object
          - `id` string
          - `type` 'ARCHIVE_CONVERSATION', required
        - object
          - `id` string
          - `type` 'OPEN_CONVERSATION', required

## Response `200`

200

- object
  - `id` string, required
  - `teamId` string, required
  - `organizationId` string, nullable
  - `name` string, required
  - `status` 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED', required
  - `platformScope` 'INSTAGRAM' | 'FACEBOOK' | 'BOTH' | 'TIKTOK', required
  - `createdByUserId` string, nullable
  - `createdAt` string, date-time, nullable, required
  - `updatedAt` string, date-time, nullable, required
  - `deletedAt` string, date-time, nullable
  - `draftVersion` object
    - `id` string, required
    - `flowId` string, required
    - `version` number, required
    - `status` 'DRAFT' | 'PUBLISHED' | 'RETIRED', required
    - `definition` object, required
      - `trigger` object, required
        - `keywords` string[]
        - `matchMode` 'ANY' | 'ALL'
        - `caseSensitive` boolean
        - `senderExternalIds` string[]
        - `payloads` string[]
        - `actionDelaySeconds` integer
        - `id` string
        - `type` 'COMMENT_CREATED' | 'DM_RECEIVED' | 'QUICK_REPLY_CLICKED' | 'BUTTON_CLICKED' | 'MANUAL_TEST', required
        - `platform` 'INSTAGRAM' | 'FACEBOOK' | 'TIKTOK', required
        - `socialAccountId` string, required
        - `postId` string, nullable
      - `steps` union[], required
        - union
          - object
            - `id` string
            - `type` 'CONDITION', required
            - `conditions` object[], required
              - …
          - object
            - `id` string
            - `type` 'SEND_MESSAGE', required
            - `message` object, required
              - …
          - object
            - `id` string
            - `type` 'SEND_PRIVATE_REPLY', required
            - `message` object, required
              - …
          - object
            - `id` string
            - `type` 'SEND_PUBLIC_COMMENT_REPLY', required
            - `text` string, required
          - object
            - `id` string
            - `type` 'LIKE_COMMENT', required
          - object
            - `id` string
            - `type` 'ARCHIVE_CONVERSATION', required
          - object
            - `id` string
            - `type` 'OPEN_CONVERSATION', required
    - `publishedAt` string, date-time, nullable
    - `publishedByUserId` string, nullable
    - `createdAt` string, date-time, nullable, required
  - `publishedVersion` object
    - `id` string, required
    - `flowId` string, required
    - `version` number, required
    - `status` 'DRAFT' | 'PUBLISHED' | 'RETIRED', required
    - `definition` object, required
      - `trigger` object, required
        - `keywords` string[]
        - `matchMode` 'ANY' | 'ALL'
        - `caseSensitive` boolean
        - `senderExternalIds` string[]
        - `payloads` string[]
        - `actionDelaySeconds` integer
        - `id` string
        - `type` 'COMMENT_CREATED' | 'DM_RECEIVED' | 'QUICK_REPLY_CLICKED' | 'BUTTON_CLICKED' | 'MANUAL_TEST', required
        - `platform` 'INSTAGRAM' | 'FACEBOOK' | 'TIKTOK', required
        - `socialAccountId` string, required
        - `postId` string, nullable
      - `steps` union[], required
        - union
          - object
            - `id` string
            - `type` 'CONDITION', required
            - `conditions` object[], required
              - …
          - object
            - `id` string
            - `type` 'SEND_MESSAGE', required
            - `message` object, required
              - …
          - object
            - `id` string
            - `type` 'SEND_PRIVATE_REPLY', required
            - `message` object, required
              - …
          - object
            - `id` string
            - `type` 'SEND_PUBLIC_COMMENT_REPLY', required
            - `text` string, required
          - object
            - `id` string
            - `type` 'LIKE_COMMENT', required
          - object
            - `id` string
            - `type` 'ARCHIVE_CONVERSATION', required
          - object
            - `id` string
            - `type` 'OPEN_CONVERSATION', required
    - `publishedAt` string, date-time, nullable
    - `publishedByUserId` string, nullable
    - `createdAt` string, date-time, nullable, required

## Other responses

- `400`: 400
- `401`: 401
- `403`: 403
- `404`: 404
- `429`: 429
- `500`: 500
- `502`: 502
- `503`: 503
- `504`: 504

## Changes

- **2026-11-03** `fb6e4fbd8d2f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bundle/apis/bundle-social-api/changes/api/v1/automations/:id/patch.md)

---

[API](https://skmtc.dev/bundle/apis/bundle-social-api.md) - [All operations](https://skmtc.dev/bundle/apis/bundle-social-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bundle/apis/bundle-social-api/revisions/18efa1cb93a4?raw)
