Creating Documents
Upload documents to a job in your workspace.
The create documents endpoint allows you to upload new documents to a user's job in your workspace.
Endpoint
| Method | Url |
|---|---|
POST | /v1.0/documents |
Note
- Request's
Content-Typemust bemultipart/form-data. - The maximum file size for uploads is 500MB.
Request Parameters
job_id
•
string
required
The job's ID.
title
•
string
deprecated
The document's title.
The document's title is deprecated in favor of the file name, and is no longer used.
file
•
string
required
The document's content.
description
•
string
deprecated
The document's description.
The document's description is deprecated and is no longer used.
document_type_id
•
string
An ID for the type of document being uploaded. You can query for the list of supported Document Types.
Sample Request
bashCopied1curl -X POST 'https://api.worklayer.com/v1.0/documents' \2-H 'Authorization: Bearer {token}' \3-F 'file=@{filepath}' \4-F 'job_id=a439ddfa-6ba4-4b38-8cf0-5d09db1a0af4' \5-F 'document_type_id=PRIOR_YEAR_RETURN'
Response
An instance of document resource.
Sample Response
jsonCopied1{2 "id": "95e6f305-913e-40ad-9c80-ede263670878",3 "title": "document.txt",4 "create_time": "2022-04-11T15:18:00.701Z",5 "update_time": "2022-04-11T15:18:00.701Z",6 "document_type": {7 "id": "PRIOR_YEAR_RETURN",8 "name": "Prior year return"9 }10}
Errors
Forbidden: API Client cannot create members.Unauthorized: API Client does not have valid credentials.BadRequest: Either required properties are missing, or there was a malformed request.
Last updated on October 12, 2022
Privacy PolicyTerms & Conditions© 2026 Taxfyle