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

# Create Invite

> Sends an assessment invite to a candidate. The invite email is dispatched automatically after creation.

One invite is created per request. To send multiple invites, make separate requests for each recipient.




## OpenAPI

````yaml POST /invites
openapi: 3.0.3
info:
  title: AlfaOne Public API
  description: >
    Public API for third-party integrations with AlfaOne assessment platform.


    ## Authentication

    All endpoints require an API key passed in the `x-api-key` header.

    API keys can be generated from the Integrations page in your organization's
    admin dashboard.


    Each API key is scoped to a single organization, and all data returned will
    be filtered to that organization.
  version: 1.0.0
  contact:
    name: AlfaOne Support
servers:
  - url: https://alfaone.app/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Assessments
    description: Operations related to assessments
  - name: Questions
    description: Operations related to assessment questions
  - name: Members
    description: Operations related to organization members
  - name: Invites
    description: Operations related to assessment invites
  - name: Tags
    description: Operations related to organization tags
paths:
  /invites:
    post:
      tags:
        - Invites
      summary: Create an assessment invite
      description: >
        Sends an assessment invite to a candidate. The invite email is
        dispatched automatically after creation.


        One invite is created per request. To send multiple invites, make
        separate requests for each recipient.
      operationId: createInvite
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInviteRequest'
      responses:
        '201':
          description: Invite created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  invite:
                    $ref: '#/components/schemas/InviteSummary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateInviteRequest:
      type: object
      required:
        - assessmentId
        - recipientEmail
      properties:
        assessmentId:
          type: string
          format: uuid
          description: ID of the assessment to invite the candidate to
        recipientEmail:
          type: string
          format: email
          description: Email address of the candidate
        questionReplayLimit:
          type: integer
          minimum: 1
          default: 1
          description: Maximum number of times a candidate can replay each question
        answerRecordLimit:
          type: integer
          minimum: 1
          default: 1
          description: Maximum number of recording attempts per answer
        expiresInDays:
          type: integer
          minimum: 1
          default: 30
          description: Number of days until the invite expires
        proctoringSettings:
          type: object
          description: Proctoring configuration. All options default to true if omitted.
          properties:
            screenRecording:
              type: boolean
              default: true
              description: Enable screen recording during the assessment
            webcamMonitoring:
              type: boolean
              default: true
              description: Enable webcam monitoring during the assessment
            requireIdCapture:
              type: boolean
              default: true
              description: Require ID capture before starting the assessment
    InviteSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the invite
        assessmentId:
          type: string
          format: uuid
          description: ID of the assessment
        assessmentName:
          type: string
          description: Name of the assessment
        recipientEmail:
          type: string
          format: email
          description: Email address of the invited candidate
        recipientName:
          type: string
          nullable: true
          description: Name of the invited candidate
        status:
          type: string
          enum:
            - pending
            - accepted
            - started
            - completed
            - expired
            - revoked
          description: Current status of the invite
        questionReplayLimit:
          type: integer
          description: Maximum number of times a candidate can replay each question
        answerRecordLimit:
          type: integer
          description: Maximum number of recording attempts per answer
        sentAt:
          type: string
          format: date-time
          description: When the invite was sent
        expiresAt:
          type: string
          format: date-time
          description: When the invite expires
        acceptedAt:
          type: string
          format: date-time
          nullable: true
          description: When the invite was accepted
        startedAt:
          type: string
          format: date-time
          nullable: true
          description: When the candidate started the assessment
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: When the candidate completed the assessment
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_field:
              summary: Missing required field
              value:
                error: assessmentId is required
            invalid_email:
              summary: Invalid email format
              value:
                error: recipientEmail is not a valid email address
            invalid_limit:
              summary: Invalid limit value
              value:
                error: questionReplayLimit must be a positive integer
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_key:
              summary: Missing API key
              value:
                error: API key is required
            invalid_key:
              summary: Invalid API key
              value:
                error: Invalid API key
            expired_key:
              summary: Expired API key
              value:
                error: API key has expired
            revoked_key:
              summary: Revoked API key
              value:
                error: API key has been revoked
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Assessment not found
    Conflict:
      description: Resource already exists
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: An invite for this email and assessment already exists
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Format:
        ak_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

````