Upload Employee File

Upload an employee file

Sample Request

POST /api/gateway.php/sample/v1/employees/1/files/ HTTP/1.0
Host: api.bamboohr.com
Content-Type: multipart/form-data; boundary=----BambooHR-MultiPart-Mime-Boundary----
Content-Length: 520
Content-Disposition: form-data; name="category"
Content-Disposition: form-data; name="fileName"
Content-Disposition: form-data; name="share"
Content-Disposition: form-data; name="file"; filename="readme.txt"
Content-Type: text/plain
This is a sample text file.

Submission Fields

category - the category ID to place the new file in.
fileName - the file name to associate with the file.
share - whether to make the file available to the employee (options are "yes" and "no").
file - the file to upload. Note that the field must be named "file".

Special Notes

The file upload methods accept multi-part forms. To build a multi-part form concatenate the individual sections together separated by a boundary. Then take the length of the resulting body and use that as the Content-Length for the submission.

Click Try It! to start a request and see the response here!