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

# Search campaigns

> Search campaigns by name, type, owner and archived state, with pagination and sorting. Rows include the step count; pass `include: ["stats"]` to add enrollment counts and reply, open and click rates to each one. Use `GET /v1/campaigns/{id}` for steps. Needs `campaigns:read`.

Signed-in users need access to campaigns in their role. API keys need the campaigns permission named on each endpoint.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/campaigns/search
openapi: 3.1.0
info:
  title: Stardex API (v1)
  version: 1.0.0
  description: >-
    Stardex ATS API — manage candidates, jobs, companies, and recruiting
    workflows.
servers:
  - url: https://api.stardex.ai
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Persons
    description: Manage person records — contacts, work history, and custom fields.
  - name: Jobs
    description: Manage job postings — pipeline stages, team members, and custom fields.
  - name: Candidates
    description: Manage candidate records and pipeline stage transitions.
  - name: Companies
    description: Browse and retrieve company records.
  - name: Lists
    description: Create, search, and retrieve saved person and company lists.
  - name: Person Activities
    description: Create and manage activity records (notes, emails, meetings) for persons.
  - name: Team Members
    description: List team members for use in search filters and assignments.
  - name: Custom Fields
    description: Retrieve custom field definitions and tag options for search filters.
  - name: Campaigns
    description: >-
      Create and edit email campaigns, enroll people through enrollment batches,
      and manage who is enrolled.
paths:
  /v1/campaigns/search:
    post:
      tags:
        - Campaigns
      summary: Search campaigns
      description: >-
        Search campaigns by name, type, owner and archived state, with
        pagination and sorting. Rows include the step count; pass `include:
        ["stats"]` to add enrollment counts and reply, open and click rates to
        each one. Use `GET /v1/campaigns/{id}` for steps. Needs
        `campaigns:read`.


        Signed-in users need access to campaigns in their role. API keys need
        the campaigns permission named on each endpoint.
      operationId: searchCampaigns
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignsSearchBody'
            example:
              keywords: backend
              include:
                - stats
              sort_by: updated_at
              sort_order: desc
      responses:
        '200':
          description: Campaigns found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignsSearchResponse'
              example:
                success: true
                data:
                  - id: 3f9a1c27-8e4b-4d2a-b6f0-7c1e5a9d2b84
                    name: Senior Backend Engineer, Monzo
                    sequence_type: candidate
                    is_archived: false
                    created_by: 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                    step_count: 3
                    created_at: '2026-10-13T10:15:00.000Z'
                    updated_at: '2026-10-13T10:15:00.000Z'
                    enrollment_counts:
                      total: 42
                      running: 27
                      awaiting_task: 2
                      replied: 6
                      meeting_booked: 3
                      bounced: 1
                      completed: 4
                      stopped: 1
                    engagement:
                      responded: 9
                      interested: 5
                      neutral: 2
                      not_interested: 2
                      opened: 0
                      clicked: 7
                      reply_rate: 22
                      open_rate: null
                      click_rate: 17
                meta:
                  total: 12
                  offset: 0
                  limit: 100
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                      details:
                        type: object
                        additionalProperties: {}
                        description: >-
                          Extra facts about the error when they help you fix it,
                          such as a limit and when it resets.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: No access to campaigns, or the API key lacks the permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                      details:
                        type: object
                        additionalProperties: {}
                        description: >-
                          Extra facts about the error when they help you fix it,
                          such as a limit and when it resets.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                      details:
                        type: object
                        additionalProperties: {}
                        description: >-
                          Extra facts about the error when they help you fix it,
                          such as a limit and when it resets.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false for error responses.
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Machine-readable error code (e.g. "VALIDATION_ERROR",
                          "NOT_FOUND").
                      message:
                        type: string
                        description: Human-readable error description.
                      details:
                        type: object
                        additionalProperties: {}
                        description: >-
                          Extra facts about the error when they help you fix it,
                          such as a limit and when it resets.
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
components:
  schemas:
    CampaignsSearchBody:
      type: object
      properties:
        offset:
          type:
            - integer
            - 'null'
          minimum: 0
          default: 0
          description: Records to skip for pagination. Defaults to 0.
        limit:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
          description: Max records per page (1–100). Defaults to 100.
        keywords:
          type: string
          maxLength: 200
          description: Case-insensitive match on the campaign name.
        sequence_type:
          type: string
          enum:
            - candidate
            - business_development
            - candidate_nurture
            - client_nurture
          description: Only campaigns of this type.
        is_archived:
          type: boolean
          default: false
          description: Archived campaigns only when true. Defaults to false.
        created_by:
          type: string
          format: uuid
          description: Only campaigns owned by this team member.
        sort_by:
          type: string
          enum:
            - created_at
            - updated_at
            - name
            - enrollments
            - reply_rate
          default: created_at
          description: >-
            Defaults to created_at. enrollments sorts by how many people were
            ever enrolled, reply_rate by the campaign card reply rate (campaigns
            with no rate last), to find the biggest or best campaigns.
        sort_order:
          type: string
          enum:
            - asc
            - desc
          default: desc
          description: Defaults to desc.
        include:
          type: array
          items:
            type: string
            enum:
              - stats
          description: >-
            Pass ["stats"] to add enrollment_counts and engagement (reply, open
            and click rates) to each campaign.
    CampaignsSearchResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/CampaignSearchResult'
        meta:
          type: object
          properties:
            total:
              type: number
              description: Total matching records across all pages.
            offset:
              type: number
              description: Current pagination offset.
            limit:
              type: number
              description: Page size used for this request.
          required:
            - total
            - offset
            - limit
      required:
        - success
        - data
        - meta
    CampaignSearchResult:
      allOf:
        - $ref: '#/components/schemas/CampaignSummary'
        - type: object
          properties:
            enrollment_counts:
              type: object
              properties:
                total:
                  type: integer
                running:
                  type: integer
                awaiting_task:
                  type: integer
                  description: >-
                    People held until a task step is marked complete. They are
                    also counted in running or bounced, so the groups can add up
                    to more than total.
                replied:
                  type: integer
                meeting_booked:
                  type: integer
                bounced:
                  type: integer
                completed:
                  type: integer
                stopped:
                  type: integer
              required:
                - total
                - running
                - awaiting_task
                - replied
                - meeting_booked
                - bounced
                - completed
                - stopped
              description: 'People in this campaign by status. Only with include: ["stats"].'
            engagement:
              type: object
              properties:
                responded:
                  type: integer
                  description: People who replied or booked a meeting.
                interested:
                  type: integer
                  description: >-
                    People whose reply was read as interested, not counting
                    bounced people.
                neutral:
                  type: integer
                  description: >-
                    People whose reply was read as neutral, not counting bounced
                    people.
                not_interested:
                  type: integer
                  description: >-
                    People whose reply was read as not interested, not counting
                    bounced people.
                opened:
                  type: integer
                  description: >-
                    People who opened at least one email, not counting bounced
                    people.
                clicked:
                  type: integer
                  description: >-
                    People who clicked at least one link, not counting bounced
                    people.
                reply_rate:
                  type:
                    - number
                    - 'null'
                  description: >-
                    responded out of everyone enrolled except bounced people, as
                    a percent with one decimal. null when nobody is enrolled or
                    everyone bounced.
                open_rate:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    opened out of everyone enrolled except bounced people, as a
                    whole percent. null when open tracking is off, nobody is
                    enrolled or everyone bounced.
                click_rate:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    clicked out of everyone enrolled except bounced people, as a
                    whole percent. null when link tracking is off, nobody is
                    enrolled or everyone bounced.
              required:
                - responded
                - interested
                - neutral
                - not_interested
                - opened
                - clicked
                - reply_rate
                - open_rate
                - click_rate
              description: >-
                Replies, opens and clicks, as on the campaign card. Only with
                include: ["stats"].
    CampaignSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        sequence_type:
          type: string
          enum:
            - candidate
            - business_development
            - candidate_nurture
            - client_nurture
        is_archived:
          type: boolean
        created_by:
          type: string
          format: uuid
          description: Team member who owns the campaign.
        step_count:
          type: integer
        created_at:
          type: string
        updated_at:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - sequence_type
        - is_archived
        - created_by
        - step_count
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with a Bearer token: API key, OAuth token, or session
        token.

````

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