Automations

Update an automation

Changed on

Partial update. status pauses (paused) or resumes (active) the automation. trigger, actions and limits are merged into the stored sections: keys you omit keep their value (new keywords keep the kinds, the scope and the match; a new dm.text keeps the public reply). public_reply.variations: [] or enabled: false turns the public reply off; limits.max_sends: null removes that limit. Another post_id, instagram_media_id or facebook_post_id moves the automation to that post. The platform never changes: a body that names another platform (or instagram_media_id on a Facebook automation, facebook_post_id on an Instagram one) answers 400 platform_immutable. A completed automation starts again when its limits or trigger change.

patch/automations/{id}

Request

  • Base URL
    https://api.omnisocials.com/v1
  • URL
    https://api.omnisocials.com/v1/automations/{id}
  • Auth
    HTTP bearer

Path parameters

idstring required

Request body

namestring

A label for the automations list (max 120 characters).

platform'instagram' | 'facebook' | 'x'

The channel the automation runs on. Default instagram. instagram_media_id implies instagram and facebook_post_id implies facebook; a body that names another platform answers 400 validation_error. On PATCH it cannot change: another platform answers 400 platform_immutable. x answers DMs to the connected X account: only the dm kind (X allows an automated DM only after the person DMed you), the workspace needs X DMs turned on in the dashboard (else 409 x_dms_off for an active automation; status: paused saves it), every answer ends with the line "Reply STOP to stop automatic messages.", and a person who replies STOP gets no automatic DM from the account again. X does not give apps the messages of an encrypted X Chat conversation, so those get no answer.

post_idstring

For scope post: an OmniSocials post (scheduled or live) that goes to the automation's platform. A post that does not go there answers 400 post_not_instagram or post_not_facebook. One automation per post and platform: a post that goes to Instagram and Facebook can have one of each.

instagram_media_idstring

For scope post on Instagram: the numeric id of a post or reel that was published outside OmniSocials (from the Instagram API, GET /me/media). The post is read from Instagram to check it belongs to the connected account.

facebook_post_idstring

For scope post on Facebook: the id of a post that was published on the connected Facebook Page outside OmniSocials. Pass {page-id}_{post-id} or the post id alone (the Page id is put in front). The post is read from Facebook with the Page token; a post of another Page answers 404 facebook_post_not_found. Implies platform: facebook. Pass one of post_id, instagram_media_id or facebook_post_id.

status'active' | 'paused'

paused creates the automation without turning it on. Default active.

Example request

{
  "name": "Guide DM",
  "platform": "instagram",
  "trigger": {
    "keywords": [
      "guide"
    ]
  },
  "post_id": "1024",
  "instagram_media_id": "17912345678901234",
  "facebook_post_id": "104857600123456_987654321098765",
  "actions": {
    "dm": {
      "text": "Here is the guide: https://example.com/guide"
    },
    "public_reply": {
      "enabled": true,
      "variations": [
        "Sent you a DM!"
      ]
    }
  },
  "limits": {
    "max_sends": 500,
    "stop_at": "2026-11-30T23:00:00.000Z"
  }
}

Response

Automation updated

Example response

{
  "data": {
    "id": "318",
    "name": "Guide DM",
    "post_id": "1024",
    "instagram_media_id": "17912345678901234",
    "facebook_post_id": "104857600123456_987654321098765",
    "trigger": {
      "keywords": [
        "guide"
      ]
    },
    "actions": {
      "dm": {
        "text": "Here is the guide: https://example.com/guide"
      },
      "public_reply": {
        "enabled": true,
        "variations": [
          "Sent you a DM!"
        ]
      }
    },
    "limits": {
      "max_sends": 500,
      "stop_at": "2026-11-30T23:00:00.000Z"
    },
    "stats": {
      "matched": 120,
      "sent": 112,
      "skipped": 6,
      "failed": 2,
      "last_event_at": "2026-10-21T15:00:12.000Z"
    },
    "created_at": "2026-10-20T14:32:10.000Z",
    "updated_at": "2026-10-20T14:35:42.000Z"
  }
}

Changes

    • warning

      added the new x enum value to the / response property for the response status

    • info

      added the new x enum value to the request property

    • warning

      added the new facebook enum value to the / response property for the response status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status