---
title: "Complete a signed upload"
method: POST
path: "/uploads/{id}/complete"
tags: ["Uploads"]
---

# Complete a signed upload

`POST /uploads/{id}/complete`

## Request

- Base URL: `https://api.propertypixel.app/v1`
- URL: `https://api.propertypixel.app/v1/uploads/{id}/complete`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://llflgtovnkrsjqydycyu.supabase.co/auth/v1/oauth/authorize`, token URL `https://llflgtovnkrsjqydycyu.supabase.co/auth/v1/oauth/token`)

Finish a signed upload: verifies each stored file (size, type and content) and adds it to the project as a photo. List every file that uploaded; files left out are discarded and their reserved room released. HEIC/HEIF files are converted to JPEG. Returns the new photos and a `failed` list with a reason per file.

Requires a connection with edit access.

## Path parameters

- `id` string, uuid, required: The upload id from POST /uploads.

## Headers

- `Idempotency-Key` string: A unique key (for example a UUID) that makes retries safe. A retry with the same key and body returns the stored response; the same key with a different body returns 422. Keys last 24 hours.

## Request body

- object
  - `project_id` string, uuid, required: The same project_id used to create the upload.
  - `files` object[], required
    - `storage_path` string, required
    - `filename` string, required
    - `size` integer, required
    - `content_type` string, required

## Response `200`

Complete a signed upload

- UploadCompletion
  - `object` 'photo_list', required
  - `photos` Photo[], required
    - `object` 'photo', required
    - `id` string, uuid, required
    - `project_id` string, uuid, nullable, required
    - `filename` string, nullable, required
    - `room_type` string, nullable, required
    - `width` integer, nullable, required
    - `height` integer, nullable, required
    - `original` MediaUrl, required
      - `url` string, uri, required
      - `expires_at` string, date-time, required: Signed URL expiry (about 1 hour). Re-fetch for a fresh URL.
    - `thumbnail` MediaUrl, required
      - `url` string, uri, required
      - `expires_at` string, date-time, required: Signed URL expiry (about 1 hour). Re-fetch for a fresh URL.
    - `created_at` string, date-time, required
  - `failed` object[], required
    - `filename` string, required
    - `error` string, required

## Other responses

- `400`: The request is invalid. Codes: `validation_failed`.
- `401`: Missing, invalid or revoked credential. Codes: `unauthorized`.
- `403`: The credential can't do this. View-only connections get forbidden_scope on writes. Codes: `forbidden_scope`, `forbidden`.
- `404`: The resource doesn't exist in this workspace. Codes: `not_found`.
- `409`: The request conflicts with the current state. Codes: `conflict`, `idempotency_in_progress`.
- `422`: An Idempotency-Key was reused with a different body, or an upload was rejected. Codes: `idempotency_conflict`, `upload_rejected`.
- `429`: Too many requests for this connection. Codes: `rate_limited`.
- `500`: Something failed on our side. Retry later. Codes: `internal`.

---

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