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

# Create candidate

> Create a new candidate from CV and form details. Used by the candidate portal when a candidate submits their application.



## OpenAPI

````yaml /api-reference/openapi.json post /candidate-portal/open-application
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /candidate-portal/open-application:
    post:
      tags:
        - Candidate Portal
      summary: Create candidate
      description: >-
        Create a new candidate from CV and form details. Used by the candidate
        portal when a candidate submits their application.
      operationId: handleCandidatePortalOpenApplication
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CandidatePortalOpenApplicationDto'
      responses:
        '200':
          description: Candidate created successfully
        '400':
          description: Bad request - missing or invalid required fields
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        example: 400
                      message:
                        type: string
                        example: Invalid email format
                      error:
                        type: string
                        example: Bad Request
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    CandidatePortalOpenApplicationDto:
      type: object
      properties:
        firstName:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^(?=.*\p{L})[\p{L}\p{M} '’.-]+$
        lastName:
          type: string
          minLength: 1
          maxLength: 100
          pattern: ^(?=.*\p{L})[\p{L}\p{M} '’.-]+$
        cvAttachmentId:
          type: string
          minLength: 1
          maxLength: 100
        email:
          type: object
          properties:
            email:
              type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            purpose:
              anyOf:
                - type: string
                  enum:
                    - personal
                    - work
                - type: 'null'
            isPrimary:
              type: boolean
          required:
            - email
            - purpose
        phoneNumber:
          type: object
          properties:
            phoneNumber:
              type: string
            purpose:
              anyOf:
                - type: string
                  enum:
                    - personal
                    - work
                - type: 'null'
            isPrimary:
              type: boolean
          required:
            - phoneNumber
            - purpose
        socialMedia:
          type: object
          properties:
            url:
              format: uri
              type: string
            type:
              type: string
              enum:
                - LINKEDIN
                - TWITTER
                - FACEBOOK
                - INSTAGRAM
            isPrimary:
              type: boolean
          required:
            - url
            - type
      required:
        - firstName
        - lastName
        - cvAttachmentId
        - email
        - phoneNumber
      id: PrivateCandidatePortalOpenApplicationDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for authentication. Get your API key from Settings → API Keys in
        your Spott dashboard.

````