> ## 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.

# Send a one-time automation's replies

> Sends the public replies of a ready run to its eligible comments, except skip_comment_ids. A run sends once; a run that isn't ready is refused with RUN_NOT_READY. Replies go out in the background: read the run for sent and failed counts.

Needs an API key with write access.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workspaces/{workspace_id}/one-time-automations/{one_time_automation_id}/runs/{run_id}/replies
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}/runs/{run_id}/replies:
    post:
      tags:
        - One-time automations
      summary: Send a one-time automation's replies
      description: >-
        Sends the public replies of a ready run to its eligible comments, except
        skip_comment_ids. A run sends once; a run that isn't ready is refused
        with RUN_NOT_READY. Replies go out in the background: read the run for
        sent and failed counts.


        Needs an API key with write access.
      operationId: send_one_time_automation_replies
      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: run_id
          in: path
          required: true
          description: >-
            Run ID returned by `POST
            /v1/workspaces/{workspace_id}/one-time-automations`, `POST
            /v1/workspaces/{workspace_id}/one-time-automations/{one_time_automation_id}/runs`
            or `GET
            /v1/workspaces/{workspace_id}/one-time-automations/{one_time_automation_id}`
          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: true
          description: >-
            A new value for each operation, and the same one when you retry, so
            the request runs once.
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                skip_comment_ids:
                  description: Eligible comment IDs the user chose not to answer
                  default: []
                  maxItems: 2000
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 64
      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_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)$
                  run:
                    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)$
                      status:
                        description: >-
                          scanning: reading the post's comments. ready: the scan
                          finished and nothing is sent until `POST
                          /v1/workspaces/{workspace_id}/one-time-automations/{one_time_automation_id}/runs/{run_id}/replies`.
                          sending: replies are going out. paused: stopped after
                          repeated Meta failures; scan_finished_at tells whether
                          it stopped while reading (null) or while sending, and
                          resuming it is done in Replier. completed, cancelled,
                          failed: ended.
                        type: string
                        enum:
                          - scanning
                          - ready
                          - sending
                          - paused
                          - completed
                          - cancelled
                          - failed
                      phase:
                        description: >-
                          Which half of the run this status belongs to, so a
                          paused run reads as a paused scan or a paused send.
                        type: string
                        enum:
                          - scan
                          - send
                          - ended
                      error:
                        type:
                          - string
                          - 'null'
                      exclude_previous:
                        type: boolean
                      truncated:
                        description: >-
                          The scan stopped at its comment limit before the last
                          comment
                        type: boolean
                      scanned_count:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      comment_total:
                        anyOf:
                          - type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          - type: 'null'
                      keywords:
                        type: array
                        items:
                          type: string
                      reply_messages:
                        type: array
                        items:
                          type: string
                      reply_selection_mode:
                        type: string
                        enum:
                          - random
                          - round_robin
                      counts:
                        type: object
                        properties:
                          matched:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          eligible:
                            description: Comments a send would answer now
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          excluded:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          unselected:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          queued:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          sent:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          failed:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          cancelled:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - matched
                          - eligible
                          - excluded
                          - unselected
                          - queued
                          - sent
                          - failed
                          - cancelled
                      created_at:
                        type: string
                      scan_finished_at:
                        type:
                          - string
                          - 'null'
                      send_started_at:
                        type:
                          - string
                          - 'null'
                      finished_at:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - status
                      - phase
                      - error
                      - exclude_previous
                      - truncated
                      - scanned_count
                      - comment_total
                      - keywords
                      - reply_messages
                      - reply_selection_mode
                      - counts
                      - created_at
                      - scan_finished_at
                      - send_started_at
                      - finished_at
                required:
                  - workspace
                  - one_time_automation_id
                  - run
        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.