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

# Preflight enrollments

> Analyzes matching contacts before enrollment and creates a preflight that expires after 15 minutes. Returns candidate totals, conflicts, available source cleanup groups, and replied-contact information. validationRunId must reference a completed validation run containing at least one contact.



## OpenAPI

````yaml https://multichannel-api.salesforge.ai/public/multichannel/swagger/doc.json post /multichannel/workspaces/{workspaceID}/sequences/{sequenceID}/enrollments/preflight
openapi: 3.1.0
info:
  description: Multichannel public endpoints consumed through salesforge-api public docs.
  title: Multichannel Public API
  version: '1.0'
servers:
  - url: https://multichannel-api.salesforge.ai/public
security:
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
  - ApiKeyAuth: []
externalDocs:
  description: ''
  url: ''
paths:
  /multichannel/workspaces/{workspaceID}/sequences/{sequenceID}/enrollments/preflight:
    post:
      tags:
        - multichannel
      summary: Preflight enrollments
      description: >-
        Analyzes matching contacts before enrollment and creates a preflight
        that expires after 15 minutes. Returns candidate totals, conflicts,
        available source cleanup groups, and replied-contact information.
        validationRunId must reference a completed validation run containing at
        least one contact.
      parameters:
        - description: Workspace ID
          in: path
          name: workspaceID
          required: true
          schema:
            type: string
        - description: Sequence ID
          in: path
          name: sequenceID
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                - $ref: '#/components/schemas/requests.EnrollmentPreflightRequest'
                  description: Contact selection criteria and preflight options.
                  summary: request
        description: Contact selection criteria and preflight options.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.EnrollmentPreflightResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/responses.ErrorResponse'
                  - $ref: >-
                      #/components/schemas/responses.EnrollmentPreflightSelectionEmptyResponse
          description: >-
            Invalid request, including a completed validation run with no
            selected contacts
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/responses.EnrollmentPreflightValidationConflictResponse
          description: The validation run is incomplete or failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    requests.EnrollmentPreflightRequest:
      properties:
        filters:
          $ref: '#/components/schemas/requests.EnrollmentFiltersRequest'
        limit:
          description: Maximum number of candidate contacts.
          type: integer
        selectionScope:
          description: >-
            Sequence decision-membership scope. in_sequence includes contacts
            with any draft-sequence enrollment or an enrollment whose status is
            active, paused, out_of_office, failed, company_limit_reached, or
            replied. not_in_sequence includes all other contacts, including
            contacts whose only enrollments are completed, dnc, unsubscribed, or
            bounced. Defaults to all.
          enum:
            - all
            - not_in_sequence
            - in_sequence
          type: string
      type: object
    responses.EnrollmentPreflightResponse:
      description: Enrollment preflight.
      properties:
        expiresAt:
          description: Preflight expiration time.
          format: date-time
          type: string
        moveGroups:
          description: Source sequences available for cleanup.
          items:
            $ref: '#/components/schemas/responses.EnrollmentPreflightMoveGroup'
          type: array
          uniqueItems: false
        preflightId:
          description: Saved preflight ID used by preview and confirm.
          example: 2f4f75ad-2527-4e89-b0dc-2cd75589c64f
          type: string
        repliedDecision:
          $ref: '#/components/schemas/responses.EnrollmentPreflightRepliedDecision'
        summary:
          $ref: '#/components/schemas/responses.EnrollmentPreflightSummary'
      type: object
    responses.ErrorResponse:
      properties:
        data:
          description: >-
            Optional error context. Its shape depends on the message and
            endpoint.
        message:
          description: >-
            Human-readable error text or, for documented cases, a stable
            machine-readable code that clients can branch on.
          example: Invalid request body
          type: string
      type: object
    responses.EnrollmentPreflightSelectionEmptyResponse:
      properties:
        message:
          description: Stable error code.
          enum:
            - validation_run_selection_empty
          example: validation_run_selection_empty
          type: string
      type: object
    responses.EnrollmentPreflightValidationConflictResponse:
      properties:
        data:
          $ref: >-
            #/components/schemas/responses.EnrollmentPreflightValidationConflictData
        message:
          description: >-
            Stable error code. Branch on validation_run_not_completed or
            validation_run_failed.
          enum:
            - validation_run_not_completed
            - validation_run_failed
          example: validation_run_not_completed
          type: string
      type: object
    requests.EnrollmentFiltersRequest:
      description: Contact filters.
      properties:
        customVarIds:
          description: Custom variable IDs to include.
          items:
            type: string
          type: array
          uniqueItems: false
        customVars:
          description: Custom variable values to include.
          items:
            type: string
          type: array
          uniqueItems: false
        esps:
          description: Email service providers to include.
          items:
            type: string
          type: array
          uniqueItems: false
        excludeContacted:
          description: Whether to exclude contacts that have already been contacted.
          type: boolean
        hasEmail:
          description: Whether to require an email address.
          type: boolean
        hasValidLinkedIn:
          description: Whether to require a valid LinkedIn profile.
          type: boolean
        leadIds:
          description: >-
            Contact IDs to include. Intersected with validationRunId when both
            are provided.
          items:
            type: string
          type: array
          uniqueItems: false
        notInCustomVarIds:
          description: Custom variable IDs to exclude.
          items:
            type: string
          type: array
          uniqueItems: false
        notInCustomVars:
          description: Custom variable values to exclude.
          items:
            type: string
          type: array
          uniqueItems: false
        notInESPs:
          description: Email service providers to exclude.
          items:
            type: string
          type: array
          uniqueItems: false
        notInLeadIds:
          description: Contact IDs to exclude.
          items:
            type: string
          type: array
          uniqueItems: false
        notInTagIds:
          description: Tag IDs to exclude.
          items:
            type: string
          type: array
          uniqueItems: false
        searchQuery:
          description: Contact search query.
          type: string
        tagIds:
          description: Tag IDs to include.
          items:
            type: string
          type: array
          uniqueItems: false
        validationRunId:
          description: >-
            Completed validation run ID. The run must contain at least one
            contact.
          type: string
        validationStatuses:
          description: Email validation statuses to include.
          items:
            enum:
              - safe
              - invalid
              - disabled
              - disposable
              - inbox_full
              - catch_all
              - role_account
              - spamtrap
              - unknown
              - unvalidated
              - linkedin_only
            type: string
          type: array
          uniqueItems: false
      type: object
    responses.EnrollmentPreflightMoveGroup:
      properties:
        selectedContactCount:
          description: >-
            Decision contacts associated with this source sequence. A contact
            can appear in multiple move groups, so do not sum this field across
            groups.
          example: 9
          type: integer
        sequenceId:
          description: Source sequence ID.
          example: 42
          type: integer
        sequenceName:
          description: Source sequence name.
          example: Q3 outbound
          type: string
        sequenceStatus:
          description: Source sequence status.
          example: active
          type: string
      type: object
    responses.EnrollmentPreflightRepliedDecision:
      description: Replied-contact decision details.
      properties:
        contactCount:
          description: Decision contacts with a replied source enrollment.
          example: 2
          type: integer
      type: object
    responses.EnrollmentPreflightSummary:
      description: Candidate and decision counts.
      properties:
        alreadyInTargetCount:
          description: Contacts already enrolled in the target sequence.
          example: 3
          type: integer
        automaticEnrollmentCount:
          description: Contacts eligible for enrollment without conflict resolution.
          example: 85
          type: integer
        candidateCount:
          description: Contacts captured in the preflight snapshot.
          example: 100
          type: integer
        decisionRequiredCount:
          description: >-
            Contacts requiring a skip or move decision because of existing
            enrollments or replies.
          example: 12
          type: integer
      type: object
    responses.EnrollmentPreflightValidationConflictData:
      description: Validation run context.
      properties:
        runId:
          description: Validation run ID.
          example: 2f4f75ad-2527-4e89-b0dc-2cd75589c64f
          type: string
        status:
          description: Current validation run status.
          enum:
            - pending
            - in_progress
            - failed
          example: in_progress
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey

````