Upload Company File

Upload a company file

Sample Request

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

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 employees (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.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!