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

# Queue past-participant invites on a draft

> Select past participants on a draft and invite them when the project goes live.

Use this workflow when you want to choose participants before launch. Your organization needs the participant database source enabled and your team needs access to the participant database.

1. Create a draft project. Set `targetNumberOfParticipants` to the number you want from the Respondent panel, or to `0` for a study inviting only past participants. Then [search your team's past participants](https://developers.respondent.io/team-respondents/search-past-participants.md) for their profile IDs.
2. Add the selected profiles to the draft. Set `skipScreener` and an invitation message for each batch. Submit separate batches if some people should complete the screener and others should skip it. Participants still need to accept any required NDA.
3. Publish the project. Publication triggers an invitation attempt once the project is live. If the project goes to review, [send the queued invitations](https://developers.respondent.io/team-respondents/send-queued-invitations.md) after approval.
4. [Check the queue](https://developers.respondent.io/team-respondents/list-queued-invitations.md) after publish. If participants are still queued, retry the send on the live project. A successful publish alone does not confirm delivery to everyone.

For moderated projects, set `externalResearcher.bookingUrl` to your scheduling page and report confirmed bookings through the [scheduling endpoint](https://developers.respondent.io/docs/Screener-responses/scheduling.md). To invite people immediately to an existing live project, use [batch invite](https://developers.respondent.io/team-respondents/invite-multiple-past-participants.md).


## OpenAPI

````yaml post /v1/projects/{projectId}/pending-invites
openapi: 3.0.0
info:
  title: Partner API
  description: Public API for partner integrations
  version: '1.0'
  contact: {}
servers:
  - url: https://api-staging.respondent.io
security: []
tags: []
paths:
  /v1/projects/{projectId}/pending-invites:
    post:
      tags:
        - projects
      summary: Queue past-participant invites on a draft
      operationId: ProjectsController_addPendingInvites
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
        - name: x-api-secret
          in: header
          required: true
          schema:
            type: string
        - name: projectId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddPendingInvitesDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingInvitesDto'
components:
  schemas:
    AddPendingInvitesDto:
      type: object
      properties:
        participants:
          type: array
          items:
            $ref: '#/components/schemas/PendingInviteSelectionDto'
        skipScreener:
          type: boolean
        message:
          type: string
      required:
        - participants
        - skipScreener
        - message
    PendingInvitesDto:
      type: object
      properties:
        participants:
          type: array
          items:
            $ref: '#/components/schemas/PendingInviteParticipantDto'
        lastAttempt:
          $ref: '#/components/schemas/PendingInvitesLastAttemptDto'
        sent:
          type: number
          minimum: 0
      required:
        - participants
        - sent
    PendingInviteSelectionDto:
      type: object
      properties:
        profileId:
          type: string
          format: ObjectId
        sourceProjectId:
          type: string
          description: Source project on the same team, for follow-up provenance.
          format: ObjectId
      required:
        - profileId
    PendingInviteParticipantDto:
      type: object
      properties:
        profileId:
          type: string
          format: ObjectId
        sourceProjectId:
          type: string
          description: Source project on the same team, for follow-up provenance.
          format: ObjectId
        firstName:
          type: string
        lastName:
          type: string
          description: Surname initial.
        picture:
          type: string
        skipScreener:
          type: boolean
        addedAt:
          format: date-time
          type: string
      required:
        - profileId
        - firstName
        - lastName
        - skipScreener
        - addedAt
    PendingInvitesLastAttemptDto:
      type: object
      properties:
        at:
          format: date-time
          type: string
        trigger:
          enum:
            - launch
            - manual
          type: string
        outcome:
          enum:
            - failed
            - partial
            - completed
          type: string
        reason:
          enum:
            - UNEXPECTED_ERROR
            - TIMEOUT
            - PROJECT_BUSY
          type: string
        notInvited:
          type: array
          items:
            $ref: '#/components/schemas/PendingInviteNotInvitedDto'
      required:
        - at
        - trigger
        - outcome
        - notInvited
    PendingInviteNotInvitedDto:
      type: object
      properties:
        profileId:
          type: string
          format: ObjectId
        name:
          type: string
        reason:
          enum:
            - ADMITTED
            - INVITED_TO_APPLY
            - AWAITING_RESEARCHER
            - SKIPPED_ALREADY_RESPONDED
            - SKIPPED_ALREADY_INVITED
            - SKIPPED_PROJECT_LINK_REQUIRED
            - SKIPPED_PROJECT_CLOSED
            - SKIPPED_PROFILE_DISABLED
            - SKIPPED_ERROR
          type: string
      required:
        - profileId
        - reason

````

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