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

# List connections



## OpenAPI

````yaml /openapi-public.json get /connections
openapi: 3.1.1
info:
  title: Klef API
  description: Klef's multi-tenant HRIS sync platform API.
  version: v1
servers:
  - url: https://{workspace}.klef.ai/api
    variables:
      workspace:
        default: acme
        description: Your workspace's subdomain.
security: []
tags:
  - name: Users
  - name: Connections
  - name: Adoption
  - name: Policy resources
  - name: Audit
  - name: Catalog
  - name: Sync
  - name: Search
  - name: SyncPlans
  - name: Agent
  - name: Auth
  - name: Workspaces
  - name: Billing
  - name: Invitations
  - name: FirstSignIns
  - name: Connection accounts
  - name: Policies
  - name: Secrets
  - name: Lookup tables
  - name: Scripts
  - name: Segments
  - name: ApiKeys
  - name: Members
  - name: Workers
  - name: Inbox
  - name: Notifications
paths:
  /connections:
    get:
      tags:
        - Connections
      summary: List connections
      operationId: ListConnections
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCollectionResponseOfConnectionResponse'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                required:
                  - result
                  - errors
                type: object
                properties:
                  result: {}
                  errors:
                    type: array
                    items:
                      required:
                        - errorCode
                        - errorMessage
                      type: object
                      properties:
                        errorCode:
                          enum:
                            - validation_error
                            - unauthorized
                            - forbidden
                            - not_found
                            - internal_error
                            - error
                            - precondition_required
                            - precondition_failed
                            - invalid_if_match
                            - worker_not_found
                            - worker_version_not_found
                            - connection_not_found
                            - policy_not_found
                            - policy_revision_not_found
                            - lookup_table_not_found
                            - script_not_found
                            - segment_not_found
                            - workspace_secret_not_found
                            - member_not_found
                            - invitation_not_found
                            - user_not_found
                            - workspace_not_found
                            - api_key_not_found
                            - inbox_item_not_found
                            - sync_plan_not_found
                            - connection_account_not_found
                            - managed_account_not_found
                            - adoption_run_not_found
                            - sync_plan_not_ready
                            - sync_plan_stale
                            - sync_plan_already_applying
                            - subdomain_taken
                            - invalid_subdomain
                            - invalid_invite
                            - last_owner_protected
                            - owner_protected
                            - already_member
                            - already_invited
                            - role_not_assignable
                            - invalid_email
                            - email_required
                            - email_mismatch
                            - invitation_gone
                            - invalid_connector_credentials
                            - wrong_connector_type
                            - connection_not_syncable
                            - connector_o_auth_not_configured
                            - connector_authorization_failed
                            - salesforce_manage_users_required
                            - box_admin_required
                            - linear_admin_required
                            - dropbox_admin_required
                            - invalid_match_rule
                            - adoption_run_composed
                            - adoption_run_empty
                            - adoption_selection_refused
                            - invalid_policy
                            - policy_does_not_compile
                            - policy_secret_missing
                            - policy_lookup_table_missing
                            - policy_script_missing
                            - policy_segment_missing
                            - policy_edit_target_missing
                            - policy_secret_disclosure_forbidden
                            - notification_send_failed
                            - invalid_workspace_secret
                            - workspace_secret_referenced
                            - workspace_secret_name_conflict
                            - invalid_lookup_table
                            - lookup_table_referenced
                            - lookup_table_name_conflict
                            - invalid_script
                            - script_name_conflict
                            - script_referenced
                            - invalid_segment
                            - segment_name_conflict
                            - segment_referenced
                            - segment_worker_missing
                            - api_key_scope_not_granted
                            - api_key_limit_reached
                            - subscription_required
                            - already_subscribed
                            - no_billing_customer
                            - workspace_pending_deletion
                            - workspace_deletion_confirmation_mismatch
                            - workspace_deletion_already_scheduled
                            - workspace_deletion_not_scheduled
                            - workspace_export_expired
                            - workspace_export_not_found
                            - agent_conversation_not_found
                            - agent_proposal_not_found
                            - agent_proposal_outdated
                            - agent_proposal_expired
                            - agent_proposal_already_applied
                            - agent_proposal_rejected
                            - notification_kind_unsupported
                            - first_sign_in_not_found
                            - first_sign_in_gone
                            - first_sign_in_not_a_recipient
                            - first_sign_in_recipient_unknown
                            - first_sign_in_locked
                            - first_sign_in_code_refused
                            - first_sign_in_proof_invalid
                            - password_reset_unsupported
                            - invalid_password_rules
                            - avatar_not_owned
                            - unsupported_image_type
                            - image_too_large
                          description: >-
                            The central catalog of every error returned by the
                            API.
                        errorMessage:
                          type: string
                        target:
                          type:
                            - 'null'
                            - string
                      description: "One error in an API response: a specific ApiErrorCode, a human-readable message,\r\n    and an optional string? ApiError.Target (the field a validation error applies to)."
                description: "The envelope for a single-resource response: T? ApiResponse&lt;T&gt;.Result on success, otherwise `null`\r\n    with one or more IReadOnlyList&lt;ApiError&gt; ApiResponse&lt;T&gt;.Errors."
        '403':
          description: Permission denied.
          content:
            application/json:
              schema:
                required:
                  - result
                  - errors
                type: object
                properties:
                  result: {}
                  errors:
                    type: array
                    items:
                      required:
                        - errorCode
                        - errorMessage
                      type: object
                      properties:
                        errorCode:
                          enum:
                            - validation_error
                            - unauthorized
                            - forbidden
                            - not_found
                            - internal_error
                            - error
                            - precondition_required
                            - precondition_failed
                            - invalid_if_match
                            - worker_not_found
                            - worker_version_not_found
                            - connection_not_found
                            - policy_not_found
                            - policy_revision_not_found
                            - lookup_table_not_found
                            - script_not_found
                            - segment_not_found
                            - workspace_secret_not_found
                            - member_not_found
                            - invitation_not_found
                            - user_not_found
                            - workspace_not_found
                            - api_key_not_found
                            - inbox_item_not_found
                            - sync_plan_not_found
                            - connection_account_not_found
                            - managed_account_not_found
                            - adoption_run_not_found
                            - sync_plan_not_ready
                            - sync_plan_stale
                            - sync_plan_already_applying
                            - subdomain_taken
                            - invalid_subdomain
                            - invalid_invite
                            - last_owner_protected
                            - owner_protected
                            - already_member
                            - already_invited
                            - role_not_assignable
                            - invalid_email
                            - email_required
                            - email_mismatch
                            - invitation_gone
                            - invalid_connector_credentials
                            - wrong_connector_type
                            - connection_not_syncable
                            - connector_o_auth_not_configured
                            - connector_authorization_failed
                            - salesforce_manage_users_required
                            - box_admin_required
                            - linear_admin_required
                            - dropbox_admin_required
                            - invalid_match_rule
                            - adoption_run_composed
                            - adoption_run_empty
                            - adoption_selection_refused
                            - invalid_policy
                            - policy_does_not_compile
                            - policy_secret_missing
                            - policy_lookup_table_missing
                            - policy_script_missing
                            - policy_segment_missing
                            - policy_edit_target_missing
                            - policy_secret_disclosure_forbidden
                            - notification_send_failed
                            - invalid_workspace_secret
                            - workspace_secret_referenced
                            - workspace_secret_name_conflict
                            - invalid_lookup_table
                            - lookup_table_referenced
                            - lookup_table_name_conflict
                            - invalid_script
                            - script_name_conflict
                            - script_referenced
                            - invalid_segment
                            - segment_name_conflict
                            - segment_referenced
                            - segment_worker_missing
                            - api_key_scope_not_granted
                            - api_key_limit_reached
                            - subscription_required
                            - already_subscribed
                            - no_billing_customer
                            - workspace_pending_deletion
                            - workspace_deletion_confirmation_mismatch
                            - workspace_deletion_already_scheduled
                            - workspace_deletion_not_scheduled
                            - workspace_export_expired
                            - workspace_export_not_found
                            - agent_conversation_not_found
                            - agent_proposal_not_found
                            - agent_proposal_outdated
                            - agent_proposal_expired
                            - agent_proposal_already_applied
                            - agent_proposal_rejected
                            - notification_kind_unsupported
                            - first_sign_in_not_found
                            - first_sign_in_gone
                            - first_sign_in_not_a_recipient
                            - first_sign_in_recipient_unknown
                            - first_sign_in_locked
                            - first_sign_in_code_refused
                            - first_sign_in_proof_invalid
                            - password_reset_unsupported
                            - invalid_password_rules
                            - avatar_not_owned
                            - unsupported_image_type
                            - image_too_large
                          description: >-
                            The central catalog of every error returned by the
                            API.
                        errorMessage:
                          type: string
                        target:
                          type:
                            - 'null'
                            - string
                      description: "One error in an API response: a specific ApiErrorCode, a human-readable message,\r\n    and an optional string? ApiError.Target (the field a validation error applies to)."
                description: "The envelope for a single-resource response: T? ApiResponse&lt;T&gt;.Result on success, otherwise `null`\r\n    with one or more IReadOnlyList&lt;ApiError&gt; ApiResponse&lt;T&gt;.Errors."
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                required:
                  - result
                  - errors
                type: object
                properties:
                  result: {}
                  errors:
                    type: array
                    items:
                      required:
                        - errorCode
                        - errorMessage
                      type: object
                      properties:
                        errorCode:
                          enum:
                            - validation_error
                            - unauthorized
                            - forbidden
                            - not_found
                            - internal_error
                            - error
                            - precondition_required
                            - precondition_failed
                            - invalid_if_match
                            - worker_not_found
                            - worker_version_not_found
                            - connection_not_found
                            - policy_not_found
                            - policy_revision_not_found
                            - lookup_table_not_found
                            - script_not_found
                            - segment_not_found
                            - workspace_secret_not_found
                            - member_not_found
                            - invitation_not_found
                            - user_not_found
                            - workspace_not_found
                            - api_key_not_found
                            - inbox_item_not_found
                            - sync_plan_not_found
                            - connection_account_not_found
                            - managed_account_not_found
                            - adoption_run_not_found
                            - sync_plan_not_ready
                            - sync_plan_stale
                            - sync_plan_already_applying
                            - subdomain_taken
                            - invalid_subdomain
                            - invalid_invite
                            - last_owner_protected
                            - owner_protected
                            - already_member
                            - already_invited
                            - role_not_assignable
                            - invalid_email
                            - email_required
                            - email_mismatch
                            - invitation_gone
                            - invalid_connector_credentials
                            - wrong_connector_type
                            - connection_not_syncable
                            - connector_o_auth_not_configured
                            - connector_authorization_failed
                            - salesforce_manage_users_required
                            - box_admin_required
                            - linear_admin_required
                            - dropbox_admin_required
                            - invalid_match_rule
                            - adoption_run_composed
                            - adoption_run_empty
                            - adoption_selection_refused
                            - invalid_policy
                            - policy_does_not_compile
                            - policy_secret_missing
                            - policy_lookup_table_missing
                            - policy_script_missing
                            - policy_segment_missing
                            - policy_edit_target_missing
                            - policy_secret_disclosure_forbidden
                            - notification_send_failed
                            - invalid_workspace_secret
                            - workspace_secret_referenced
                            - workspace_secret_name_conflict
                            - invalid_lookup_table
                            - lookup_table_referenced
                            - lookup_table_name_conflict
                            - invalid_script
                            - script_name_conflict
                            - script_referenced
                            - invalid_segment
                            - segment_name_conflict
                            - segment_referenced
                            - segment_worker_missing
                            - api_key_scope_not_granted
                            - api_key_limit_reached
                            - subscription_required
                            - already_subscribed
                            - no_billing_customer
                            - workspace_pending_deletion
                            - workspace_deletion_confirmation_mismatch
                            - workspace_deletion_already_scheduled
                            - workspace_deletion_not_scheduled
                            - workspace_export_expired
                            - workspace_export_not_found
                            - agent_conversation_not_found
                            - agent_proposal_not_found
                            - agent_proposal_outdated
                            - agent_proposal_expired
                            - agent_proposal_already_applied
                            - agent_proposal_rejected
                            - notification_kind_unsupported
                            - first_sign_in_not_found
                            - first_sign_in_gone
                            - first_sign_in_not_a_recipient
                            - first_sign_in_recipient_unknown
                            - first_sign_in_locked
                            - first_sign_in_code_refused
                            - first_sign_in_proof_invalid
                            - password_reset_unsupported
                            - invalid_password_rules
                            - avatar_not_owned
                            - unsupported_image_type
                            - image_too_large
                          description: >-
                            The central catalog of every error returned by the
                            API.
                        errorMessage:
                          type: string
                        target:
                          type:
                            - 'null'
                            - string
                      description: "One error in an API response: a specific ApiErrorCode, a human-readable message,\r\n    and an optional string? ApiError.Target (the field a validation error applies to)."
                description: "The envelope for a single-resource response: T? ApiResponse&lt;T&gt;.Result on success, otherwise `null`\r\n    with one or more IReadOnlyList&lt;ApiError&gt; ApiResponse&lt;T&gt;.Errors."
      security:
        - cookieAuth: []
        - apiKeyAuth: []
components:
  schemas:
    ApiCollectionResponseOfConnectionResponse:
      required:
        - results
        - errors
        - pagination
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionResponse'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
        pagination:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PageInfo'
      description: >-
        The envelope for a collection response: IReadOnlyList&lt;T&gt;
        ApiCollectionResponse&lt;T&gt;.Results.
    ConnectionResponse:
      required:
        - connectorType
      type: object
      anyOf:
        - $ref: '#/components/schemas/ConnectionResponseEntraConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseAdpConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseGustoConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseSlackConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseSalesforceConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseHubspotConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseBoxConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseLinearConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseDropboxConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseOpenaiConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseAnthropicConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseOnePasswordConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseKeeperConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseBitwardenConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseAtlassianConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseNotionConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseBambooHrConnectionResponse'
        - $ref: '#/components/schemas/ConnectionResponseGithubConnectionResponse'
        - $ref: >-
            #/components/schemas/ConnectionResponseGithubEnterpriseConnectionResponse
        - $ref: >-
            #/components/schemas/ConnectionResponseOracleFusionConnectionResponse
        - $ref: >-
            #/components/schemas/ConnectionResponseGoogleWorkspaceConnectionResponse
        - $ref: '#/components/schemas/ConnectionResponseAwsConnectionResponse'
        - $ref: >-
            #/components/schemas/ConnectionResponseAwsIdentityCenterConnectionResponse
        - $ref: '#/components/schemas/ConnectionResponseAzureConnectionResponse'
      discriminator:
        propertyName: connectorType
        mapping:
          microsoft_entra:
            $ref: '#/components/schemas/ConnectionResponseEntraConnectionResponse'
          adp_workforce_now:
            $ref: '#/components/schemas/ConnectionResponseAdpConnectionResponse'
          gusto:
            $ref: '#/components/schemas/ConnectionResponseGustoConnectionResponse'
          slack:
            $ref: '#/components/schemas/ConnectionResponseSlackConnectionResponse'
          salesforce:
            $ref: >-
              #/components/schemas/ConnectionResponseSalesforceConnectionResponse
          hubspot:
            $ref: '#/components/schemas/ConnectionResponseHubspotConnectionResponse'
          box:
            $ref: '#/components/schemas/ConnectionResponseBoxConnectionResponse'
          linear:
            $ref: '#/components/schemas/ConnectionResponseLinearConnectionResponse'
          dropbox:
            $ref: '#/components/schemas/ConnectionResponseDropboxConnectionResponse'
          openai:
            $ref: '#/components/schemas/ConnectionResponseOpenaiConnectionResponse'
          anthropic:
            $ref: '#/components/schemas/ConnectionResponseAnthropicConnectionResponse'
          one_password:
            $ref: >-
              #/components/schemas/ConnectionResponseOnePasswordConnectionResponse
          keeper:
            $ref: '#/components/schemas/ConnectionResponseKeeperConnectionResponse'
          bitwarden:
            $ref: '#/components/schemas/ConnectionResponseBitwardenConnectionResponse'
          atlassian:
            $ref: '#/components/schemas/ConnectionResponseAtlassianConnectionResponse'
          notion:
            $ref: '#/components/schemas/ConnectionResponseNotionConnectionResponse'
          bamboo_hr:
            $ref: '#/components/schemas/ConnectionResponseBambooHrConnectionResponse'
          github:
            $ref: '#/components/schemas/ConnectionResponseGithubConnectionResponse'
          github_enterprise:
            $ref: >-
              #/components/schemas/ConnectionResponseGithubEnterpriseConnectionResponse
          oracle_fusion:
            $ref: >-
              #/components/schemas/ConnectionResponseOracleFusionConnectionResponse
          google_workspace:
            $ref: >-
              #/components/schemas/ConnectionResponseGoogleWorkspaceConnectionResponse
          aws:
            $ref: '#/components/schemas/ConnectionResponseAwsConnectionResponse'
          aws_identity_center:
            $ref: >-
              #/components/schemas/ConnectionResponseAwsIdentityCenterConnectionResponse
          azure:
            $ref: '#/components/schemas/ConnectionResponseAzureConnectionResponse'
    ApiError:
      required:
        - errorCode
        - errorMessage
      type: object
      properties:
        errorCode:
          $ref: '#/components/schemas/ApiErrorCode'
        errorMessage:
          type: string
        target:
          type:
            - 'null'
            - string
      description: "One error in an API response: a specific ApiErrorCode, a human-readable message,\r\n    and an optional string? ApiError.Target (the field a validation error applies to)."
    PageInfo:
      required:
        - nextCursor
        - limit
        - hasMore
      type: object
      properties:
        nextCursor:
          type:
            - 'null'
            - integer
          format: int32
        limit:
          type: integer
          format: int32
        hasMore:
          type: boolean
        total:
          type:
            - 'null'
            - integer
          format: int32
      description: "Cursor-pagination metadata shared across every paged read. int? PageInfo.NextCursor is the\r\noffset of the next page, `null` on the last page."
    ConnectionResponseEntraConnectionResponse:
      required:
        - tenantId
        - clientId
        - hasExchangeConfigured
        - firstSignInKind
        - passLifetimeMinutes
        - passUsableOnce
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - microsoft_entra
          type: string
        tenantId:
          type: string
        clientId:
          type: string
        exchangeOrganization:
          type:
            - 'null'
            - string
        hasExchangeConfigured:
          type: boolean
        firstSignInKind:
          $ref: '#/components/schemas/FirstSignInKind'
        passLifetimeMinutes:
          type: integer
          format: int32
        passUsableOnce:
          type: boolean
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseAdpConnectionResponse:
      required:
        - clientId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - adp_workforce_now
          type: string
        clientId:
          type: string
        baseUrl:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseGustoConnectionResponse:
      required:
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - gusto
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseSlackConnectionResponse:
      required:
        - teamId
        - teamName
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - slack
          type: string
        teamId:
          type: string
        teamName:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseSalesforceConnectionResponse:
      required:
        - organizationId
        - instanceUrl
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - salesforce
          type: string
        organizationId:
          type: string
        instanceUrl:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseHubspotConnectionResponse:
      required:
        - hubId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - hubspot
          type: string
        hubId:
          type: integer
          format: int64
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseBoxConnectionResponse:
      required:
        - enterpriseId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - box
          type: string
        enterpriseId:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseLinearConnectionResponse:
      required:
        - organizationId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - linear
          type: string
        organizationId:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseDropboxConnectionResponse:
      required:
        - teamId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - dropbox
          type: string
        teamId:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseOpenaiConnectionResponse:
      required:
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - openai
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseAnthropicConnectionResponse:
      required:
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - anthropic
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseOnePasswordConnectionResponse:
      required:
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - one_password
          type: string
        scimUrl:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseKeeperConnectionResponse:
      required:
        - scimUrl
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - keeper
          type: string
        scimUrl:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseBitwardenConnectionResponse:
      required:
        - clientId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - bitwarden
          type: string
        clientId:
          type: string
        apiUrl:
          type:
            - 'null'
            - string
        identityUrl:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseAtlassianConnectionResponse:
      required:
        - orgId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - atlassian
          type: string
        orgId:
          type: string
        directoryId:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseNotionConnectionResponse:
      required:
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - notion
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseBambooHrConnectionResponse:
      required:
        - companyDomain
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - bamboo_hr
          type: string
        companyDomain:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseGithubConnectionResponse:
      required:
        - organization
        - installationId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - github
          type: string
        organization:
          type: string
        installationId:
          type: integer
          description: The installation of Klef's GitHub App the connection acts through.
          format: int64
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseGithubEnterpriseConnectionResponse:
      required:
        - enterprise
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - github_enterprise
          type: string
        enterprise:
          type: string
        baseUrl:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseOracleFusionConnectionResponse:
      required:
        - baseUrl
        - username
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - oracle_fusion
          type: string
        baseUrl:
          type: string
        username:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseGoogleWorkspaceConnectionResponse:
      required:
        - adminEmail
        - customerId
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - google_workspace
          type: string
        adminEmail:
          type: string
        customerId:
          type: string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseAwsConnectionResponse:
      required:
        - accessKeyId
        - region
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - aws
          type: string
        accessKeyId:
          type: string
        region:
          type: string
        roleArn:
          type:
            - 'null'
            - string
        organizationRoleName:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseAwsIdentityCenterConnectionResponse:
      required:
        - accessKeyId
        - region
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - aws_identity_center
          type: string
        accessKeyId:
          type: string
        region:
          type: string
        roleArn:
          type:
            - 'null'
            - string
        instanceArn:
          type:
            - 'null'
            - string
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ConnectionResponseAzureConnectionResponse:
      required:
        - tenantId
        - clientId
        - scope
        - assignmentMode
        - id
        - name
        - secretFields
        - createdAt
        - updatedAt
        - version
      properties:
        connectorType:
          enum:
            - azure
          type: string
        tenantId:
          type: string
        clientId:
          type: string
        scope:
          type: string
        assignmentMode:
          $ref: '#/components/schemas/AzureAssignmentMode'
        id:
          type: string
        name:
          type: string
        secretFields:
          type: array
          items:
            type: string
        createdAt:
          $ref: '#/components/schemas/Instant'
        updatedAt:
          $ref: '#/components/schemas/Instant'
        version:
          type: integer
          format: int32
        protected:
          type: boolean
        lastSyncAt:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Instant'
        lastSyncState:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncRunState'
        cadence:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SyncCadenceResponse'
    ApiErrorCode:
      enum:
        - validation_error
        - unauthorized
        - forbidden
        - not_found
        - internal_error
        - error
        - precondition_required
        - precondition_failed
        - invalid_if_match
        - worker_not_found
        - worker_version_not_found
        - connection_not_found
        - policy_not_found
        - policy_revision_not_found
        - lookup_table_not_found
        - script_not_found
        - segment_not_found
        - workspace_secret_not_found
        - member_not_found
        - invitation_not_found
        - user_not_found
        - workspace_not_found
        - api_key_not_found
        - inbox_item_not_found
        - sync_plan_not_found
        - connection_account_not_found
        - managed_account_not_found
        - adoption_run_not_found
        - sync_plan_not_ready
        - sync_plan_stale
        - sync_plan_already_applying
        - subdomain_taken
        - invalid_subdomain
        - invalid_invite
        - last_owner_protected
        - owner_protected
        - already_member
        - already_invited
        - role_not_assignable
        - invalid_email
        - email_required
        - email_mismatch
        - invitation_gone
        - invalid_connector_credentials
        - wrong_connector_type
        - connection_not_syncable
        - connector_o_auth_not_configured
        - connector_authorization_failed
        - salesforce_manage_users_required
        - box_admin_required
        - linear_admin_required
        - dropbox_admin_required
        - invalid_match_rule
        - adoption_run_composed
        - adoption_run_empty
        - adoption_selection_refused
        - invalid_policy
        - policy_does_not_compile
        - policy_secret_missing
        - policy_lookup_table_missing
        - policy_script_missing
        - policy_segment_missing
        - policy_edit_target_missing
        - policy_secret_disclosure_forbidden
        - notification_send_failed
        - invalid_workspace_secret
        - workspace_secret_referenced
        - workspace_secret_name_conflict
        - invalid_lookup_table
        - lookup_table_referenced
        - lookup_table_name_conflict
        - invalid_script
        - script_name_conflict
        - script_referenced
        - invalid_segment
        - segment_name_conflict
        - segment_referenced
        - segment_worker_missing
        - api_key_scope_not_granted
        - api_key_limit_reached
        - subscription_required
        - already_subscribed
        - no_billing_customer
        - workspace_pending_deletion
        - workspace_deletion_confirmation_mismatch
        - workspace_deletion_already_scheduled
        - workspace_deletion_not_scheduled
        - workspace_export_expired
        - workspace_export_not_found
        - agent_conversation_not_found
        - agent_proposal_not_found
        - agent_proposal_outdated
        - agent_proposal_expired
        - agent_proposal_already_applied
        - agent_proposal_rejected
        - notification_kind_unsupported
        - first_sign_in_not_found
        - first_sign_in_gone
        - first_sign_in_not_a_recipient
        - first_sign_in_recipient_unknown
        - first_sign_in_locked
        - first_sign_in_code_refused
        - first_sign_in_proof_invalid
        - password_reset_unsupported
        - invalid_password_rules
        - avatar_not_owned
        - unsupported_image_type
        - image_too_large
      description: The central catalog of every error returned by the API.
    FirstSignInKind:
      enum:
        - password
        - temporary_access_pass
    Instant:
      type: string
      format: date-time
    SyncRunState:
      enum:
        - running
        - succeeded
        - failed
        - partial
        - null
    SyncCadenceResponse:
      required:
        - incrementalSeconds
        - fullRefreshSeconds
      type: object
      properties:
        incrementalSeconds:
          type: integer
          format: int32
        fullRefreshSeconds:
          type: integer
          format: int32
      description: A source connection's sync cadence, as interval seconds.
    AzureAssignmentMode:
      enum:
        - active
        - eligible
      description: >-
        How a principal holds a role: standing, or available to activate through
        PIM.
  securitySchemes:
    cookieAuth:
      type: apiKey
      description: >-
        Cookie-based session. Obtain by completing the `/auth/login/{provider}`
        OAuth flow; the `/auth/callback` response sets the `klef.session` cookie
        that subsequent requests send automatically.
      name: klef.session
      in: cookie
    apiKeyAuth:
      type: http
      description: >-
        An API key from **Settings > API keys**, sent as `Authorization: Bearer
        klef_sk_…`. A key works only on its own workspace's subdomain, and only
        with the permissions its scopes grant.
      scheme: bearer
      bearerFormat: klef_sk_…

````