Skip to main content

Request

curl -X POST "https://api.socialsyncs.co/public/v1/automations" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Comment Reply Flow",
    "integration_id": "your-integration-id",
    "is_active": true,
    "events": [
      {
        "event_type": "trigger",
        "event_category": "post_comment",
        "event_uuid": "t1",
        "previous_event_uuid": null,
        "is_active": true,
        "event_config": {
          "comment_config": {
            "all_comments": true,
            "keywords": ["price", "cost"],
            "excluded_keywords": [],
            "fuzzy_match_allowed": false,
            "fuzzy_match_percentage": 80
          },
          "post_config": {
            "all_posts": true,
            "post_ids": [],
            "upcoming_posts": false
          }
        },
        "actions": [
          {
            "event_type": "action",
            "event_category": "reply_to_comment",
            "event_uuid": "a1",
            "previous_event_uuid": "t1",
            "is_active": true,
            "event_config": {
              "reply_type": "templates",
              "templates": ["Check your DMs 👋", "Just sent you a message 📩"]
            }
          },
          {
            "event_type": "action",
            "event_category": "send_dm",
            "event_uuid": "a2",
            "previous_event_uuid": "a1",
            "is_active": true,
            "event_config": {
              "dm_type": "text_button",
              "templates": [
                {
                  "title": "Hey! Here is our pricing: https://example.com/pricing",
                  "subtitle": "",
                  "buttons": [],
                  "media_config": []
                }
              ]
            }
          }
        ]
      }
    ]
  }'

Body Parameters

FieldTypeRequiredDescription
namestringYesDisplay name (max 120 chars)
integration_idstringYesThe channel to attach this automation to
is_activebooleanNoStart active (default: true)
eventsarrayYesArray containing exactly one trigger event with nested actions

Trigger categories (event_category for triggers)

ValueDescription
post_commentSomeone comments on a post
story_replySomeone replies to a story
user_direct_messageSomeone sends a DM matching a keyword

Action categories (event_category for actions)

ValueDescription
reply_to_commentReply publicly to the triggering comment
welcome_messageSend an interactive button card DM
ask_to_followSend a follow-prompt card DM
send_dmSend the primary DM (text, media, or card carousel)

DM types (dm_type in send_dm event_config)

ValueDescription
text_buttonPlain text message with optional buttons
mediaSingle image or video attachment
cardScrollable carousel of cards with image, title, subtitle, and buttons

Response

Returns the created automation object with its assigned id.