{
  "openapi": "3.0.0",
  "paths": {
    "/v1/integrations": {
      "get": {
        "operationId": "IntegrationsController_listIntegrations",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationSummary"
                  }
                }
              }
            }
          }
        },
        "summary": "List supported HR systems and what can be read today",
        "tags": [
          "Integrations"
        ]
      }
    },
    "/v1/scopes": {
      "get": {
        "operationId": "IntegrationsController_listScopes",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScopeInfo"
                  }
                }
              }
            }
          }
        },
        "summary": "List data scopes end users can grant",
        "tags": [
          "Integrations"
        ]
      }
    },
    "/v1/coverage": {
      "get": {
        "description": "What each integration supports today, what is planned, and what the vendor requires. Generated from code and metadata.",
        "operationId": "CoverageController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CoverageEntry"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Coverage matrix",
        "tags": [
          "Coverage"
        ]
      }
    },
    "/v1/coverage/{integrationId}": {
      "get": {
        "operationId": "CoverageController_get",
        "parameters": [
          {
            "name": "integrationId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CoverageEntry"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Coverage for one integration",
        "tags": [
          "Coverage"
        ]
      }
    },
    "/v1/connections": {
      "get": {
        "operationId": "ConnectionsController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Connection"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List connections (excludes deleted)",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/connections/{id}": {
      "get": {
        "operationId": "ConnectionsController_get",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get one connection",
        "tags": [
          "Connections"
        ]
      },
      "delete": {
        "description": "Wipes stored credentials and synced data.",
        "operationId": "ConnectionsController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a connection",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/connect/sessions": {
      "post": {
        "description": "Returns a single-use URL (valid 30 minutes) to open for your client, e.g. with openConnect(url) from @remic/connect-sdk.",
        "operationId": "ConnectSessionsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConnectSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a connect link for an end user",
        "tags": [
          "Connect sessions"
        ]
      }
    },
    "/v1/connections/{id}/sync": {
      "post": {
        "description": "Returns the queued run, or the run already queued or running for this connection.",
        "operationId": "SyncController_trigger",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncRun"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Trigger a sync",
        "tags": [
          "Sync"
        ]
      }
    },
    "/v1/connections/{id}/sync-runs": {
      "get": {
        "operationId": "SyncController_listRuns",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SyncRun"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List sync runs, newest first (max 50)",
        "tags": [
          "Sync"
        ]
      }
    },
    "/v1/hris/employees": {
      "get": {
        "description": "Served from the last successful sync. Fields outside the granted scopes are null.",
        "operationId": "HrisController_listEmployees",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List employees",
        "tags": [
          "HRIS"
        ]
      },
      "post": {
        "description": "Written to the HR system during the request. Stored data and employee.created webhooks follow from a sync of the record that starts at once.",
        "operationId": "WritesController_createEmployee",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Same key and body within 24 hours returns the first response without writing again",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmployeeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeWriteResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Valid request the HR system or integration cannot accept (e.g. VENDOR_VALIDATION_FAILED, FIELD_NOT_WRITABLE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The HR system failed or rejected the credentials (VENDOR_AUTH_FAILED, VENDOR_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create an employee (requires scope employees.write)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/employees/{id}": {
      "get": {
        "operationId": "HrisController_getEmployee",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Employee"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get one employee",
        "tags": [
          "HRIS"
        ]
      },
      "patch": {
        "description": "Changes only the fields sent; null clears a value. Ending an employment: set terminationDate.",
        "operationId": "WritesController_updateEmployee",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Same key and body within 24 hours returns the first response without writing again",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmployeeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeWriteResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Valid request the HR system or integration cannot accept (e.g. VENDOR_VALIDATION_FAILED, FIELD_NOT_WRITABLE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The HR system failed or rejected the credentials (VENDOR_AUTH_FAILED, VENDOR_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Update an employee (requires scope employees.write)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/teams": {
      "get": {
        "operationId": "HrisController_listTeams",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List teams (requires scope teams)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/locations": {
      "get": {
        "operationId": "HrisController_listLocations",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List locations (requires scope locations)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/employments": {
      "get": {
        "description": "Job and pay history. Pay fields are null unless the connection has scope compensation.",
        "operationId": "HrisController_listEmployments",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmploymentPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List employments",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/time-off-types": {
      "get": {
        "operationId": "HrisController_listTimeOffTypes",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffTypePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List time-off types (requires scope time_off)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/time-off-requests": {
      "get": {
        "description": "Never includes free-text notes or reasons.",
        "operationId": "HrisController_listTimeOffRequests",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffRequestPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List time-off requests (requires scope time_off)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/hris/time-off-balances": {
      "get": {
        "operationId": "HrisController_listTimeOffBalances",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeOffBalancePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List time-off balances (requires scope time_off)",
        "tags": [
          "HRIS"
        ]
      }
    },
    "/v1/webhooks": {
      "get": {
        "operationId": "WebhooksController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEndpoint"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List webhook endpoints",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "description": "https URLs only; private and internal addresses are rejected. The signing secret is returned only once.",
        "operationId": "WebhooksController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a webhook endpoint",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{id}": {
      "patch": {
        "operationId": "WebhooksController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Update a webhook endpoint",
        "tags": [
          "Webhooks"
        ]
      },
      "delete": {
        "operationId": "WebhooksController_delete",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete a webhook endpoint",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{id}/rotate-secret": {
      "post": {
        "description": "The old secret stops working immediately.",
        "operationId": "WebhooksController_rotateSecret",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookWithSecret"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Rotate the signing secret",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{id}/test": {
      "post": {
        "operationId": "WebhooksController_test",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Send a webhook.test event",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "WebhooksController_deliveries",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PENDING",
                "RETRYING",
                "SUCCEEDED",
                "FAILED"
              ]
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 50,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List deliveries, newest first",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{id}/deliveries/{deliveryId}/retry": {
      "post": {
        "operationId": "WebhooksController_retry",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deliveryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Retry a delivery",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/webhooks/{id}/replay": {
      "post": {
        "description": "Re-delivers events from the last 30 days within [from, to] (max 7 days, max 1000 events) that match the endpoint's current subscriptions, as new deliveries with the original event ids. Receivers should dedupe by event id.",
        "operationId": "WebhooksController_replay",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayWebhookDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Replay stored events",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/v1/connections/{id}/request-logs": {
      "get": {
        "description": "Metadata only (method, path with redacted query values, status, duration). Kept 30 days.",
        "operationId": "OperationsController_requestLogsOf",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Opaque cursor from `next`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "type": "number"
            }
          },
          {
            "name": "source",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "SYNC",
                "TARGETED_SYNC",
                "PASSTHROUGH",
                "CONNECTION_TEST",
                "WEBHOOK_REGISTRATION",
                "FIELD_SAMPLE",
                "WRITE"
              ]
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "description": "`error` = network error or timeout (no HTTP status)",
            "schema": {
              "type": "string",
              "enum": [
                "2xx",
                "4xx",
                "5xx",
                "error"
              ]
            }
          },
          {
            "name": "syncRunId",
            "required": false,
            "in": "query",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestLogPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List vendor calls made for a connection",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/connections/{id}/issues": {
      "get": {
        "operationId": "OperationsController_issuesOf",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionIssue"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List integration health issues of a connection (open first)",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/passthrough": {
      "post": {
        "description": "Requires the sensitive \"passthrough\" scope granted by the end user. Only GET. The vendor status is returned in the body; response bodies are not stored.",
        "operationId": "PassthroughController_execute",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PassthroughRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PassthroughResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Read-only call to the HR system API",
        "tags": [
          "Passthrough"
        ]
      }
    },
    "/v1/connections/{id}/reconnect-link": {
      "post": {
        "description": "Single-use link (valid 7 days) for your client to enter new credentials for an existing connection. Optionally emailed to the person who granted access.",
        "operationId": "ReconnectLinkController_create",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconnectLinkDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReconnectLink"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a reconnect link",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/connections/{id}/scope-request": {
      "post": {
        "description": "Single-use link (valid 7 days) where your client approves additional scopes, for example employees.write, without entering credentials again. Optionally emailed to the person who granted access.",
        "operationId": "ScopeRequestController_create",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScopeRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeRequestLink"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Ask for more scopes on an existing connection",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/ats/jobs/{jobId}/applications": {
      "post": {
        "description": "Creates the candidate, or reuses one the recruiting system matches by email, and their application to this job, during the request. No resumes or cover letters. Stored data and ats.*.changed webhooks follow from a sync that starts at once, when the connection may read candidates.",
        "operationId": "AtsWritesController_createApplication",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Same key and body within 24 hours returns the first response without writing again",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApplicationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationWriteResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Valid request the HR system or integration cannot accept (e.g. VENDOR_VALIDATION_FAILED, FIELD_NOT_WRITABLE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "The HR system failed or rejected the credentials (VENDOR_AUTH_FAILED, VENDOR_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Add an applicant to a job (requires scope ats.candidates.write)",
        "tags": [
          "ATS"
        ]
      }
    },
    "/v1/connections/{id}/files": {
      "post": {
        "description": "Upload your client's HR export (CSV or Excel .xlsx, header row, one row per employee, max 25 MB) as multipart/form-data field `file`. The outcome is in `status`: ACCEPTED queues a sync, HELD waits for column matching or a decision, REJECTED could not be read. Each accepted file is a full list: employees missing from it are marked as deleted.",
        "operationId": "FileExportController_upload",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "File larger than 25 MB (FILE_TOO_LARGE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Deliver an export file to a file-based connection",
        "tags": [
          "Connections"
        ]
      },
      "get": {
        "description": "Latest 20 deliveries, newest first. Metadata only.",
        "operationId": "FileExportController_list",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionFile"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List the files delivered to a connection",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/connections/{id}/sftp": {
      "get": {
        "description": "Where the client's HR system uploads its scheduled export. `account` is null until one is created; `available` is false when hosted SFTP is not set up on this server.",
        "operationId": "SftpController_view",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SftpView"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get a file-based connection's SFTP account",
        "tags": [
          "Connections"
        ]
      },
      "post": {
        "description": "An upload-only SFTP user for this connection. With `publicKey` it logs in with that key; without, a password is generated and returned once.",
        "operationId": "SftpController_create",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSftpAccountDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SftpCredentials"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create the SFTP account",
        "tags": [
          "Connections"
        ]
      },
      "patch": {
        "operationId": "SftpController_update",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSftpAccountDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SftpAccount"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Change public keys, the IP allowlist or remove the password",
        "tags": [
          "Connections"
        ]
      },
      "delete": {
        "description": "Files can no longer be delivered over SFTP.",
        "operationId": "SftpController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Delete the SFTP account",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/connections/{id}/sftp/password": {
      "post": {
        "description": "The old password stops working at once. The new one is returned only in this response.",
        "operationId": "SftpController_rotatePassword",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SftpCredentials"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Generate a new SFTP password",
        "tags": [
          "Connections"
        ]
      }
    },
    "/v1/ats/jobs": {
      "get": {
        "operationId": "AtsController_listJobs",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List jobs (requires scope ats.jobs)",
        "tags": [
          "ATS"
        ]
      }
    },
    "/v1/ats/job-stages": {
      "get": {
        "description": "Stages of hiring pipelines; jobId is null for stages shared by all jobs.",
        "operationId": "AtsController_listJobStages",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "jobId",
            "required": false,
            "in": "query",
            "description": "Only stages of this job (stages shared by all jobs have jobId null)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobStagePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List job stages (requires scope ats.jobs)",
        "tags": [
          "ATS"
        ]
      }
    },
    "/v1/ats/candidates": {
      "get": {
        "description": "Never includes resumes, notes, feedback or offers.",
        "operationId": "AtsController_listCandidates",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CandidatePage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List candidates (requires scope ats.candidates)",
        "tags": [
          "ATS"
        ]
      }
    },
    "/v1/ats/candidates/{id}": {
      "get": {
        "operationId": "AtsController_getCandidate",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Candidate"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get one candidate (requires scope ats.candidates)",
        "tags": [
          "ATS"
        ]
      }
    },
    "/v1/ats/applications": {
      "get": {
        "description": "Optionally of one job (jobId) or one candidate (candidateId). Never includes rejection reasons.",
        "operationId": "AtsController_listApplications",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Cursor from the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 250,
              "default": 100,
              "type": "number"
            }
          },
          {
            "name": "updatedAfter",
            "required": false,
            "in": "query",
            "description": "Only records whose changedAt is after this time",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "name": "includeDeleted",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "name": "jobId",
            "required": false,
            "in": "query",
            "description": "Only applications to this job",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "candidateId",
            "required": false,
            "in": "query",
            "description": "Only applications of this candidate",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List applications (requires scope ats.candidates)",
        "tags": [
          "ATS"
        ]
      }
    },
    "/v1/ats/applications/{id}": {
      "get": {
        "operationId": "AtsController_getApplication",
        "parameters": [
          {
            "name": "X-Connection-Id",
            "in": "header",
            "description": "Connection whose data to read (from GET /v1/connections)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeRemoteData",
            "required": false,
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Application"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_FAILED, MISSING_CONNECTION_ID, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown or revoked API key (INVALID_API_KEY)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The connection was not granted this data (SCOPE_NOT_GRANTED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found or not owned by the caller (NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with the current state (e.g. CONNECTION_NOT_ACTIVE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (RATE_LIMITED); see Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get one application (requires scope ats.candidates)",
        "tags": [
          "ATS"
        ]
      }
    }
  },
  "info": {
    "title": "Remic API",
    "description": "Unified HR and recruiting API: your clients connect their HR system or ATS once, and you read employees, employments, teams, locations, time off, jobs, candidates and applications through one API, with writes for employees and applicants. Authenticate with an API key as a Bearer token. Unified data endpoints also need the X-Connection-Id header. Responses include X-RateLimit-* headers; 429 responses include Retry-After.",
    "version": "0.21",
    "contact": {}
  },
  "tags": [
    {
      "name": "ATS"
    },
    {
      "name": "Connect sessions"
    },
    {
      "name": "Connections"
    },
    {
      "name": "Coverage"
    },
    {
      "name": "HRIS"
    },
    {
      "name": "Integrations"
    },
    {
      "name": "Passthrough"
    },
    {
      "name": "Sync"
    },
    {
      "name": "Webhooks"
    }
  ],
  "servers": [],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "scheme": "bearer",
        "bearerFormat": "API key",
        "type": "http",
        "description": "API key from the dashboard, e.g. remic_live_…"
      }
    },
    "schemas": {
      "IntegrationSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "kenjo"
          },
          "displayName": {
            "type": "string",
            "example": "Kenjo"
          },
          "region": {
            "type": "string",
            "enum": [
              "EU",
              "US",
              "GLOBAL"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "HRIS",
              "ATS"
            ]
          },
          "connectionMode": {
            "type": "string",
            "enum": [
              "API_SELF_SERVE",
              "API_CUSTOMER_ADDON",
              "API_PARTNER",
              "FILE_EXPORT"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "AVAILABLE",
              "COMING_SOON"
            ]
          },
          "capabilities": {
            "example": [
              "employees.read",
              "teams.read",
              "employees.create"
            ],
            "description": "What Remic can read (`<entity>.read`) and write (`employees.create`, `employees.update`) today",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supportsWebhooks": {
            "type": "boolean"
          },
          "storagePolicy": {
            "type": "string",
            "enum": [
              "FULL_STORE",
              "MINIMAL_STORE"
            ]
          },
          "brandColor": {
            "type": "string",
            "example": "#00B3A6"
          }
        },
        "required": [
          "id",
          "displayName",
          "region",
          "category",
          "connectionMode",
          "status",
          "capabilities",
          "supportsWebhooks",
          "storagePolicy",
          "brandColor"
        ]
      },
      "ScopeInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "employees.basic",
              "employees.contact",
              "teams",
              "locations",
              "compensation",
              "time_off",
              "passthrough",
              "employees.write",
              "ai_access",
              "ats.jobs",
              "ats.candidates",
              "ats.candidates.write"
            ]
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sensitive": {
            "type": "boolean"
          },
          "category": {
            "type": "string",
            "enum": [
              "HRIS",
              "ATS"
            ],
            "nullable": true,
            "description": "Category whose connections may hold the scope; null for both (passthrough, ai_access)"
          }
        },
        "required": [
          "id",
          "label",
          "description",
          "sensitive",
          "category"
        ]
      },
      "CoverageEntity": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "SUPPORTED",
              "PLANNED",
              "NOT_AVAILABLE"
            ]
          },
          "fields": {
            "description": "Unified field names actually populated by the mapper (SUPPORTED only)",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "status",
          "fields"
        ]
      },
      "CoverageEntities": {
        "type": "object",
        "properties": {
          "employees": {
            "$ref": "#/components/schemas/CoverageEntity"
          },
          "teams": {
            "$ref": "#/components/schemas/CoverageEntity"
          },
          "locations": {
            "$ref": "#/components/schemas/CoverageEntity"
          },
          "employments": {
            "$ref": "#/components/schemas/CoverageEntity"
          },
          "time_off": {
            "$ref": "#/components/schemas/CoverageEntity"
          },
          "jobs": {
            "description": "ATS: jobs and job stages (fields prefixed jobs. / job_stages.)",
            "allOf": [
              {
                "$ref": "#/components/schemas/CoverageEntity"
              }
            ]
          },
          "candidates": {
            "$ref": "#/components/schemas/CoverageEntity"
          },
          "applications": {
            "$ref": "#/components/schemas/CoverageEntity"
          }
        }
      },
      "CoverageWritableFields": {
        "type": "object",
        "properties": {
          "create": {
            "example": [
              "firstName",
              "lastName"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "update": {
            "example": [
              "jobTitle",
              "terminationDate"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "create",
          "update"
        ]
      },
      "CoverageEntry": {
        "type": "object",
        "properties": {
          "integrationId": {
            "type": "string",
            "example": "kenjo"
          },
          "displayName": {
            "type": "string",
            "example": "Kenjo"
          },
          "category": {
            "type": "string",
            "enum": [
              "HRIS",
              "ATS"
            ]
          },
          "region": {
            "type": "string",
            "enum": [
              "EU",
              "US",
              "GLOBAL"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "AVAILABLE",
              "COMING_SOON"
            ]
          },
          "syncAvailable": {
            "type": "boolean",
            "description": "True only when readers and mappers exist"
          },
          "connectionMode": {
            "type": "string",
            "enum": [
              "API_SELF_SERVE",
              "API_CUSTOMER_ADDON",
              "API_PARTNER",
              "FILE_EXPORT"
            ]
          },
          "connectionModeDescription": {
            "type": "string",
            "example": "Your client's admin creates API credentials"
          },
          "authMethods": {
            "description": "Auth methods permitted by the vendor's terms",
            "example": [
              "api_key"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "entities": {
            "$ref": "#/components/schemas/CoverageEntities"
          },
          "vendorWebhooks": {
            "type": "boolean",
            "description": "Whether the vendor offers webhooks (otherwise polling)"
          },
          "syncFrequencyMinutes": {
            "type": "number",
            "example": 360
          },
          "storagePolicy": {
            "type": "string",
            "enum": [
              "FULL_STORE",
              "MINIMAL_STORE"
            ]
          },
          "requirements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "termsReviewedAt": {
            "type": "string",
            "nullable": true,
            "example": "2026-10-27",
            "description": "Date the vendor's API terms were last reviewed"
          },
          "docsUrl": {
            "type": "string",
            "nullable": true
          },
          "writableFields": {
            "description": "Employee fields writable through POST/PATCH /v1/hris/employees; empty lists when writes are not supported",
            "allOf": [
              {
                "$ref": "#/components/schemas/CoverageWritableFields"
              }
            ]
          },
          "writableApplicationFields": {
            "example": [
              "candidate.firstName",
              "candidate.lastName",
              "candidate.email"
            ],
            "description": "Fields accepted by POST /v1/ats/jobs/{jobId}/applications; empty when the integration cannot create applications (v0.20)",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "integrationId",
          "displayName",
          "category",
          "region",
          "status",
          "syncAvailable",
          "connectionMode",
          "connectionModeDescription",
          "authMethods",
          "entities",
          "vendorWebhooks",
          "syncFrequencyMinutes",
          "storagePolicy",
          "requirements",
          "notes",
          "termsReviewedAt",
          "docsUrl",
          "writableFields",
          "writableApplicationFields"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 404
          },
          "code": {
            "type": "string",
            "example": "NOT_FOUND",
            "description": "Stable machine-readable code"
          },
          "message": {
            "type": "string",
            "example": "Connection not found"
          },
          "details": {
            "type": "object",
            "additionalProperties": true,
            "description": "Extra information, e.g. fieldErrors for VALIDATION_FAILED"
          }
        },
        "required": [
          "statusCode",
          "code",
          "message"
        ]
      },
      "VendorWebhookStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "NOT_SUPPORTED",
              "REGISTERED",
              "MANUAL_SETUP_REQUIRED",
              "FAILED"
            ],
            "description": "Whether the HR system sends change events to Remic (near-real-time updates)"
          },
          "inboundUrl": {
            "type": "string",
            "nullable": true,
            "description": "Always null in the public API"
          },
          "lastEventAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "eventsReceived24h": {
            "type": "number"
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "status",
          "inboundUrl",
          "lastEventAt",
          "eventsReceived24h",
          "error"
        ]
      },
      "Consent": {
        "type": "object",
        "properties": {
          "grantedByName": {
            "type": "string"
          },
          "grantedByEmail": {
            "type": "string",
            "format": "email"
          },
          "grantedByRole": {
            "type": "string",
            "nullable": true
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "grantedByName",
          "grantedByEmail",
          "grantedByRole",
          "grantedAt"
        ]
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "integrationId": {
            "type": "string",
            "example": "kenjo"
          },
          "integrationName": {
            "type": "string",
            "example": "Kenjo"
          },
          "endUserOriginId": {
            "type": "string",
            "description": "Your own ID for your client's company"
          },
          "endUserName": {
            "type": "string"
          },
          "endUserEmail": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING_CUSTOMER_SETUP",
              "PENDING_VENDOR_APPROVAL",
              "ACTIVE",
              "INVALID_CREDENTIALS",
              "PAUSED",
              "DISCONNECTED",
              "DELETED"
            ]
          },
          "scopes": {
            "example": [
              "employees.basic",
              "teams"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "employeeFields": {
            "type": "array",
            "nullable": true,
            "example": [
              "firstName",
              "lastName",
              "workEmail"
            ],
            "description": "Employee fields the end user approved (v0.21). Only these are stored and returned; null when the connection has no field list",
            "items": {
              "type": "string",
              "enum": [
                "firstName",
                "lastName",
                "displayName",
                "workEmail",
                "personalEmail",
                "mobilePhone",
                "employmentStatus",
                "startDate",
                "terminationDate",
                "jobTitle",
                "managerId",
                "teamIds",
                "locationId",
                "customFields"
              ]
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSyncAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSyncStatus": {
            "type": "string",
            "enum": [
              "QUEUED",
              "RUNNING",
              "SUCCEEDED",
              "PARTIAL",
              "FAILED"
            ],
            "nullable": true
          },
          "capabilities": {
            "example": [
              "employees.read"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "vendorWebhook": {
            "$ref": "#/components/schemas/VendorWebhookStatus"
          },
          "health": {
            "type": "string",
            "enum": [
              "HEALTHY",
              "WARNING",
              "ERROR"
            ],
            "description": "Worst open integration health issue"
          },
          "openIssues": {
            "type": "number",
            "description": "Number of open health issues"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When access was revoked (status DISCONNECTED); credentials and synced data are deleted"
          },
          "revokedBy": {
            "type": "string",
            "enum": [
              "END_USER",
              "CUSTOMER"
            ],
            "nullable": true
          },
          "consent": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Consent"
              }
            ]
          }
        },
        "required": [
          "id",
          "integrationId",
          "integrationName",
          "endUserOriginId",
          "endUserName",
          "endUserEmail",
          "status",
          "scopes",
          "employeeFields",
          "createdAt",
          "lastSyncAt",
          "lastSyncStatus",
          "capabilities",
          "vendorWebhook",
          "health",
          "openIssues",
          "revokedAt",
          "revokedBy",
          "consent"
        ]
      },
      "CreateConnectSessionRequest": {
        "type": "object",
        "properties": {
          "endUserOriginId": {
            "type": "string",
            "maxLength": 200,
            "description": "Your own ID for your client's company"
          },
          "endUserName": {
            "type": "string",
            "maxLength": 200,
            "example": "Bakery Schmidt GmbH"
          },
          "endUserEmail": {
            "type": "string",
            "format": "email",
            "maxLength": 320
          },
          "integrationId": {
            "type": "string",
            "maxLength": 100,
            "example": "kenjo",
            "description": "Skip the picker and go straight to this integration"
          },
          "category": {
            "type": "string",
            "enum": [
              "HRIS",
              "ATS"
            ],
            "description": "Kind of system to connect (v0.19). Default: the category of integrationId, else of the requested scopes, else HRIS."
          },
          "scopes": {
            "type": "array",
            "description": "Default for HRIS: employees.basic, teams, locations (employees.basic always included). Default for ATS: ats.jobs, ats.candidates (ats.jobs always included). Scopes of the other category are rejected.",
            "items": {
              "type": "string",
              "enum": [
                "employees.basic",
                "employees.contact",
                "teams",
                "locations",
                "compensation",
                "time_off",
                "passthrough",
                "employees.write",
                "ai_access",
                "ats.jobs",
                "ats.candidates",
                "ats.candidates.write"
              ]
            }
          },
          "employeeFields": {
            "type": "array",
            "example": [
              "firstName",
              "lastName",
              "workEmail"
            ],
            "description": "HRIS only (v0.21): exactly which employee fields you need. The end user approves this list, and nothing else about employees is stored or returned: other fields are null, remoteData is not kept, and employments are not synced. personalEmail and mobilePhone need the employees.contact scope, teamIds needs teams, locationId needs locations; cannot be combined with compensation. Leave out to get every field the scopes allow.",
            "items": {
              "type": "string",
              "enum": [
                "firstName",
                "lastName",
                "displayName",
                "workEmail",
                "personalEmail",
                "mobilePhone",
                "employmentStatus",
                "startDate",
                "terminationDate",
                "jobTitle",
                "managerId",
                "teamIds",
                "locationId",
                "customFields"
              ]
            }
          }
        },
        "required": [
          "endUserOriginId",
          "endUserName"
        ]
      },
      "ConnectSessionResponse": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "example": "https://connect.example.com/?token=…",
            "description": "Open this URL for the end user (popup or redirect)"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "sessionId",
          "url",
          "expiresAt"
        ]
      },
      "EntityStats": {
        "type": "object",
        "properties": {
          "created": {
            "type": "number"
          },
          "updated": {
            "type": "number"
          },
          "deleted": {
            "type": "number"
          },
          "unchanged": {
            "type": "number"
          },
          "skipped": {
            "type": "number"
          }
        },
        "required": [
          "created",
          "updated",
          "deleted",
          "unchanged",
          "skipped"
        ]
      },
      "SyncStats": {
        "type": "object",
        "properties": {
          "teams": {
            "$ref": "#/components/schemas/EntityStats"
          },
          "locations": {
            "$ref": "#/components/schemas/EntityStats"
          },
          "employees": {
            "$ref": "#/components/schemas/EntityStats"
          },
          "employments": {
            "$ref": "#/components/schemas/EntityStats"
          },
          "time_off_types": {
            "$ref": "#/components/schemas/EntityStats"
          },
          "time_off_requests": {
            "$ref": "#/components/schemas/EntityStats"
          },
          "time_off_balances": {
            "$ref": "#/components/schemas/EntityStats"
          }
        }
      },
      "SyncTarget": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "example": "employees"
          },
          "remoteIdCount": {
            "type": "number"
          }
        },
        "required": [
          "entity",
          "remoteIdCount"
        ]
      },
      "SyncRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connectionId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "FULL",
              "INCREMENTAL",
              "TARGETED"
            ]
          },
          "trigger": {
            "type": "string",
            "enum": [
              "INITIAL",
              "SCHEDULED",
              "MANUAL",
              "VENDOR_EVENT",
              "WRITE",
              "FILE"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "RUNNING",
              "SUCCEEDED",
              "PARTIAL",
              "FAILED"
            ]
          },
          "queuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "stats": {
            "$ref": "#/components/schemas/SyncStats"
          },
          "warnings": {
            "description": "Max 50, no personal data",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "targets": {
            "nullable": true,
            "description": "TARGETED runs only: how many changed records per entity",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyncTarget"
            }
          }
        },
        "required": [
          "id",
          "connectionId",
          "type",
          "trigger",
          "status",
          "queuedAt",
          "startedAt",
          "finishedAt",
          "stats",
          "warnings",
          "error",
          "targets"
        ]
      },
      "Employee": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "emp_8f3k2j"
          },
          "remoteId": {
            "type": "string",
            "description": "The vendor's id"
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "workEmail": {
            "type": "string",
            "nullable": true
          },
          "personalEmail": {
            "type": "string",
            "nullable": true,
            "description": "Null unless scope employees.contact"
          },
          "mobilePhone": {
            "type": "string",
            "nullable": true,
            "description": "Null unless scope employees.contact"
          },
          "employmentStatus": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "PENDING",
              "INACTIVE",
              "LEAVE",
              "OTHER"
            ],
            "nullable": true,
            "description": "null only when the connection's employee field list leaves it out (v0.21)"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "terminationDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "jobTitle": {
            "type": "string",
            "nullable": true
          },
          "managerId": {
            "type": "string",
            "nullable": true
          },
          "teamIds": {
            "description": "[] unless scope teams",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "description": "Null unless scope locations"
          },
          "remoteCreatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "customFields": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ],
              "nullable": true
            },
            "description": "Your custom fields, keyed by your custom field keys; {} when none are mapped",
            "example": {
              "shirt_size": "M"
            }
          },
          "changedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When our normalized copy last changed"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "firstName",
          "lastName",
          "displayName",
          "workEmail",
          "personalEmail",
          "mobilePhone",
          "employmentStatus",
          "startDate",
          "terminationDate",
          "jobTitle",
          "managerId",
          "teamIds",
          "locationId",
          "remoteCreatedAt",
          "remoteUpdatedAt",
          "customFields",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "EmployeePage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employee"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "team_3kd9x1"
          },
          "remoteId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "DEPARTMENT",
              "TEAM",
              "COST_CENTER",
              "OTHER"
            ]
          },
          "parentId": {
            "type": "string",
            "nullable": true
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "name",
          "type",
          "parentId",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "TeamPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Team"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "Location": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "loc_9s2kd0"
          },
          "remoteId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "OFFICE",
              "REMOTE",
              "OTHER"
            ]
          },
          "street": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true,
            "description": "ISO 3166-1 alpha-2"
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "name",
          "type",
          "street",
          "city",
          "postalCode",
          "country",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "LocationPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Location"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "Employment": {
        "type": "object",
        "properties": {
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          },
          "id": {
            "type": "string",
            "example": "empl_3kd9x1"
          },
          "remoteId": {
            "type": "string"
          },
          "employeeId": {
            "type": "string",
            "nullable": true,
            "example": "emp_8f3k2"
          },
          "jobTitle": {
            "type": "string",
            "nullable": true
          },
          "employmentType": {
            "type": "string",
            "enum": [
              "FULL_TIME",
              "PART_TIME",
              "CONTRACTOR",
              "INTERN",
              "FREELANCE",
              "OTHER"
            ],
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "isCurrent": {
            "type": "boolean"
          },
          "payRate": {
            "type": "number",
            "nullable": true,
            "description": "Null unless scope compensation"
          },
          "payCurrency": {
            "type": "string",
            "nullable": true,
            "example": "EUR",
            "description": "ISO 4217; null unless scope compensation"
          },
          "payPeriod": {
            "type": "string",
            "enum": [
              "HOUR",
              "DAY",
              "WEEK",
              "MONTH",
              "YEAR"
            ],
            "nullable": true,
            "description": "Null unless scope compensation"
          }
        },
        "required": [
          "changedAt",
          "remoteDeletedAt",
          "remoteData",
          "id",
          "remoteId",
          "employeeId",
          "jobTitle",
          "employmentType",
          "startDate",
          "endDate",
          "isCurrent",
          "payRate",
          "payCurrency",
          "payPeriod"
        ]
      },
      "EmploymentPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Employment"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "TimeOffType": {
        "type": "object",
        "properties": {
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          },
          "id": {
            "type": "string",
            "example": "tot_3kd9x1"
          },
          "remoteId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "Vacation"
          },
          "unit": {
            "type": "string",
            "enum": [
              "DAYS",
              "HOURS"
            ]
          },
          "category": {
            "type": "string",
            "enum": [
              "VACATION",
              "SICK",
              "PARENTAL",
              "UNPAID",
              "OTHER"
            ]
          }
        },
        "required": [
          "changedAt",
          "remoteDeletedAt",
          "remoteData",
          "id",
          "remoteId",
          "name",
          "unit",
          "category"
        ]
      },
      "TimeOffTypePage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOffType"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "TimeOffRequest": {
        "type": "object",
        "properties": {
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          },
          "id": {
            "type": "string",
            "example": "tor_3kd9x1"
          },
          "remoteId": {
            "type": "string"
          },
          "employeeId": {
            "type": "string",
            "nullable": true
          },
          "typeId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "REQUESTED",
              "APPROVED",
              "DECLINED",
              "CANCELLED",
              "OTHER"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "Inclusive"
          },
          "startHalfDay": {
            "type": "boolean"
          },
          "endHalfDay": {
            "type": "boolean"
          },
          "amount": {
            "type": "number",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "enum": [
              "DAYS",
              "HOURS"
            ],
            "nullable": true
          }
        },
        "required": [
          "changedAt",
          "remoteDeletedAt",
          "remoteData",
          "id",
          "remoteId",
          "employeeId",
          "typeId",
          "status",
          "startDate",
          "endDate",
          "startHalfDay",
          "endHalfDay",
          "amount",
          "unit"
        ]
      },
      "TimeOffRequestPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOffRequest"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "TimeOffBalance": {
        "type": "object",
        "properties": {
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          },
          "id": {
            "type": "string",
            "example": "tob_3kd9x1"
          },
          "remoteId": {
            "type": "string"
          },
          "employeeId": {
            "type": "string",
            "nullable": true
          },
          "typeId": {
            "type": "string",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "nullable": true
          },
          "used": {
            "type": "number",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "enum": [
              "DAYS",
              "HOURS"
            ]
          },
          "asOf": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        },
        "required": [
          "changedAt",
          "remoteDeletedAt",
          "remoteData",
          "id",
          "remoteId",
          "employeeId",
          "typeId",
          "balance",
          "used",
          "unit",
          "asOf"
        ]
      },
      "TimeOffBalancePage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeOffBalance"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "example": "https://app.example.com/hooks/remic"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "connection.created",
                "connection.invalid_credentials",
                "connection.deleted",
                "connection.issue_detected",
                "connection.issue_resolved",
                "connection.revoked",
                "connection.reconnected",
                "connection.scopes_added",
                "sync.finished",
                "hris.employees.changed",
                "hris.teams.changed",
                "hris.locations.changed",
                "hris.employments.changed",
                "hris.time_off_types.changed",
                "hris.time_off_requests.changed",
                "hris.time_off_balances.changed",
                "ats.jobs.changed",
                "ats.job_stages.changed",
                "ats.candidates.changed",
                "ats.applications.changed",
                "webhook.test",
                "*"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ENABLED",
              "DISABLED"
            ]
          },
          "secretPrefix": {
            "type": "string",
            "example": "whsec_ab12cd"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "status",
          "secretPrefix",
          "createdAt"
        ]
      },
      "CreateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000,
            "example": "https://app.example.com/hooks/remic"
          },
          "events": {
            "type": "array",
            "description": "Event types, or '*' for all",
            "items": {
              "type": "string",
              "enum": [
                "connection.created",
                "connection.invalid_credentials",
                "connection.deleted",
                "connection.issue_detected",
                "connection.issue_resolved",
                "connection.revoked",
                "connection.reconnected",
                "connection.scopes_added",
                "sync.finished",
                "hris.employees.changed",
                "hris.teams.changed",
                "hris.locations.changed",
                "hris.employments.changed",
                "hris.time_off_types.changed",
                "hris.time_off_requests.changed",
                "hris.time_off_balances.changed",
                "ats.jobs.changed",
                "ats.job_stages.changed",
                "ats.candidates.changed",
                "ats.applications.changed",
                "webhook.test",
                "*"
              ]
            }
          },
          "description": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "url",
          "events"
        ]
      },
      "WebhookWithSecret": {
        "type": "object",
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/WebhookEndpoint"
          },
          "secret": {
            "type": "string",
            "example": "whsec_…",
            "description": "Signing secret, shown only in this response"
          }
        },
        "required": [
          "webhook",
          "secret"
        ]
      },
      "UpdateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "connection.created",
                "connection.invalid_credentials",
                "connection.deleted",
                "connection.issue_detected",
                "connection.issue_resolved",
                "connection.revoked",
                "connection.reconnected",
                "connection.scopes_added",
                "sync.finished",
                "hris.employees.changed",
                "hris.teams.changed",
                "hris.locations.changed",
                "hris.employments.changed",
                "hris.time_off_types.changed",
                "hris.time_off_requests.changed",
                "hris.time_off_balances.changed",
                "ats.jobs.changed",
                "ats.job_stages.changed",
                "ats.candidates.changed",
                "ats.applications.changed",
                "webhook.test",
                "*"
              ]
            }
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "status": {
            "type": "string",
            "enum": [
              "ENABLED",
              "DISABLED"
            ]
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "evt_2k9d8s"
          },
          "type": {
            "type": "string",
            "enum": [
              "connection.created",
              "connection.invalid_credentials",
              "connection.deleted",
              "connection.issue_detected",
              "connection.issue_resolved",
              "connection.revoked",
              "connection.reconnected",
              "connection.scopes_added",
              "sync.finished",
              "hris.employees.changed",
              "hris.teams.changed",
              "hris.locations.changed",
              "hris.employments.changed",
              "hris.time_off_types.changed",
              "hris.time_off_requests.changed",
              "hris.time_off_balances.changed",
              "ats.jobs.changed",
              "ats.job_stages.changed",
              "ats.candidates.changed",
              "ats.applications.changed",
              "webhook.test"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "id",
          "type",
          "createdAt",
          "data"
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpointId": {
            "type": "string",
            "format": "uuid"
          },
          "eventId": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "RETRYING",
              "SUCCEEDED",
              "FAILED"
            ]
          },
          "attempts": {
            "type": "number"
          },
          "lastResponseStatus": {
            "type": "number",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          },
          "responseBodySnippet": {
            "type": "string",
            "nullable": true
          },
          "nextAttemptAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookEvent"
          }
        },
        "required": [
          "id",
          "endpointId",
          "eventId",
          "eventType",
          "status",
          "attempts",
          "lastResponseStatus",
          "lastError",
          "responseBodySnippet",
          "nextAttemptAt",
          "createdAt",
          "deliveredAt",
          "payload"
        ]
      },
      "DeliveryPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "ReplayWebhookDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the window (inclusive)"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "End of the window (inclusive); at most 7 days after `from`"
          },
          "eventTypes": {
            "type": "array",
            "description": "Only these types (intersected with the endpoint's current subscriptions)",
            "items": {
              "type": "string",
              "enum": [
                "connection.created",
                "connection.invalid_credentials",
                "connection.deleted",
                "connection.issue_detected",
                "connection.issue_resolved",
                "connection.revoked",
                "connection.reconnected",
                "connection.scopes_added",
                "sync.finished",
                "hris.employees.changed",
                "hris.teams.changed",
                "hris.locations.changed",
                "hris.employments.changed",
                "hris.time_off_types.changed",
                "hris.time_off_requests.changed",
                "hris.time_off_balances.changed",
                "ats.jobs.changed",
                "ats.job_stages.changed",
                "ats.candidates.changed",
                "ats.applications.changed",
                "webhook.test"
              ]
            }
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "ReplayResult": {
        "type": "object",
        "properties": {
          "deliveriesCreated": {
            "type": "number",
            "description": "New deliveries created (original event ids)"
          }
        },
        "required": [
          "deliveriesCreated"
        ]
      },
      "RequestLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connectionId": {
            "type": "string",
            "format": "uuid"
          },
          "syncRunId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "SYNC",
              "TARGETED_SYNC",
              "PASSTHROUGH",
              "CONNECTION_TEST",
              "WEBHOOK_REGISTRATION",
              "FIELD_SAMPLE",
              "WRITE"
            ]
          },
          "method": {
            "type": "string",
            "example": "GET"
          },
          "path": {
            "type": "string",
            "example": "/v1/staff?page=***",
            "description": "Query string values replaced with ***"
          },
          "status": {
            "type": "number",
            "nullable": true,
            "description": "null on network error or timeout"
          },
          "durationMs": {
            "type": "number"
          },
          "errorCode": {
            "type": "string",
            "nullable": true,
            "example": "VENDOR_TIMEOUT"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "connectionId",
          "syncRunId",
          "source",
          "method",
          "path",
          "status",
          "durationMs",
          "errorCode",
          "createdAt"
        ]
      },
      "RequestLogPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestLog"
            }
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "ConnectionIssue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connectionId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "AUTH_FAILED",
              "PERMISSION_DENIED",
              "SYNC_FAILING",
              "RATE_LIMITED",
              "WEBHOOK_STALE",
              "FILE_NOT_PROCESSED",
              "FILE_OVERDUE"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "WARNING",
              "ERROR"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "RESOLVED"
            ]
          },
          "message": {
            "type": "string",
            "description": "What the client's admin should do"
          },
          "occurrences": {
            "type": "number"
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "resolvedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "id",
          "connectionId",
          "type",
          "severity",
          "status",
          "message",
          "occurrences",
          "firstSeenAt",
          "lastSeenAt",
          "resolvedAt"
        ]
      },
      "PassthroughRequestDto": {
        "type": "object",
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "GET"
            ],
            "description": "Only GET in this version"
          },
          "path": {
            "type": "string",
            "example": "/employees",
            "description": "Relative to the integration’s API base; must start with \"/\", no \"..\", scheme or host"
          },
          "query": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "limit": "50"
            }
          }
        },
        "required": [
          "method",
          "path"
        ]
      },
      "PassthroughResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "number",
            "description": "HTTP status returned by the HR system"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Filtered to content, pagination and rate-limit headers"
          },
          "body": {
            "type": "object",
            "description": "Body returned by the HR system (max 5 MB)"
          }
        },
        "required": [
          "status",
          "headers",
          "body"
        ]
      },
      "UpdateSftpAccountDto": {
        "type": "object",
        "properties": {
          "publicKeys": {
            "description": "Replaces all public keys (at most 5)",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedIps": {
            "description": "Replaces the IP allowlist: addresses or CIDR ranges (at most 20); empty allows any address",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "passwordEnabled": {
            "type": "boolean",
            "enum": [
              false
            ],
            "description": "false removes the password (needs a public key)"
          }
        }
      },
      "ReconnectLinkDto": {
        "type": "object",
        "properties": {
          "sendEmail": {
            "type": "boolean",
            "description": "Also email the link to the person who granted access (the consent email). Default false.",
            "default": false
          }
        }
      },
      "ReconnectLink": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Single-use link (valid 7 days) for your client to enter new credentials"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "emailSent": {
            "type": "boolean",
            "description": "Whether the link was emailed to the person who granted access"
          }
        },
        "required": [
          "url",
          "expiresAt",
          "emailSent"
        ]
      },
      "ScopeRequestDto": {
        "type": "object",
        "properties": {
          "scopes": {
            "type": "array",
            "description": "Scopes to ask the end user for. Scopes the connection already has are ignored.",
            "example": [
              "employees.write"
            ],
            "items": {
              "type": "string",
              "enum": [
                "employees.basic",
                "employees.contact",
                "teams",
                "locations",
                "compensation",
                "time_off",
                "passthrough",
                "employees.write",
                "ai_access",
                "ats.jobs",
                "ats.candidates",
                "ats.candidates.write"
              ]
            }
          },
          "sendEmail": {
            "type": "boolean",
            "description": "Also email the link to the person who granted access (the consent email). Default false.",
            "default": false
          }
        },
        "required": [
          "scopes"
        ]
      },
      "ScopeRequestLink": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Single-use link (valid 7 days) where your client approves the added scopes"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "emailSent": {
            "type": "boolean",
            "description": "Whether the link was emailed to the person who granted access"
          },
          "scopes": {
            "type": "array",
            "description": "Scopes the end user is asked to add (requested minus already granted)",
            "items": {
              "type": "string",
              "enum": [
                "employees.basic",
                "employees.contact",
                "teams",
                "locations",
                "compensation",
                "time_off",
                "passthrough",
                "employees.write",
                "ai_access",
                "ats.jobs",
                "ats.candidates",
                "ats.candidates.write"
              ]
            }
          }
        },
        "required": [
          "url",
          "expiresAt",
          "emailSent",
          "scopes"
        ]
      },
      "CreateEmployeeDto": {
        "type": "object",
        "properties": {
          "workEmail": {
            "type": "object",
            "format": "email",
            "nullable": true
          },
          "personalEmail": {
            "type": "object",
            "format": "email",
            "nullable": true,
            "description": "Needs scope employees.contact"
          },
          "mobilePhone": {
            "type": "object",
            "nullable": true,
            "description": "Needs scope employees.contact"
          },
          "jobTitle": {
            "type": "object",
            "nullable": true
          },
          "startDate": {
            "type": "object",
            "example": "2026-11-01",
            "nullable": true
          },
          "managerId": {
            "type": "object",
            "nullable": true,
            "description": "Remic employee id of the manager"
          },
          "teamIds": {
            "description": "Remic team ids; replaces the list. Needs scope teams",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationId": {
            "type": "object",
            "nullable": true,
            "description": "Remic location id. Needs scope locations"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          }
        },
        "required": [
          "firstName",
          "lastName"
        ]
      },
      "MappingWarning": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "UNKNOWN_ENUM_VALUE"
          },
          "field": {
            "type": "string",
            "example": "employmentStatus"
          }
        },
        "required": [
          "code",
          "field"
        ]
      },
      "EmployeeWriteResult": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Mapped from the HR system's reply. customFields fill in after the refresh sync that starts at once.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Employee"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingWarning"
            }
          }
        },
        "required": [
          "data",
          "warnings"
        ]
      },
      "UpdateEmployeeDto": {
        "type": "object",
        "properties": {
          "workEmail": {
            "type": "object",
            "format": "email",
            "nullable": true
          },
          "personalEmail": {
            "type": "object",
            "format": "email",
            "nullable": true,
            "description": "Needs scope employees.contact"
          },
          "mobilePhone": {
            "type": "object",
            "nullable": true,
            "description": "Needs scope employees.contact"
          },
          "jobTitle": {
            "type": "object",
            "nullable": true
          },
          "startDate": {
            "type": "object",
            "example": "2026-11-01",
            "nullable": true
          },
          "managerId": {
            "type": "object",
            "nullable": true,
            "description": "Remic employee id of the manager"
          },
          "teamIds": {
            "description": "Remic team ids; replaces the list. Needs scope teams",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationId": {
            "type": "object",
            "nullable": true,
            "description": "Remic location id. Needs scope locations"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "terminationDate": {
            "type": "object",
            "example": "2026-12-31",
            "nullable": true,
            "description": "Ends the employment; null removes a planned end"
          }
        }
      },
      "CandidateWriteDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Recruiting systems usually match an existing candidate by email and add the application to them"
          },
          "phone": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "example": "Example Job Board",
            "description": "Where the candidate came from, e.g. your job board"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "firstName",
          "lastName",
          "email"
        ]
      },
      "CreateApplicationDto": {
        "type": "object",
        "properties": {
          "candidate": {
            "$ref": "#/components/schemas/CandidateWriteDto"
          },
          "stageId": {
            "type": "string",
            "description": "Remic id of a stage of this job; default: the job's first stage"
          }
        },
        "required": [
          "candidate"
        ]
      },
      "Application": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "appl_5kq2m1"
          },
          "remoteId": {
            "type": "string"
          },
          "candidateId": {
            "type": "string",
            "nullable": true
          },
          "jobId": {
            "type": "string",
            "nullable": true
          },
          "stageId": {
            "type": "string",
            "nullable": true,
            "description": "Current stage"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "HIRED",
              "REJECTED",
              "WITHDRAWN",
              "OTHER"
            ]
          },
          "appliedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "rejectedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "hiredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "candidateId",
          "jobId",
          "stageId",
          "status",
          "appliedAt",
          "rejectedAt",
          "hiredAt",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "Candidate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "cand_0WjDLS"
          },
          "remoteId": {
            "type": "string"
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true,
            "example": "linkedin"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "remoteCreatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "firstName",
          "lastName",
          "email",
          "phone",
          "source",
          "tags",
          "remoteCreatedAt",
          "remoteUpdatedAt",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "CreatedApplication": {
        "type": "object",
        "properties": {
          "application": {
            "$ref": "#/components/schemas/Application"
          },
          "candidate": {
            "description": "The new candidate, or the existing one the recruiting system matched (usually by email)",
            "allOf": [
              {
                "$ref": "#/components/schemas/Candidate"
              }
            ]
          }
        },
        "required": [
          "application",
          "candidate"
        ]
      },
      "ApplicationWriteResult": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Mapped from the recruiting system's reply",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreatedApplication"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MappingWarning"
            }
          }
        },
        "required": [
          "data",
          "warnings"
        ]
      },
      "ConnectionFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "number"
          },
          "sha256": {
            "type": "string",
            "description": "SHA-256 of the content (hex)"
          },
          "via": {
            "type": "string",
            "enum": [
              "CONNECT",
              "DASHBOARD",
              "API",
              "SFTP"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACCEPTED",
              "HELD",
              "REJECTED",
              "DUPLICATE"
            ],
            "description": "ACCEPTED: used for syncing (a sync was queued). HELD: readable but not used yet, see reason. REJECTED: unreadable, see reason. DUPLICATE: same content as the previous file."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "HELD: MAPPING_REQUIRED, COLUMNS_MISSING or SUSPICIOUS_DROP. REJECTED: UNSUPPORTED_FORMAT, EMPTY_FILE, NO_HEADER, TOO_LARGE, TOO_MANY_ROWS, TOO_MANY_COLUMNS or UNREADABLE."
          },
          "missingColumns": {
            "nullable": true,
            "description": "COLUMNS_MISSING: matched column keys the file lacks",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rowCount": {
            "type": "number",
            "nullable": true
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "contentAvailable": {
            "type": "boolean",
            "description": "false once retention removed the content (metadata stays)"
          }
        },
        "required": [
          "id",
          "fileName",
          "sizeBytes",
          "sha256",
          "via",
          "status",
          "reason",
          "missingColumns",
          "rowCount",
          "receivedAt",
          "acceptedAt",
          "contentAvailable"
        ]
      },
      "SftpPublicKey": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "ssh-ed25519"
          },
          "fingerprint": {
            "type": "string",
            "example": "SHA256:Jx5n0B…",
            "description": "As ssh-keygen -l shows it"
          }
        },
        "required": [
          "type",
          "fingerprint"
        ]
      },
      "SftpAccount": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "example": "sftp.example.com"
          },
          "port": {
            "type": "number",
            "example": 2222
          },
          "username": {
            "type": "string",
            "example": "hrc_k3m9x2p7qa"
          },
          "directory": {
            "type": "string",
            "enum": [
              "/"
            ],
            "description": "Upload files directly into the home directory (no folders)"
          },
          "passwordEnabled": {
            "type": "boolean"
          },
          "passwordSetAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "publicKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SftpPublicKey"
            }
          },
          "allowedIps": {
            "description": "IP addresses or CIDR ranges allowed to log in; empty allows any",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastUploadAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "host",
          "port",
          "username",
          "directory",
          "passwordEnabled",
          "passwordSetAt",
          "publicKeys",
          "allowedIps",
          "createdAt",
          "lastLoginAt",
          "lastUploadAt"
        ]
      },
      "SftpView": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Hosted SFTP is set up on this server"
          },
          "account": {
            "nullable": true,
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SftpAccount"
              }
            ]
          }
        },
        "required": [
          "available",
          "account"
        ]
      },
      "CreateSftpAccountDto": {
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string",
            "description": "OpenSSH public key (ssh-ed25519, ecdsa-sha2-…, ssh-rsa from 2048 bits). Without one a password is generated and returned once."
          }
        }
      },
      "SftpCredentials": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/SftpAccount"
          },
          "password": {
            "type": "string",
            "nullable": true,
            "description": "The generated password. Returned only here, once; store it in the HR system right away. null when a public key is used."
          }
        },
        "required": [
          "account",
          "password"
        ]
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "job_3kd9x1"
          },
          "remoteId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "Senior Backend Engineer"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "CLOSED",
              "DRAFT",
              "ARCHIVED",
              "OTHER"
            ]
          },
          "employmentType": {
            "type": "string",
            "enum": [
              "FULL_TIME",
              "PART_TIME",
              "CONTRACTOR",
              "INTERN",
              "FREELANCE",
              "OTHER"
            ],
            "nullable": true
          },
          "department": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true,
            "description": "Location as the ATS shows it (free text)"
          },
          "remote": {
            "type": "boolean",
            "nullable": true
          },
          "openedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "closedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteCreatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "name",
          "status",
          "employmentType",
          "department",
          "location",
          "remote",
          "openedAt",
          "closedAt",
          "remoteCreatedAt",
          "remoteUpdatedAt",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "JobPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "JobStage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "jstg_8d2kq0"
          },
          "remoteId": {
            "type": "string"
          },
          "jobId": {
            "type": "string",
            "nullable": true,
            "description": "null for pipelines shared by all jobs"
          },
          "name": {
            "type": "string",
            "example": "Interview"
          },
          "order": {
            "type": "number",
            "nullable": true
          },
          "changedAt": {
            "type": "string",
            "format": "date-time"
          },
          "remoteDeletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "remoteData": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "Raw vendor payload, only with includeRemoteData=true, stripped to granted scopes"
          }
        },
        "required": [
          "id",
          "remoteId",
          "jobId",
          "name",
          "order",
          "changedAt",
          "remoteDeletedAt",
          "remoteData"
        ]
      },
      "JobStagePage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobStage"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "CandidatePage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Candidate"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      },
      "ApplicationPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Application"
            }
          },
          "next": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor for the next page; null on the last page"
          }
        },
        "required": [
          "results",
          "next"
        ]
      }
    }
  }
}