Skip to main content

Upload Photo API

The following API allow you to upload a single photo and generate a photo object.

Note: All the apis accept api key based token authentication

Request Path

Format 1

Upload a photo without a photo id

POST /v1/ext/photo

Format 2

You can generate an offline photo id. id has to be a UUID. and then use the id to upload the photo

POST /v1/ext/photo/<photoId>

Request Headers

AuthorizationBearer accessToken

Request body parameters

photoRequiredpass the photo data. Can be a Buffer object or a ReadableStream depending on your client library. While testing in postman you can directly select a file for this formdata parameter
filenameOptionalname of the photo being uploaded
filetypeOptionalfiletype of the file being uploaded

Sample Request

curl --request POST \
--url \
--header 'Authorization: Bearer <accessToken>' \
--header 'Content-Type: multipart/form-data' \
--form 'photo=@/Users/steve/Documents/sample_screenshot.png' \
--form filename=mobile_screenshot \
--form filetype=png

Response format

The photo object is returned as a succesful response to the api. the photo id can be used in process apis to save a photo against a process like a lead or ticket

Sample response

"_data": {
"id": "f03ee609-cd2d-4e61-821d-9b0531e4ad8c",
"createdAt": 1700558337172,
"updatedAt": 1700558337172,
"filetype": "png",
"filename": "mobile_screenshot",
"height": null,
"width": null,
"isPublic": false,
"team": "5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee",
"user": null