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

# Add document to employee

> Uploads an document file for the specified employee.

<Accordion title="Supported integrations" icon="list-check">
  This feature is currently available for the following integrations:

  <ul>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/personio/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/personio">Personio</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/workday/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/workday">Workday</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/afas/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/afas">AFAS Software</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/bamboohr/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/bamboohr">BambooHR</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/hibob/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/hibob">HiBob</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/nmbrs/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/nmbrs">Nmbrs</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/sagehr/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/sagehr">Sage HR</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/hrworks/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/hrworks">HR WORKS</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/youserve/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/youserve">Visma YouServe</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/hansalog/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/hansalog">Hansalog</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/hoorayhr/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/hoorayhr">HoorayHR</a></li>
    <li class="flex items-center"><img src="https://storage.googleapis.com/kombo-assets/integrations/sdworx/icon.svg" height="16px" width="16px" class="m-0 mr-2" /><a href="/hris/connectors/sdworx">SD Worx</a></li>
  </ul>

  You'd like to see this feature for another integration? Please reach out!
  We're always happy to discuss extending our coverage.
</Accordion>

<Note>
  This endpoint requires the permission **Manage documents** to be enabled in [your scope config](/scopes).
</Note>

### Example Request Body

```json theme={null}
{
  "category_id": "3Cjwu7nA7pH5cX5X1NAPmb7M",
  "document": {
    "name": "Frank Doe Employment Contract.txt",
    "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
    "content_type": "text/plain"
  }
}
```


## OpenAPI

````yaml POST /hris/employees/{employee_id}/documents
openapi: 3.1.0
info:
  title: Kombo API
  version: 1.0.0
servers:
  - url: https://api.kombo.dev/v1
    description: Kombo EU API
  - url: https://api.us.kombo.dev/v1
    description: Kombo US API
security:
  - ApiKey: []
tags:
  - name: General
  - name: Kombo Connect
    description: >-
      Endpoints for Kombo Connect, our end-user-facing flow for setting up new
      integrations.
  - name: Unified HRIS API
    description: Unified endpoints to access all the HR concepts you might need.
  - name: Unified ATS API
    description: Unified endpoints to access all the ATS concepts you might need.
  - name: Unified ATS (Assessment & Background Check) API
    description: >-
      Unified endpoints to operate Assessments and Background Checks for many
      applicant tracking systems.
  - name: Unified LMS API
    description: Unified endpoints to access all the LMS concepts you might need.
  - name: AI Apply
    description: Endpoints for AI-powered job application features.
  - name: Custom Endpoints
    description: Custom integration-specific endpoints.
paths:
  /hris/employees/{employee_id}/documents:
    post:
      tags:
        - Unified HRIS API
      summary: Add document to employee
      description: >-
        Uploads an document file for the specified employee.


        <Accordion title="Supported integrations" icon="list-check">

        This feature is currently available for the following integrations:


        <ul>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/personio/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/personio">Personio</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/workday/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/workday">Workday</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/afas/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/afas">AFAS Software</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/bamboohr/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/bamboohr">BambooHR</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/hibob/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/hibob">HiBob</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/nmbrs/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/nmbrs">Nmbrs</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/sagehr/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/sagehr">Sage HR</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/hrworks/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/hrworks">HR WORKS</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/youserve/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/youserve">Visma YouServe</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/hansalog/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/hansalog">Hansalog</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/hoorayhr/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/hoorayhr">HoorayHR</a></li>

        <li class="flex items-center"><img
          src="https://storage.googleapis.com/kombo-assets/integrations/sdworx/icon.svg"
          height="16px"
          width="16px"
          class="m-0 mr-2"
        /><a href="/hris/connectors/sdworx">SD Worx</a></li>

        </ul>


        You'd like to see this feature for another integration? Please reach
        out!

        We're always happy to discuss extending our coverage.

        </Accordion>



        <Note>
          This endpoint requires the permission **Manage documents** to be enabled in [your scope config](/scopes).
        </Note>


        ### Example Request Body


        ```json

        {
          "category_id": "3Cjwu7nA7pH5cX5X1NAPmb7M",
          "document": {
            "name": "Frank Doe Employment Contract.txt",
            "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
            "content_type": "text/plain"
          }
        }

        ```
      operationId: PostHrisEmployeesEmployeeIdDocuments
      parameters:
        - in: header
          name: X-Integration-Id
          schema:
            type: string
          description: ID of the integration you want to interact with.
          example: bamboohr:HWUTwvyx2wLoSUHphiWVrp28
          required: true
        - name: employee_id
          in: path
          required: true
          description: POST /hris/employees/:employee_id/documents Parameter
          schema:
            $ref: >-
              #/components/schemas/PostHrisEmployeesEmployeeIdDocumentsParameterEmployeeId
          examples:
            example1:
              value: GRKdd9dibYKKCrmGRSMJf3wu
      requestBody:
        description: POST /hris/employees/:employee_id/documents Request body
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PostHrisEmployeesEmployeeIdDocumentsRequestBody
            examples:
              example1:
                value:
                  category_id: 3Cjwu7nA7pH5cX5X1NAPmb7M
                  document:
                    name: Frank Doe Employment Contract.txt
                    data: >-
                      SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=
                    content_type: text/plain
      responses:
        '200':
          description: POST /hris/employees/:employee_id/documents Positive response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostHrisEmployeesEmployeeIdDocumentsPositiveResponse
        default:
          $ref: '#/components/responses/ErrorResponseHRIS'
      x-codeSamples:
        - lang: python
          label: PostHrisEmployeesEmployeeIdDocuments
          source: |-
            from kombo import Kombo


            with Kombo(
                integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28",
                api_key="<YOUR_BEARER_TOKEN_HERE>",
            ) as k_client:

                res = k_client.hris.add_employee_document(employee_id="GRKdd9dibYKKCrmGRSMJf3wu", category_id="3Cjwu7nA7pH5cX5X1NAPmb7M", document={
                    "name": "Frank Doe Employment Contract.txt",
                    "content_type": "text/plain",
                    "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
                })

                # Handle response
                print(res)
        - lang: typescript
          label: PostHrisEmployeesEmployeeIdDocuments
          source: |-
            import { Kombo } from "@kombo-api/sdk";

            const kombo = new Kombo({
              integration_id: "workday:HWUTwvyx2wLoSUHphiWVrp28",
              api_key: "<YOUR_BEARER_TOKEN_HERE>",
            });

            async function run() {
              const result = await kombo.hris.addEmployeeDocument({
                employee_id: "GRKdd9dibYKKCrmGRSMJf3wu",
                body: {
                  category_id: "3Cjwu7nA7pH5cX5X1NAPmb7M",
                  document: {
                    name: "Frank Doe Employment Contract.txt",
                    content_type: "text/plain",
                    data: "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=",
                  },
                },
              });

              console.log(result);
            }

            run();
        - lang: ruby
          label: PostHrisEmployeesEmployeeIdDocuments
          source: >-
            require 'kombo'


            Models = ::Kombo::Models

            s = ::Kombo::Kombo.new(
              integration_id: 'workday:HWUTwvyx2wLoSUHphiWVrp28',
              security: Models::Shared::Security.new(
                api_key: '<YOUR_BEARER_TOKEN_HERE>'
              )
            )

            res = s.hris.add_employee_document(employee_id:
            'GRKdd9dibYKKCrmGRSMJf3wu', body:
            Models::Shared::PostHrisEmployeesEmployeeIdDocumentsRequestBody.new(
              category_id: '3Cjwu7nA7pH5cX5X1NAPmb7M',
              document: Models::Shared::Document.new(
                name: 'Frank Doe Employment Contract.txt',
                content_type: 'text/plain',
                data: 'SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4='
              )
            ))


            unless
            res.post_hris_employees_employee_id_documents_positive_response.nil?
              # handle response
            end
components:
  schemas:
    PostHrisEmployeesEmployeeIdDocumentsParameterEmployeeId:
      type: string
    PostHrisEmployeesEmployeeIdDocumentsRequestBody:
      type: object
      properties:
        category_id:
          type: string
        document:
          type: object
          properties:
            name:
              type: string
              description: >-
                File name of the file you want to upload. We recommend providing
                something human-readable with a valid file extension (like
                `Resume.pdf`), as this might be shown in your customer's system.
            content_type:
              type: string
              pattern: ^[\w.-]+\/[\w.-]+$
              description: >-
                Content/MIME type of the file (e.g., `application/pdf`).


                If you provide `data`, this is required. If you provide
                `data_url`, this is optional and we'll attempt to use the
                `Content-Type` header of the response.


                **Note:** Please validate that the content type you provide is
                actually meaningful (and not something generic like
                [`application/octet-stream`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types#applicationoctet-stream)).
                Especially when using object storage (like AWS S3), it's easy to
                accidentally discard the content types of user-provided files,
                so make sure to explicitly persist them when processing uploads
                from your users (see guides for
                [AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html#SysMetadata),
                [Google
                Cloud](https://cloud.google.com/storage/docs/metadata#content-type),
                and
                [Azure](https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types)).
            data_url:
              type: string
              format: uri
              description: >-
                URL to the file you want to upload that can be accessed without
                authentication headers. We will download the content immediately
                when receiving the request, so the URL can be short-lived.


                If you're using an object storage provider (like AWS S3), we
                strongly recommend providing a signed URL for secure access (see
                guides for
                [AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html),
                [Google
                Cloud](https://cloud.google.com/storage/docs/access-control/signed-urls),
                and
                [Azure](https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview)).


                **Note:** You must provide either this or `data_url`. We
                recommend `data_url` over `data` for most cases.
            data:
              type: string
              description: >-
                Base64-encoded contents of the file you want to upload.


                **Note:** You must provide either this or `data_url`. We
                recommend `data_url` over `data` for most cases.
          required:
            - name
      required:
        - category_id
        - document
    PostHrisEmployeesEmployeeIdDocumentsPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
        warnings:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: >-
            These are the interaction warnings that are shown in the dashboard.
            They are meant to provide debug information to you. We recommend
            logging them to the console.
      required:
        - status
        - data
        - warnings
  responses:
    ErrorResponseHRIS:
      description: The standard error response with the error codes for the HRIS use case.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type:
                      - string
                      - 'null'
                    enum:
                      - PLATFORM.RATE_LIMIT_EXCEEDED
                      - PLATFORM.CONCURRENCY_LIMIT_EXCEEDED
                      - PLATFORM.INTEGRATION_NOT_FOUND
                      - PLATFORM.INPUT_INVALID
                      - PLATFORM.UNKNOWN_ERROR
                      - PLATFORM.IP_NOT_WHITELISTED
                      - PLATFORM.AUTHENTICATION_INVALID
                      - PLATFORM.TASK_TIMED_OUT
                      - INTEGRATION.PERMISSION_MISSING
                      - INTEGRATION.AUTHENTICATION_INVALID
                      - INTEGRATION.QA_FAILED
                      - INTEGRATION.SETUP_SYNC_PENDING
                      - INTEGRATION.SETUP_INCOMPLETE
                      - INTEGRATION.INACTIVE
                      - INTEGRATION.MODEL_NOT_AVAILABLE
                      - INTEGRATION.MODEL_DISABLED
                      - INTEGRATION.ACTION_NOT_AVAILABLE
                      - INTEGRATION.ACTION_DISABLED
                      - REMOTE.SERVICE_UNAVAILABLE
                      - REMOTE.RATE_LIMIT_EXCEEDED
                      - REMOTE.INPUT_INVALID
                      - REMOTE.UNKNOWN_HTTP_ERROR
                      - HRIS.STAFFING_ENTITY_CLOSED
                      - HRIS.EMPLOYEE_ALREADY_EXISTS
                    example: HRIS.EMPLOYEE_ALREADY_EXISTS
                    description: >-
                      Some errors include an error code that can be used to
                      identify their cause. See the [Error Handling
                      Docs](https://docs.kombo.dev/guides/errors) for more
                      information. For your error handling logic please use the
                      error `code` instead of other properties (e.g. message,
                      http status code, ...).
                  title:
                    type:
                      - string
                      - 'null'
                    description: A static, human-readable label.
                  message:
                    type: string
                    description: >-
                      A dynamic, detailed description of what went wrong in this
                      specific instance.
                  log_url:
                    type:
                      - string
                      - 'null'
                    format: uri
                    description: >-
                      The log page in the Kombo UI lists every interaction with
                      full details. If you need assistance, share that link with
                      our support team.
                required:
                  - code
                  - title
                  - message
                  - log_url
                description: Error details with structured code for programmatic handling.
            required:
              - status
              - error
          examples:
            Error Response:
              description: >-
                When building error handling logic, always use the `code` field
                to identify specific error types programmatically. See the
                complete list of error codes in the
                [docs](https://docs.kombo.dev/guides/errors).
              value:
                status: error
                error:
                  code: INTEGRATION.MODEL_NOT_AVAILABLE
                  title: >-
                    This data model isn't supported for the selected
                    integration.
                  message: >-
                    The "employees" model is not yet available for Greenhouse.
                    Please reach out to Kombo if you need this functionality.
                  log_url: https://app.kombo.dev/my-prod/logs?interactionId=123456
            Minimal Error Response:
              description: >-
                The "message" is always required while other fields can also be
                `null`. See the [docs](https://docs.kombo.dev/guides/errors) for
                more information.
              value:
                status: error
                error:
                  code: null
                  title: null
                  message: The message is always in the response.
                  log_url: null
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        Create an API key on the [Secrets](https://app.kombo.dev/secrets) page
        in the Kombo dashboard.

````