Attaches a photo to a job; it appears on the job's timeline as a `Photo` entry.
Send multipart/form-data with the image in a part named file and an optional caption part, e.g. curl -X POST https://app.flexonthejob.com/api/v1/jobs/42/photos -H "Authorization: Bearer flx_live_…" -H "Idempotency-Key: 5f0c…" -F "file=@roof.jpg" -F "caption=Rust on the bottom panel". JPEG and PNG only (detected from the file's bytes), up to 10 MB. The entry is attributed to the key's creator and is the same kind of entry the Flex field app creates from the phone camera: it shows as a thumbnail on the job's page in the web app, syncs to every device, and its image is included in the organization data export. Needs ManageJobs — the same permission as adding a job update in the app — and an Idempotency-Key header (a retry with the same key and the same file replays the first response instead of adding a second photo).
Request
- Base URL: https://app.flexonthejob.com
- URL: https://app.flexonthejob.com/api/v1/jobs/{id}/photos
- Auth: HTTP bearer
Path parameters
Job id from a list response, e.g. 42.
Response
The created timeline entry (type = Photo, attachmentName set). Location points at the job.
Changes
No recorded changes to this operation across all 1 revision of this API.