> ## 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.

# Update candidate

> Update existing candidate from CV and form details. Used by the candidate portal when an existing candidate updates their profile.



## OpenAPI

````yaml /api-reference/openapi.json post /candidate-portal/{candidateId}
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /candidate-portal/{candidateId}:
    post:
      tags:
        - Candidate Portal
      summary: Update candidate
      description: >-
        Update existing candidate from CV and form details. Used by the
        candidate portal when an existing candidate updates their profile.
      operationId: handleCandidatePortalSubmission
      parameters:
        - name: candidateId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CandidatePortalSubmissionDto'
      responses:
        '204':
          description: Candidate updated 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 phone number format
                      error:
                        type: string
                        example: Bad Request
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '404':
          description: Candidate not found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        example: 404
                      message:
                        type: string
                        example: Candidate not found
                      error:
                        type: string
                        example: Not Found
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    CandidatePortalSubmissionDto:
      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} '’.-]+$
        latestCvAttachmentId:
          type: string
          minLength: 1
          maxLength: 100
        emails:
          type: array
          items:
            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
        phoneNumbers:
          type: array
          items:
            type: object
            properties:
              phoneNumber:
                type: string
              purpose:
                anyOf:
                  - type: string
                    enum:
                      - personal
                      - work
                  - type: 'null'
              isPrimary:
                type: boolean
            required:
              - phoneNumber
              - purpose
        socialMedia:
          type: array
          items:
            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
      id: PrivateCandidatePortalSubmissionDto
    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.

````