# Upload a document (user-scoped) **POST /transact-workflow/v1/users/{userId}/documents** Uploads a document file to a transaction under the specified user's path. Equivalent to `POST /transact-workflow/v1/Documents` with the user supplied in the path instead of the form body. The request is sent as `multipart/form-data`. ## Servers - Production API gateway: https://gateway.lwolf.com (Production API gateway) - Environment-specific host (e.g. pre-production): https://api.pre.lwolf.com (Environment-specific host (e.g. pre-production)) ## Authentication methods - Bearer auth & Subscription key ## Parameters ### Path parameters - **userId** (string(uuid)) Unique identifier (GUID) of the acting user. ### Body: multipart/form-data (object) - **name** (string) Display name of the document. - **file** (string(binary)) The document file to upload. - **transactionId** (string(uuid)) GUID of the transaction the document belongs to. - **parentId** (string(uuid)) Optional GUID of the folder to place the document in. - **formId** (string(uuid)) Optional GUID of a form to associate the document with. ## Responses ### 201 Document uploaded. ### 400 The request is malformed or contains invalid parameters. #### Body: application/json (object) - **error** (string) Error code or short error name. - **message** (string) Human-readable error description. ### 401 The access token is missing, invalid, or expired. #### Body: application/json (object) - **error** (string) Error code or short error name. - **message** (string) Human-readable error description. ### 403 The caller is not permitted to perform this operation. #### Body: application/json (object) - **error** (string) Error code or short error name. - **message** (string) Human-readable error description. ### 404 The requested resource does not exist. #### Body: application/json (object) - **error** (string) Error code or short error name. - **message** (string) Human-readable error description. [Powered by Bump.sh](https://bump.sh)