---
title: "Update a DM automation"
method: PATCH
path: "/v2/dm-automations/{id}"
tags: ["automations"]
---

# Update a DM automation

`PATCH /v2/dm-automations/{id}`

Updates a DM automation. Each field present in the patch replaces that field; omitted fields are left unchanged. Pass `null` for `emailGate`, `followGate`, `trigger`, or `webhook` to remove it.

## Path parameters

- `id` string, required

## Request body

- object
  - `patch` object, required
    - `buttons` object[]
      - `title` string, required
      - `type` 'url', required
      - `url` string
    - `dmMessage` string
    - `emailGate` object, nullable
      - `message` string, required
    - `followGate` object, nullable
      - `buttonTitle` string
      - `message` string, required
    - `isActive` boolean
    - `name` string
    - `trigger` union
      - object
        - `isActive` boolean
        - `keywords` string[], required
        - `postId` string, nullable
        - `type` 'comment-received', required
      - object
        - `isActive` boolean
        - `keywords` string[], required
        - `type` 'message-received', required
    - `webhook` object, nullable
      - `headers` object
      - `method` 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT', required
      - `url` string, required

## Response `200`

Default Response

- object
  - `flow` object, required
    - `accountId` string, required
    - `buttons` object[], required
      - `title` string, required
      - `type` 'url', required
      - `url` string
    - `createdAt` string, required
    - `dmMessage` string, required
    - `emailGate` object
      - `message` string, required
    - `followGate` object
      - `buttonTitle` string
      - `message` string, required
    - `id` string, required
    - `isActive` boolean, required
    - `name` string, required
    - `platform` 'facebook' | 'instagram', required
    - `publishedVersionId` string, nullable, required
    - `target` union, required
      - object
        - `pageId` string, required
        - `targetType` 'facebook', required
      - object
        - `targetType` 'instagram', required
    - `trigger` union
      - object
        - `isActive` boolean
        - `keywords` string[], required
        - `postId` string, nullable
        - `type` 'comment-received', required
      - object
        - `isActive` boolean
        - `keywords` string[], required
        - `type` 'message-received', required
    - `updatedAt` string, required
    - `webhook` object
      - `headers` object
      - `method` 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT', required
      - `url` string, required

## Other responses

- `404` — Not found
- `422` — Validation error
- `500` — Default Response

## Changes

- **2026-08-21** `39e94457ccb2` — 6 info
  - added the optional property `action` to the response with the `404` status
  - added the optional property `action` to the response with the `422` status
  - added the optional property `action` to the response with the `500` status
  - added the optional property `details` to the response with the `404` status
  - …2 more
- **2026-08-19** `d6a97ae30ca5` — 6 info
  - added the new optional request property `patch/emailGate`
  - added the new optional request property `patch/followGate`
  - added the new optional request property `patch/webhook`
  - added the optional property `flow/emailGate` to the response with the `200` status
  - …2 more

[Change history](https://skmtc.dev/blotato/apis/blotato-api/changes/v2/dm-automations/:id/patch.md)

---

[API](https://skmtc.dev/blotato/apis/blotato-api.md) · [All operations](https://skmtc.dev/blotato/apis/blotato-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blotato/blotato-api/revisions/c93447ba6b9d/schema)
