> ## 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 the campaign queue

> Steps across all your campaigns in one list. `view: "upcoming"` shows each running person's next step, soonest first, from campaigns that are not archived; `view: "sent"` shows steps that went out, newest first (the last 30 days by default, at most 90 days per request). Filter by campaigns, campaign owners, senders and step types, and by `next_send_before` (upcoming) or `sent_after` and `sent_before` (sent). `meta.step_type_counts` counts each step type across every page. Use `GET /v1/campaigns/{id}/enrollments/{enrollment_id}` for a person's full steps and `PATCH /v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}` with a row's `id` to edit an upcoming step. Needs `campaigns:read`.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /v1/campaigns/enrollment-steps/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/enrollment-steps/search:
    post:
      tags:
        - Campaigns
      summary: Search the campaign queue
      description: >-
        Steps across all your campaigns in one list. `view: "upcoming"` shows
        each running person's next step, soonest first, from campaigns that are
        not archived; `view: "sent"` shows steps that went out, newest first
        (the last 30 days by default, at most 90 days per request). Filter by
        campaigns, campaign owners, senders and step types, and by
        `next_send_before` (upcoming) or `sent_after` and `sent_before` (sent).
        `meta.step_type_counts` counts each step type across every page. Use
        `GET /v1/campaigns/{id}/enrollments/{enrollment_id}` for a person's full
        steps and `PATCH
        /v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}` with a
        row's `id` to edit an upcoming step. Needs `campaigns:read`.
      operationId: searchCampaignQueue
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrollmentStepsSearchBody'
            examples:
              Upcoming:
                summary: Today's emails from one sender
                value:
                  view: upcoming
                  step_types:
                    - email
                  sender_team_member_ids:
                    - 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                  campaign_owner_ids:
                    - 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                  campaign_ids:
                    - 3f9a1c27-8e4b-4d2a-b6f0-7c1e5a9d2b84
                  next_send_before: '2026-10-22T23:59:59.000Z'
                  limit: 100
                  offset: 0
              Sent:
                summary: What one sender sent last week
                value:
                  view: sent
                  sender_team_member_ids:
                    - 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                  sent_after: '2026-10-15T00:00:00.000Z'
                  sent_before: '2026-10-22T00:00:00.000Z'
      responses:
        '200':
          description: Queue steps found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollmentStepsSearchResponse'
              example:
                success: true
                data:
                  - enrollment_id: e7b1d3f5-9a2c-4e6b-8d0f-3a5c7e9b1d42
                    campaign_id: 3f9a1c27-8e4b-4d2a-b6f0-7c1e5a9d2b84
                    campaign_name: Senior Backend Engineer, Monzo
                    campaign_type: candidate
                    campaign_owner_id: 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                    person_id: 2f6b9d1e-4a8c-4e3f-b7d2-1c5a9e3b7f40
                    person_name: Sam Patel
                    person_job_title: Senior Software Engineer
                    company_name: Wise
                    email: sam@gmail.com
                    from_email: riya@acmetalent.com
                    sender_team_member_id: 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                    enrollment_status: active
                    reply_intent: null
                    id: 0c4e6a8b-2d5f-4a7c-8e9b-3d5f7b9a1c19
                    step_id: 9d2e7a14-61c3-4b8f-8f0e-3a5c9b2d4e17
                    step_number: 2
                    type: email
                    subject: 'Re: Senior Backend Engineer role at Monzo'
                    status: pending
                    editable: true
                    next_send_at: '2026-10-22T09:14:00.000Z'
                    sent_at: null
                    opens: 0
                    clicks: 0
                  - enrollment_id: e7b1d3f5-9a2c-4e6b-8d0f-3a5c7e9b1d42
                    campaign_id: 3f9a1c27-8e4b-4d2a-b6f0-7c1e5a9d2b84
                    campaign_name: Senior Backend Engineer, Monzo
                    campaign_type: candidate
                    campaign_owner_id: 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                    person_id: 2f6b9d1e-4a8c-4e3f-b7d2-1c5a9e3b7f40
                    person_name: Sam Patel
                    person_job_title: Senior Software Engineer
                    company_name: Wise
                    email: sam@gmail.com
                    from_email: riya@acmetalent.com
                    sender_team_member_id: 7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20
                    enrollment_status: active
                    reply_intent: null
                    id: f8a2c4e6-0b3d-4f5a-9c7e-1b3d5f7a9c08
                    step_id: 5b0f3c8e-2a71-4d0e-9a51-6f0c2d7e1a43
                    step_number: 1
                    type: email
                    subject: Senior Backend Engineer role at Monzo
                    status: completed
                    editable: false
                    next_send_at: null
                    sent_at: '2026-10-19T08:03:41.000Z'
                    opens: 0
                    clicks: 1
                meta:
                  total: 12
                  offset: 0
                  limit: 100
                  step_type_counts:
                    email: 8
                    manual: 1
                    text: 0
                    linkedin_message: 1
                    linkedin_connection: 1
                    call: 1
        '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:
    EnrollmentStepsSearchBody:
      type: object
      properties:
        offset:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 1000000
          default: 0
          description: Records to skip for pagination, up to 1,000,000. Defaults to 0.
        limit:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
          description: Max records per page (1–100). Defaults to 100.
        view:
          type: string
          enum:
            - upcoming
            - sent
          default: upcoming
          description: >-
            upcoming lists each running person's next step across your
            campaigns, soonest first. sent lists steps that went out, newest
            first. Defaults to upcoming.
        campaign_ids:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
          maxItems: 100
          description: Only steps of these campaigns, up to 100.
        campaign_owner_ids:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
          maxItems: 100
          description: Only steps of campaigns owned by these team members, up to 100.
        sender_team_member_ids:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
          maxItems: 100
          description: Only steps sent (or to be sent) by these team members, up to 100.
        step_types:
          type: array
          items:
            type: string
            enum:
              - email
              - manual
              - text
              - linkedin_message
              - linkedin_connection
              - call
          minItems: 1
          description: >-
            Only steps of these types. meta.step_type_counts still counts every
            type, so you can show how many of each there are.
        next_send_before:
          type: string
          format: date-time
          description: >-
            upcoming only: steps due to go out before this time, for example the
            end of today.
        sent_after:
          type: string
          format: date-time
          description: >-
            sent only: steps sent at or after this time. Defaults to 30 days
            before sent_before (or now). The period can be at most 90 days.
        sent_before:
          type: string
          format: date-time
          description: 'sent only: steps sent before this time. Defaults to now.'
    EnrollmentStepsSearchResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/CampaignQueueStep'
        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.
            step_type_counts:
              type: object
              properties:
                email:
                  type: integer
                manual:
                  type: integer
                text:
                  type: integer
                linkedin_message:
                  type: integer
                linkedin_connection:
                  type: integer
                call:
                  type: integer
              required:
                - email
                - manual
                - text
                - linkedin_message
                - linkedin_connection
                - call
              description: >-
                Steps of each type that match every filter except step_types,
                across all pages.
          required:
            - total
            - offset
            - limit
            - step_type_counts
      required:
        - success
        - data
        - meta
    CampaignQueueStep:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The person's own copy of the step. Pass it as step_id to edit their
            upcoming step.
        enrollment_id:
          type: string
          format: uuid
        campaign_id:
          type: string
          format: uuid
        campaign_name:
          type: string
        campaign_type:
          type: string
          enum:
            - candidate
            - business_development
            - candidate_nurture
            - client_nurture
        campaign_owner_id:
          type: string
          format: uuid
          description: Team member who owns the campaign.
        step_id:
          type: string
          format: uuid
          description: Campaign step it was copied from.
        step_number:
          type: integer
          description: 1-based position of the step in this person's campaign.
        type:
          type: string
          enum:
            - email
            - manual
            - text
            - linkedin_message
            - linkedin_connection
            - call
        subject:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
          description: >-
            Upcoming steps are pending (waiting to go out) or awaiting_task (its
            task was created and the campaign waits for it to be done). Sent
            steps are usually completed or bounced. For a task, call, text or
            LinkedIn step, completed means its task was created, and the task
            itself may still be open.
        editable:
          type: boolean
          description: >-
            Not sent and not being sent, so subject and body can still be
            changed. Signed-in users can edit only the steps they send
            (sender_team_member_id).
        next_send_at:
          type:
            - string
            - 'null'
          description: >-
            upcoming only: the earliest time it can go out, after the wait,
            sending hours and holidays. It can go out later, for example when
            the mailbox has reached its daily limit, is spacing out its sends or
            is disconnected. null for sent steps.
        sent_at:
          type:
            - string
            - 'null'
          description: When it went out. null for upcoming steps.
        person_id:
          type: string
          format: uuid
        person_name:
          type:
            - string
            - 'null'
        person_job_title:
          type:
            - string
            - 'null'
        company_name:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
          description: Address the step is sent to.
        from_email:
          type:
            - string
            - 'null'
          description: Mailbox it is sent from.
        sender_team_member_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Team member it is sent as.
        enrollment_status:
          type:
            - string
            - 'null'
          description: >-
            The person's status in the campaign, as in GET
            /v1/campaigns/{id}/enrollments/{enrollment_id}.
        reply_intent:
          type:
            - string
            - 'null'
          enum:
            - positive
            - neutral
            - negative
          description: >-
            How their reply was read: positive (interested), neutral or negative
            (not interested). null until they reply.
        opens:
          type: integer
          description: Times this step was opened. Always 0 for upcoming steps.
        clicks:
          type: integer
          description: Link clicks in this step. Always 0 for upcoming steps.
      required:
        - id
        - enrollment_id
        - campaign_id
        - campaign_name
        - campaign_type
        - campaign_owner_id
        - step_id
        - step_number
        - type
        - subject
        - status
        - editable
        - next_send_at
        - sent_at
        - person_id
        - person_name
        - person_job_title
        - company_name
        - email
        - from_email
        - sender_team_member_id
        - enrollment_status
        - reply_intent
        - opens
        - clicks
  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.