---
title: "Worker Document"
method: POST
path: "/workers/{workerId}/documents"
tags: ["Worker"]
---

# Worker Document

`POST /workers/{workerId}/documents`

## Request

- Base URL: `https://api.paychex.com`
- URL: `https://api.paychex.com/workers/{workerId}/documents`
- Auth: none declared
- TypeScript: <https://skmtc.dev/paychex/apis/external-api/docs/workers/:workerId/documents/post.ts> (a function with typed inputs; its response is checked against the schema)

Add a document to an "Active" or "Terminated" worker.

## Path parameters

- `workerId` string, required

## Request body `multipart/form-data`

- FileResource
  - `file` string, binary, required
  - `metadata` DocumentManagementResource, required
    - `docId` string: The document id associated with this document.
    - `name` string: The name of the document.
    - `expirationReminderDays` integer
    - `expirationDate` string, date-time: The expiration date of the document.
    - `category` string, required: The category id of the document.
    - `workerVisible` boolean: Flag for if the document is visible to the worker.
    - `workerVisibleDate` string, date-time: The date that the document is visible to the worker.
    - `document` string: The document data in base64. This field cannot be POSTED. The document should be POSTED in the 'file' field.
    - `_links` Links
  - `notificationToggle` boolean: The notification toggle for send notification.

## Response `200`

successful operation

- object
  - `content` DocumentManagementResource
    - `docId` string: The document id associated with this document.
    - `name` string: The name of the document.
    - `expirationReminderDays` integer
    - `expirationDate` string, date-time: The expiration date of the document.
    - `category` string, required: The category id of the document.
    - `workerVisible` boolean: Flag for if the document is visible to the worker.
    - `workerVisibleDate` string, date-time: The date that the document is visible to the worker.
    - `document` string: The document data in base64. This field cannot be POSTED. The document should be POSTED in the 'file' field.
    - `_links` Links
  - `links` Link1[]
    - `href` string
    - `hreflang` string
    - `title` string
    - `type` string
    - `deprecation` string
    - `profile` string
    - `name` string
    - `templated` boolean

## Other responses

- `400`: Uploaded document is not an acceptable file type. (API-62), Uploaded document exceeds maximum allowed size. (API-4)
- `401`: Unauthorized
- `403`: User doesn't have access to this endpoint (API-2), Client has been end dated (API-68)
- `404`: Invalid resource ID (API-7)
- `405`: Unsupported method type (API-59)
- `406`: Unsupported Accept header
- `423`: Client locked (API-10)
- `500`: Internal Server Error.

---

[API](https://skmtc.dev/paychex/apis/external-api.md) - [All operations](https://skmtc.dev/paychex/apis/external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paychex/apis/external-api/revisions/07161d3e073f?raw)
