Uploads a new photo for an employee. Accepts a multipart/form-data POST with a file field carrying raw binary image bytes (typical browser and SDK usage). An application/json POST with a fileBase64 property is also accepted, but it is not recommended for AI connector use. The base64 payload is too large for an AI model to produce reliably in a single tool call. Supported formats: JPEG, PNG, BMP, GIF. Other formats (HEIC, SVG, AVIF, WebP) are rejected with 415. TIFF is accepted by the format gate but some variants may fail downstream. The image must be square within 1 pixel and at least 150×150 pixels. This endpoint does not perform cropping, so if your source image is not square, you must crop it before uploading. Photo upload through this endpoint is not a viable AI connector workflow. For interactive cropping or any AI-initiated photo change, redirect the user to the BambooHR web UI. Maximum file size is 20MB (applies to the decoded bytes for the JSON variant). The photo replaces the employee's current photo for all size variants. Employees may upload their own photo if the company has self-photo uploads enabled.
OAuth Scopes: employee:photo.write
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Sample Request
POST /api/v1/employees/1/photo/ HTTP/1.0
Host: {companyDomain}.bamboohr.com
Content-Type: multipart/form-data; boundary=----BambooHR-MultiPart-Mime-Boundary----
Content-Length: 520
------BambooHR-MultiPart-Mime-Boundary----
Content-Disposition: form-data; name="file"; filename="photo.jpg"
Content-Type: text/plain
... binary file data ...
------BambooHR-MultiPart-Mime-Boundary------Notes
The width and height of the photo must be the same number of pixels.
The API user must have photo uploading permission.
The source photo must be a jpg, gif, or png.
The photo file may not be larger than 20MB.
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.
201The photo was uploaded and processed successfully. No response body is returned.
400The request is invalid: no file provided, zero-byte file, or the maximum number of photo uploads (32767) has been exceeded.
402The photo could not be processed: the image crop failed, or the file contents could not be read.
403The authenticated user does not have permission to upload photos for this employee.
404The employee does not exist.
413The uploaded file exceeds the 20MB size limit.
415The image does not meet requirements: not square (width and height differ by more than one pixel), smaller than 150×150 pixels, or the file could not be read as a supported image format.
