---
title: "Add document to employee"
method: POST
path: "/hris/employees/{employee_id}/documents"
tags: ["Unified HRIS API"]
---

# Add document to employee

`POST /hris/employees/{employee_id}/documents`

Uploads an document file for the specified employee.

<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"
  }
}
```

## Path parameters

- `employee_id` string, required

## Headers

- `X-Integration-Id` string, required

## Request body

- PostHrisEmployeesEmployeeIdDocumentsRequestBody
  - `category_id` string, required
  - `document` object, required
    - `name` string, required — 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` string — 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` string, uri — 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` string — 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.
  - `remote_fields` object — Additional fields that we will pass through to specific HRIS systems.
    - `afas` object — Fields specific to AFAS.
      - `Fields` object — Additional fields that we will pass through to the AFAS `KnSubject` `Fields` object. These are merged on top of the default fields (`StId`, `Ds`, and `FvF1`).

## Response `200`

POST /hris/employees/:employee_id/documents Positive response

- PostHrisEmployeesEmployeeIdDocumentsPositiveResponse
  - `status` 'success', required
  - `data` object, required
  - `warnings` object[], required — 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.
    - `message` string, required

## Other responses

- `default` — The standard error response with the error codes for the HRIS use case.

---

[API](https://skmtc.net/kombo/apis/kombo-api.md) · [All operations](https://skmtc.net/kombo/apis/kombo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kombo/kombo-api/revisions/0cfc9fa971c0/schema)
