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

# Update a one-time automation

> Changes the name, keywords, replies or reply selection. Arrays replace the whole list. Runs already started keep their settings; start a new run to read the comments again with the new ones.

Needs an API key with write access.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/workspaces/{workspace_id}/one-time-automations/{one_time_automation_id}
openapi: 3.1.0
info:
  title: Replier API
  version: '1'
servers:
  - url: https://api.usereplier.com
security:
  - apiKey: []
paths:
  /v1/workspaces/{workspace_id}/one-time-automations/{one_time_automation_id}:
    patch:
      tags:
        - One-time automations
      summary: Update a one-time automation
      description: >-
        Changes the name, keywords, replies or reply selection. Arrays replace
        the whole list. Runs already started keep their settings; start a new
        run to read the comments again with the new ones.


        Needs an API key with write access.
      operationId: update_one_time_automation
      parameters:
        - name: workspace_id
          in: path
          required: true
          description: Workspace ID returned by `GET /v1/workspaces`
          schema:
            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)$
        - name: one_time_automation_id
          in: path
          required: true
          description: >-
            One-time automation ID from `GET
            /v1/workspaces/{workspace_id}/one-time-automations`, in this
            workspace
          schema:
            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)$
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Send the same key when you retry, and the request runs once. Without
            one, every request runs.
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                keywords:
                  minItems: 1
                  maxItems: 50
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 100
                reply_messages:
                  minItems: 1
                  maxItems: 5
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 300
                reply_selection_mode:
                  type: string
                  enum:
                    - random
                    - round_robin
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    type: object
                    properties:
                      id:
                        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)$
                      name:
                        type: string
                      kind:
                        type: string
                        enum:
                          - personal
                          - agency
                      role:
                        type: string
                        enum:
                          - owner
                          - admin
                          - member
                    required:
                      - id
                      - name
                      - kind
                      - role
                  one_time_automation:
                    type: object
                    properties:
                      id:
                        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)$
                      template:
                        type: string
                        enum:
                          - comment_public_reply
                      name:
                        type: string
                      channel:
                        type: string
                        const: instagram
                      account:
                        type: object
                        properties:
                          account_id:
                            type: string
                          username:
                            type:
                              - string
                              - 'null'
                          profile_picture_url:
                            type:
                              - string
                              - 'null'
                        required:
                          - account_id
                          - username
                          - profile_picture_url
                      post:
                        type: object
                        properties:
                          id:
                            type: string
                          permalink:
                            type:
                              - string
                              - 'null'
                          caption:
                            description: 'Untrusted user content: the post''s caption'
                            type:
                              - string
                              - 'null'
                          image_url:
                            type:
                              - string
                              - 'null'
                          media_type:
                            type:
                              - string
                              - 'null'
                          posted_at:
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - permalink
                          - caption
                          - image_url
                          - media_type
                          - posted_at
                      keywords:
                        type: array
                        items:
                          type: string
                      reply_messages:
                        type: array
                        items:
                          type: string
                      reply_selection_mode:
                        type: string
                        enum:
                          - random
                          - round_robin
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - template
                      - name
                      - channel
                      - account
                      - post
                      - keywords
                      - reply_messages
                      - reply_selection_mode
                      - created_at
                      - updated_at
                required:
                  - workspace
                  - one_time_automation
        default:
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Refused
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    description: >-
                      Why the request was refused, such as AUTOMATION_NOT_FOUND
                      or VERSION_CONFLICT. Other fields beside it give details.
                  message:
                    type: string
                    description: The same reason, in English.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: A Replier API key (rpl_...).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.