> ## Documentation Index
> Fetch the complete documentation index at: https://docs.socialsyncs.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Automation

> Replace an automation workflow with a new configuration (same body shape as create).



## OpenAPI

````yaml PUT /automations/{id}
openapi: 3.1.0
info:
  title: SocialSyncs Public API
  description: >-
    API for managing social media posts, integrations, and media uploads in
    SocialSyncs.


    ## Authentication


    All endpoints require an API key passed in the `Authorization` header:


    ```

    Authorization: your-api-key

    ```


    Get your API key from SocialSyncs Settings.


    ## Rate Limits


    There is a limit of **30 requests per hour**.


    ## Terminology


    The UI uses `channel`, but the API uses `integration`. They refer to the
    same thing.


    ## Supported Platforms (27)


    **Social Platforms:** X (Twitter), LinkedIn, LinkedIn Page, Facebook,
    Instagram, Instagram Standalone, Threads, Bluesky, Mastodon, Warpcast
    (Farcaster), Nostr, VK


    **Video Platforms:** YouTube, TikTok


    **Community Platforms:** Reddit, Lemmy, Discord, Slack, Telegram


    **Design Platforms:** Pinterest, Dribbble


    **Blogging Platforms:** Medium, Dev.to, Hashnode, WordPress


    **Business:** Google My Business (GMB), Listmonk (newsletters)
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.socialsyncs.co/api/public/v1
    description: SocialSyncs Cloud
  - url: https://{your-domain}/api/public/v1
    description: Self-hosted
    variables:
      your-domain:
        default: localhost:5000
        description: Your SocialSyncs instance domain
security:
  - ApiKeyAuth: []
tags:
  - name: Integrations
    description: Manage connected social media channels
  - name: Posts
    description: Create, list, and delete posts
  - name: Uploads
    description: Upload media files
  - name: Notifications
    description: View organization notifications
  - name: Analytics
    description: View analytics for integrations and posts
  - name: Video Generation
    description: Generate videos with AI
paths:
  /automations/{id}:
    put:
      tags:
        - Automations
      summary: Update automation
      description: >-
        Replace an automation workflow with a new configuration (same body shape
        as create).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The automation ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAutomationRequest'
            example:
              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: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Automation'
components:
  schemas:
    CreateAutomationRequest:
      type: object
      required:
        - name
        - integration_id
        - events
      properties:
        name:
          type: string
          maxLength: 120
          example: Comment Reply Flow
        integration_id:
          type: string
          example: your-integration-id
        is_active:
          type: boolean
          default: true
        events:
          type: array
          items:
            $ref: '#/components/schemas/AutomationEvent'
          description: Exactly one trigger event with nested actions
    Automation:
      type: object
      properties:
        id:
          type: string
          example: clx1a2b3c4
        name:
          type: string
          example: Comment Reply Flow
        integrationId:
          type: string
          example: your-integration-id
        triggerType:
          type: string
          enum:
            - COMMENT
            - STORY_REPLY
            - DM_KEYWORD
        actionType:
          type: string
          enum:
            - SEND_DM
            - REPLY_TO_COMMENT
        active:
          type: boolean
          example: true
        successCount:
          type: integer
          example: 12
        failureCount:
          type: integer
          example: 0
        createdAt:
          type: string
          format: date-time
    AutomationEvent:
      type: object
      additionalProperties: true
      required:
        - event_type
        - event_category
        - event_uuid
      properties:
        event_type:
          type: string
          enum:
            - trigger
            - action
        event_category:
          type: string
          description: >-
            Trigger: post_comment | story_reply | user_direct_message. Action:
            reply_to_comment | welcome_message | ask_to_follow | send_dm
        event_uuid:
          type: string
        previous_event_uuid:
          type: string
          nullable: true
        is_active:
          type: boolean
        event_config:
          type: object
          additionalProperties: true
        actions:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Nested action events (on a trigger event only)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your SocialSyncs API key

````