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

# List run events

> What a run did, step by step: each tool call, result and message, in order. Pass the `seq` of the last event you have as `after` to get only newer ones.

An API key needs **Agents & skills: Read** (`agents:read`), the **Run agents** permission (`agents`), or the legacy `read` permission.



## OpenAPI

````yaml GET /api/agents/runs/{id}/events
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.


    API keys carry permissions per area of the API (Leads & companies,
    Campaigns, Inboxes & replies, Agents & skills, Scrapers & data, Account &
    usage), each set to Read or Read & write, plus separate permissions for
    actions that spend credits or reach the outside world: Run agents, Run
    scrapers, Verify email addresses, Send outreach and Invoke endpoints. Each
    operation below names what it needs. Keys with the older `read` and `write`
    permissions keep working everywhere.
  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.
  - name: Imports
    description: >-
      Bring campaigns, leads and the do-not-contact list over from another
      outreach tool.
paths:
  /api/agents/runs/{id}/events:
    get:
      tags:
        - Agent
      summary: List run events
      description: >-
        What a run did, step by step: each tool call, result and message, in
        order. Pass the `seq` of the last event you have as `after` to get only
        newer ones.


        An API key needs **Agents & skills: Read** (`agents:read`), the **Run
        agents** permission (`agents`), or the legacy `read` permission.
      operationId: listAgentRunEvents
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: after
          in: query
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          schema:
            type: integer
            default: 200
            maximum: 1000
      responses:
        '200':
          description: Events, oldest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      type: object
                      properties:
                        seq:
                          type: integer
                        type:
                          type: string
                        payload:
                          type: object
                        created_at:
                          type: string
                          format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: The workspace is locked for billing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: >-
        Missing, invalid or expired credential, or an API key without the
        permission this route needs. Both look the same, so check the key's
        permissions under API Access when a key that worked elsewhere is
        refused. A few routes check the key themselves and answer `403` instead.
      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:
          description: >-
            Human-readable message. A few validation failures (creating or
            updating an endpoint, bulk lead updates and deletes) send a list of
            the individual problems here instead of one string.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      type:
                        - string
                        - integer
                  message:
                    type: string
        code:
          type: string
          description: >-
            A machine-readable code on gated failures: `lead_limit`,
            `outreach_locked`, `validation_credits_exhausted`.
        details:
          description: >-
            Extra detail on some failures, such as the list of parameters that
            failed an endpoint's `param_schema`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A ManyPI API key (`mpi_...`) from the profile menu → API Access in the
        dashboard, or an OAuth 2.1 access token obtained through the MCP consent
        flow.

````

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