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

# Save Greenhouse Connection

> Tests Greenhouse Harvest v3 client credentials, then stores them encrypted, clearing cached candidates when the client ID changed.

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/save-greenhouse-connection
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/save-greenhouse-connection:
    post:
      operationId: saveGreenhouseConnection
      summary: Save Greenhouse Connection
      description: >-
        Tests Greenhouse Harvest v3 client credentials, then stores them
        encrypted, clearing cached candidates when the client ID changed.


        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveGreenhouseConnectionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveGreenhouseConnectionResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SaveGreenhouseConnectionRequest:
      type: object
      properties:
        clientId:
          type: string
          minLength: 1
        clientSecret:
          type: string
          minLength: 1
      required:
        - clientId
        - clientSecret
    SaveGreenhouseConnectionResponse:
      type: object
      properties:
        connected:
          type: boolean
        lastSyncedAt:
          type:
            - string
            - 'null'
        selectedFields:
          type: array
          items:
            type: string
            enum:
              - firstName
              - lastName
              - email
              - jobTitle
              - department
              - country
              - startDate
        candidates:
          type: array
          items:
            type: object
            properties:
              candidateId:
                type: string
              applicationId:
                type:
                  - string
                  - 'null'
              jobId:
                type:
                  - string
                  - 'null'
              firstName:
                type: string
              lastName:
                type: string
              fullName:
                type: string
              email:
                type:
                  - string
                  - 'null'
              jobTitle:
                type:
                  - string
                  - 'null'
              department:
                type:
                  - string
                  - 'null'
              location:
                type:
                  - string
                  - 'null'
              startDate:
                type:
                  - string
                  - 'null'
              hiredAt:
                type:
                  - string
                  - 'null'
              imported:
                type: boolean
              eligible:
                type: boolean
              ineligibleReason:
                type:
                  - string
                  - 'null'
            required:
              - candidateId
              - applicationId
              - jobId
              - firstName
              - lastName
              - fullName
              - email
              - jobTitle
              - department
              - location
              - startDate
              - hiredAt
              - imported
              - eligible
              - ineligibleReason
      required:
        - connected
        - lastSyncedAt
        - selectedFields
        - candidates
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
