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

# Reply to an agent run

> Deliver a message into a run.

- **Paused run** — the reply is submitted as the answer to the agent's pending question and the *same* run continues mid-thought.
- **Finished run** (`completed` / `failed` / `cancelled`) — a follow-up run starts in the same conversation, inheriting its context and playbook, so "find 25 more like those" keeps saving leads.
- **Still working** — `409`, unless you pass `interrupt: true`, which cancels it and starts a new run with your message.

Requires the `agents` permission.



## OpenAPI

````yaml POST /api/agents/runs/{id}/reply
openapi: 3.1.0
info:
  title: ManyPI API
  description: >-
    The REST API behind ManyPI — AI lead generation, email validation,
    cold-email outreach, agent runs and web scraping. Every endpoint is
    authenticated with a ManyPI API key (`mpi_...`) or an OAuth 2.1 access
    token, and honours the permissions granted to that credential.
  version: 2.0.0
  contact:
    name: ManyPI Support
    email: support@manypi.com
    url: https://manypi.com
servers:
  - url: https://app.manypi.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Leads
    description: Find, store, enrich and manage leads.
  - name: Email validation
    description: Verify that lead addresses can receive mail.
  - name: Outreach
    description: Inboxes, sequences, campaigns, sending and replies.
  - name: Agent
    description: Agent runs, replies and skills.
  - name: Scraping
    description: Scrapers, runs and extracted data.
  - name: Endpoints
    description: Publish scrapers as typed REST endpoints.
  - name: Account
    description: Key validation and account information.
paths:
  /api/agents/runs/{id}/reply:
    post:
      tags:
        - Agent
      summary: Reply to an agent run
      description: >-
        Deliver a message into a run.


        - **Paused run** — the reply is submitted as the answer to the agent's
        pending question and the *same* run continues mid-thought.

        - **Finished run** (`completed` / `failed` / `cancelled`) — a follow-up
        run starts in the same conversation, inheriting its context and
        playbook, so "find 25 more like those" keeps saving leads.

        - **Still working** — `409`, unless you pass `interrupt: true`, which
        cancels it and starts a new run with your message.


        Requires the `agents` permission.
      operationId: replyToAgentRun
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - message
              properties:
                message:
                  type: string
                  minLength: 1
                  maxLength: 8000
                interrupt:
                  type: boolean
                  description: >-
                    Stop a still-working run, then start a new one with this
                    message.
            example:
              message: Only agencies with a team page and at least five people.
      responses:
        '200':
          description: Resumed or created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  run_id:
                    type: string
                    format: uuid
                  conversation_id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - resumed
                      - created
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The run is still working. Wait for it to pause or finish, cancel it,
            or pass `interrupt: true`.
components:
  responses:
    BadRequest:
      description: The request body or parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Missing, invalid or expired credential — or a key that lacks the
        permission this route requires.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: >-
            A machine-readable code on gated failures: `lead_limit`,
            `outreach_locked`, `validation_credits_exhausted`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A ManyPI API key (`mpi_...`) from Settings → API keys, or an OAuth 2.1
        access token obtained through the MCP consent flow.

````