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

# List campaign prospects

> Returns all prospects associated with a campaign

## Overview

List prospects for a specific campaign. The endpoint reads campaign conversation state from Appwrite and hydrates prospect profile details from PlanetScale.

The response body remains a plain array for compatibility with existing integrations. Pagination metadata is returned in response headers.

Each `prospect` object includes current company data when available: `currentCompanyName`, `currentJobTitle`, `currentCompanyWebsite`, and `currentCompanyLinkedInUrl`.

## Response Fields

<ResponseField name="prospect.currentCompanyName" type="string | null">
  Current company name from prospect enrichment.
</ResponseField>

<ResponseField name="prospect.currentJobTitle" type="string | null">
  Current job title from prospect enrichment.
</ResponseField>

<ResponseField name="prospect.currentCompanyWebsite" type="string | null">
  Current company's website URL when available.
</ResponseField>

<ResponseField name="prospect.currentCompanyLinkedInUrl" type="string | null">
  Current company's LinkedIn page URL when available.
</ResponseField>

## Query Parameters

<ParamField query="limit" type="number" default="25">
  Maximum number of prospects to return. The maximum supported value is `100`.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Number of prospects to skip when using offset pagination. Ignored when `cursor` is provided.
</ParamField>

<ParamField query="cursor" type="string">
  Opaque cursor from the `X-Next-Cursor` response header. Use this for stable pagination through large campaigns.
</ParamField>

<ParamField query="status" type="number">
  Filter by conversation status. Use `4` to retrieve prospects who replied.
</ParamField>

<ParamField query="isPaused" type="boolean">
  Filter paused or active campaign conversations.
</ParamField>

<ParamField query="hasResponded" type="boolean">
  Filter conversations with or without a recorded last message timestamp. Use `status=4` when you specifically need replied prospects.
</ParamField>

## Conversation Status Values

| Status | Meaning              |
| ------ | -------------------- |
| `0`    | Not started          |
| `1`    | Invitation sent      |
| `2`    | Invitation accepted  |
| `3`    | Contacted            |
| `4`    | Replied              |
| `5`    | Qualified            |
| `6`    | Unqualified          |
| `7`    | Skipped              |
| `502`  | Invites disabled     |
| `503`  | Unreachable          |
| `504`  | No longer in network |
| `505`  | Invite cooldown      |

## Pagination Headers

| Header          | Description                                         |
| --------------- | --------------------------------------------------- |
| `X-Limit`       | Applied page size                                   |
| `X-Offset`      | Applied offset when offset pagination is used       |
| `X-Has-More`    | `true` when another page is available               |
| `X-Next-Cursor` | Opaque cursor to pass as `cursor` for the next page |

## Examples

### List campaign prospects

```bash theme={null}
curl "https://api.kakiyo.com/v1/prospects/campaign/{campaignId}?limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### List replied prospects

```bash theme={null}
curl "https://api.kakiyo.com/v1/prospects/campaign/{campaignId}?status=4&limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### List paused replied prospects

```bash theme={null}
curl "https://api.kakiyo.com/v1/prospects/campaign/{campaignId}?status=4&isPaused=true&limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Continue with cursor pagination

```bash theme={null}
curl "https://api.kakiyo.com/v1/prospects/campaign/{campaignId}?limit=100&cursor={nextCursor}" \
  -H "Authorization: Bearer YOUR_API_KEY"
```


## OpenAPI

````yaml GET /prospects/campaign/{campaignId}
openapi: 3.1.0
info:
  title: Kakiyo API
  description: API for automating LinkedIn outreach campaigns with AI-powered conversations
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.kakiyo.com/v1
security:
  - bearerAuth: []
paths:
  /prospects/campaign/{campaignId}:
    get:
      summary: List Campaign Prospects
      description: Returns all prospects associated with a campaign
      operationId: listCampaignProspects
      parameters:
        - name: campaignId
          in: path
          description: ID of the campaign
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of prospects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Prospect'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Campaign not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Prospect:
      type: object
      properties:
        id:
          type: string
          example: chat_12345abcde
        status:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          example: 2
        qualification:
          type: string
          enum:
            - unqualified
            - needVerification
            - inProgress
            - qualified
          example: inProgress
        paused:
          type: boolean
          example: false
        lastMessage:
          type: string
          format: date-time
          example: '2023-06-15T15:30:00Z'
        prospect:
          type: object
          properties:
            id:
              type: string
              example: prospect_12345abcde
            name:
              type: string
              example: John Smith
            url:
              type: string
              example: https://linkedin.com/in/johnsmith
            headline:
              type: string
              example: VP of Sales at Acme Inc
            currentCompanyName:
              type:
                - string
                - 'null'
              example: Acme Inc
            currentJobTitle:
              type:
                - string
                - 'null'
              example: VP of Sales
            currentCompanyWebsite:
              type:
                - string
                - 'null'
              example: https://www.acme.com
            currentCompanyLinkedInUrl:
              type:
                - string
                - 'null'
              example: https://www.linkedin.com/company/acme
    Error:
      type: object
      properties:
        error:
          type: string
          example: validation_error
        message:
          type: string
          example: The request parameters failed validation
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                example: name
              message:
                type: string
                example: The name field is required
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````