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

# Update Candidate

> Update the status of a candidate



## OpenAPI

````yaml https://api.ropes.ai/api/docs/openapi.json patch /api/public/candidates/{candidateId}/status
openapi: 3.0.0
info:
  title: Ropes Public API
  version: 1.0.0
  description: >-
    Public API for Ropes. Authenticate using your API key in the x-api-key
    header.
servers:
  - url: https://api.ropes.ai
    description: Production server
  - url: http://localhost:3001
    description: Local development server
security: []
paths:
  /api/public/candidates/{candidateId}/status:
    patch:
      tags:
        - Candidates
      summary: Update Candidate
      description: Update the status of a candidate
      parameters:
        - schema:
            type: string
            description: The unique identifier of the candidate
          required: true
          description: The unique identifier of the candidate
          name: candidateId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCandidateStatusRequest'
      responses:
        '200':
          description: Successfully updated candidate status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCandidateStatusResponse'
        '400':
          description: Bad request - Invalid status or missing status field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Candidate not found or no change in status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCandidateStatusErrorResponse'
        '500':
          description: Server error while updating candidate status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCandidateStatusErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateCandidateStatusRequest:
      type: object
      properties:
        status:
          type: string
          enum:
            - Not Assigned
            - Assigned
            - Expired
            - Completed
            - Passed
            - Failed
            - Error
          description: New status for the candidate
      required:
        - status
    UpdateCandidateStatusResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the operation was successful
        updated:
          type: boolean
          description: Whether the candidate status was updated
      required:
        - success
        - updated
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Error message (alternative field)
    UpdateCandidateStatusErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the operation was successful
        updated:
          type: boolean
          description: Whether the candidate status was updated
        error:
          type: string
          description: Error message
      required:
        - success
        - updated
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````