Create a photo

Step 1 of 2 in the photo upload flow. Creates a photo record and returns an AWS S3-compatible presigned POST URL to upload the actual file directly to object storage.

Upload flow

  1. Call this endpoint to create the photo record and obtain the presigned upload URL.
  2. Upload the file directly to S3 using the upload_url.url as the form action and including all upload_url.fields as form data fields alongside the file. No server-side proxy is involved.
  3. Once the upload is complete, call PUT /light/photos/{id}/uploaded/ to finalize the photo and make it visible to other users in the company.

The photo can optionally be associated with a job and with line items of various types. All referenced foreign-key IDs must belong to the same company as the authenticated user.

The S3 object key returned in upload_url.fields.key is derived from the photo's display name with a random suffix appended to guarantee uniqueness (e.g. front-roof-damage_a1b2c3d4.jpg).

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here!