---
title: "[beta] Add a photo to a part."
method: POST
path: "/maintenance/parts/photos"
tags: ["Beta APIs"]
---

# \[beta\] Add a photo to a part.

`POST /maintenance/parts/photos`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/maintenance/parts/photos`
- Auth: HTTP bearer

Adds a photo to an existing part. Accepts base64 encoded JPEG or PNG images up to 7.5MB decoded. The photo is returned with processingStatus 'processing' until it is ready; GET /maintenance/parts/photos returns its url once processingStatus is 'finished'.

 <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Write Parts** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Request body

- PartPhotosPostPartPhotoRequestBody: Part photo request
  - `file` PartPhotoFileRequestBody, required: Photo to add to a part.
    - `base64Content` string, required: Base64 encoded image content. Maximum decoded size: 7.5MB.
    - `contentType` string, required: MIME type of the image. Supported types: image/jpeg, image/png.
  - `isProfilePhoto` boolean: Whether the photo is the part's profile photo. A part has at most one profile photo; delete the existing one before adding another. Defaults to false.
  - `partId` string, required: ID of the part to add the photo to.

## Response `200`

OK response.

- PartPhotosPostPartPhotoResponseBody
  - `data` PartPhotoObjectResponseBody, required: A photo of a part.
    - `id` string, required: ID of the photo.
    - `processingStatus` 'unknown' | 'processing' | 'finished', required: Processing status of the photo. Valid values: `unknown`, `processing`, `finished`
    - `url` string, uri: Link to the photo. Included when processingStatus is 'finished'.
    - `urlExpiresAtTime` string, date-time: Expiration time of url in RFC 3339 format.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
