mulaichatDocs
GuidesDeveloperAPI ReferenceChangelog
Automations
POST
/v1/automations

Instagram accounts; comment_reply also on Threads. trigger depends on kind:

  • comment_to_dm, comment_reply: { scope: post | any | next | post_target, platform_post_ids?, keywords, match: any | contains | exact, include_replies? }
  • dm_keyword: { keywords, match: contains | exact }
  • story_reply: { keywords, match }
  • default_reply: { cooldown_hours? (1-168, default 24) }
  • story_mention: {}
  • ice_breaker: { questions: [{ question, payload }] } (1-4) actions.message is the DM (text, up to 3 buttons); comment_reply only takes public_replies (3-5). With post_target_id, one automation per post target: asking again gives back the same one.

Requires the write scope.

Authorization

bearer
headerAuthorizationBearer <token>

An API key (tb_live_...) from the dashboard, or an OAuth access token.

Header Parameters

mulaichat-workspace?string

Limits an owner key to one profile (id or external_id). Unknown: 404 profile_not_found.

Request Body

application/json
  1. body
account_id*string
Formatuuid
kind*string
Value in"comment_to_dm""dm_keyword""default_reply""story_mention""story_reply""ice_breaker""comment_reply"
name*string
Length1 <= length <= 100
enabled?boolean
Defaulttrue
trigger*
actions*
once_per_person?boolean
Defaulttrue
mark_automated?boolean
Defaultfalse
post_target_id?string
Formatuuid

Response Body

The automation.

application/json
  1. response
id*string
Formatuuid
profile_id*string
Formatuuid
account_id*string
Formatuuid
kind*string
Value in"comment_to_dm""dm_keyword""default_reply""story_mention""story_reply""ice_breaker""comment_reply"
name*string
enabled*boolean
enabled_at*|

Comments and messages from before this are never acted on.

trigger*

Its fields depend on kind.

actions*
post_target_id*|null
once_per_person*boolean
mark_automated*boolean
stats*
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.mulaichat.com/v1/automations' \  -H 'Content-Type: application/json' \  -d '{  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",  "kind": "comment_to_dm",  "name": "string",  "trigger": {    "property1": null,    "property2": null  },  "actions": {}}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "profile_id": "bfcb6779-b1f9-41fc-92d7-88f8bc1d12e8",  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",  "kind": "comment_to_dm",  "name": "string",  "enabled": true,  "enabled_at": "2019-08-24T14:15:22Z",  "trigger": {    "property1": null,    "property2": null  },  "actions": {    "message": {      "text": "string",      "buttons": [        {          "type": "web_url",          "title": "string",          "url": "http://example.com"        }      ]    },    "react": true,    "timing": {      "delay_min_seconds": 0,      "delay_max_seconds": 0,      "dm_gap_min_seconds": 0,      "dm_gap_max_seconds": 0    },    "public_replies": [      "string"    ],    "track_clicks": true,    "follow_gate": {      "ask_text": "string",      "button_title": "string",      "retry_text": "string"    }  },  "post_target_id": "faaf0581-1c6b-48b7-9144-53e90e8fcc07",  "once_per_person": true,  "mark_automated": true,  "stats": {    "triggered": 0,    "sent": 0,    "skipped": 0,    "failed": 0,    "clicked": 0,    "unlocked": 0,    "last_triggered_at": "2019-08-24T14:15:22Z"  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

On this page