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

# List Generated Messages

> List generated campaign messages

**CLI:**

```bash theme={null}
puffle campaign generate-message list --id <id>
puffle campaign generate-message list --id <id> --status <status> --prospect-id <prospect-id> --prospect-limit <prospect-limit> --prospect-offset <prospect-offset>
```

## Overview

Fetches generated campaign messages for one campaign. By default the endpoint returns draft messages; pass `status=all`, `status=pending`, or `status=sent` when reviewing another part of the message lifecycle.

Pass `prospect_id` to focus on one lead. In that mode, inbound conversation replies are merged into the response so the UI can show the lead's full thread context.

## AI agent notes

Use this before editing generated copy or showing a human the messages that will be sent. This endpoint does not send or regenerate messages.

Only call [Edit generated email](/api-reference/campaigns/update-campaign-generated-message) for draft messages the human wants to change.


## OpenAPI

````yaml get /api/campaigns/{id}/generate-messages
openapi: 3.0.3
info:
  title: Puffle API
  version: 1.0.0
  description: >-
    HTTP API for the Puffle GTM platform - Feed and Lead Finder search
    preparation, campaign-backed Outbound execution, Puffle Agent runs, sender
    management, and Unibox reply workflows. Designed for operation by both
    humans and autonomous AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Puffle Support
    url: https://puffle.ai
servers:
  - url: https://app.puffle.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
  - name: Socials
    description: >-
      Read connected LinkedIn and X accounts, review current and archived posts,
      and reconcile publication status. Creating, editing, scheduling,
      publishing, OAuth connection, analytics, and mentions remain
      dashboard-managed workflows and are not part of the public Bearer-token
      API.
paths:
  /api/campaigns/{id}/generate-messages:
    get:
      tags:
        - Campaigns
      summary: List Generated Messages
      description: >-
        Fetch generated campaign messages, optionally filtered by status or
        lead. When a single lead is requested, inbound conversation replies are
        merged into the response so the UI can show the full thread.
      operationId: listCampaignGeneratedMessages
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Campaign UUID
        - name: status
          in: query
          required: false
          schema:
            default: draft
            description: >-
              Message status filter. Defaults to `draft`; `all` disables the
              status filter.
            type: string
            enum:
              - draft
              - pending
              - sent
              - all
        - name: prospect_id
          in: query
          required: false
          schema:
            description: Optional lead filter to fetch messages for one lead.
            type: string
        - name: prospect_limit
          in: query
          required: false
          schema:
            description: Optionally limit messages to the first N campaign leads.
            type: integer
            exclusiveMinimum: true
            maximum: 100
            minimum: 0
        - name: prospect_offset
          in: query
          required: false
          schema:
            default: 0
            description: >-
              Offset into the stable campaign lead order when `prospect_limit`
              is provided.
            type: integer
            minimum: 0
            maximum: 9007199254740991
      responses:
        '200':
          description: Generated messages fetched successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: String value with endpoint-specific validation.
                        campaign_id:
                          type: string
                          description: String value with endpoint-specific validation.
                        prospect_id:
                          type: string
                          description: String value with endpoint-specific validation.
                        node_id:
                          type: string
                        subject:
                          type: string
                          nullable: true
                        body_text:
                          type: string
                          nullable: true
                        body_html:
                          type: string
                          nullable: true
                        status:
                          type: string
                          enum:
                            - draft
                            - pending
                            - sending
                            - sent
                        manually_edited:
                          type: boolean
                        created_at:
                          type: string
                          format: date-time
                      required:
                        - id
                        - campaign_id
                        - prospect_id
                        - node_id
                        - subject
                        - body_text
                        - status
                        - manually_edited
                        - created_at
                      additionalProperties: false
                required:
                  - messages
                additionalProperties: false
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Campaign doesn't exist or isn't owned by the caller.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````