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

# Create a comment automation

> Pass postId (an Instagram media id) to scope the automation to a single post, or omit it for a global automation that applies to every post.



## OpenAPI

````yaml post /api/public/instagram/accounts/{instagramAccountId}/automations
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/instagram/accounts/{instagramAccountId}/automations:
    post:
      tags:
        - Instagram Comment Automations
      summary: Create a comment automation
      description: >-
        Pass postId (an Instagram media id) to scope the automation to a single
        post, or omit it for a global automation that applies to every post.
      operationId: PublicInstagramCommentAutomationController_createAutomation
      parameters:
        - name: x-api-key
          in: header
          description: API key required to authorize the request
          required: true
          schema:
            type: string
        - name: instagramAccountId
          required: true
          in: path
          description: Vambe Instagram account id
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCommentAutomationDto'
      responses:
        '201':
          description: Automation created.
        '404':
          description: Instagram account or post not found.
components:
  schemas:
    CreateCommentAutomationDto:
      type: object
      properties:
        name:
          type: string
          nullable: true
        conditionPrompt:
          type: string
          nullable: true
        activationType:
          default: ai_condition
          type: string
          enum:
            - ai_condition
            - keywords
        keywords:
          type: array
          items:
            type: string
          nullable: true
        stageId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          nullable: true
        dmInstruction:
          type: string
          nullable: true
        dmButtons:
          maxItems: 3
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 20
          nullable: true
        commentInstruction:
          type: string
          nullable: true
        promptContext:
          type: string
          nullable: true
        isFuture:
          default: false
          type: boolean
        type:
          type: string
          enum:
            - private
            - comment
            - delete
            - multiple
        mode:
          default: intelligent
          type: string
          enum:
            - intelligent
            - lite
        postId:
          type: string
          minLength: 1
          nullable: true
      required:
        - type

````