Skip to content

Loading…

Complete image uploads

Verify uploaded originals and attach them to the property.

POST/v1/properties/{property_id}/images/uploads/{upload_id}/complete

Requires the properties:write scope

On this page

Use the returned session_id as the path's upload_id. Supply each accepted file_id, title, order and primary flag after its PUT succeeds. The session is bound to the property and workspace.

Completion validates the stored bytes before attaching them. Repeating completion with the same session and metadata is safe while the session remains valid. The response contains image references, never original download URLs.

New static images larger than 1 MiB are gently optimized during completion: up to 2560 pixels on the longest side and JPEG quality 90. Opaque photographs may change to JPEG; transparency is retained as PNG. No WebP is generated. A smaller result is adopted; 1 MiB is the processing threshold, not a final size limit. Images at or below the threshold retain their exact bytes, as do animated or multi-page images. The returned filename, content type and file size describe the stored result.

Next: publish to generate public marked copies.

Example request

curl -X POST "https://api.vestta.app/v1/properties/1/images/uploads/session-id-from-upload-response/complete" \
  -H "X-Api-Key: $VESTTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "images": [
    {
      "file_id": "photo-1",
      "title": "Living room",
      "is_primary": true,
      "order": 1
    }
  ]
}'

Authorization

  • X-Api-Keystringheaderrequired

    Your API key, AC_LIVE_<key_id>.<secret>. Authorization: ApiKey <key> is also accepted.

Path parameters

  • upload_idstringrequired
  • property_idintegerrequired≥ 1

Request body

application/json · required

  • imagesarray of objectsrequired

Response

200 Successful response.

Example response
{
  "status": "ok",
  "property_id": 1355,
  "images": [
    {
      "id": "1234567890ABCDEF",
      "title": "Living room",
      "order": 1,
      "is_primary": true
    }
  ]
}

Response fields

  • statusstring default: ok always ok
  • property_idintegerrequired
  • imagesarray of objectsrequired

Errors

StatusWhen
401 UnauthorizedThe API key is missing, malformed, unknown, revoked or expired.
403 ForbiddenThe API key lacks the required scope.
404 Not FoundThe resource does not exist in this business.
409 ConflictDuplicate contact or idempotency key reused with a different payload.
422 Unprocessable ContentA path parameter, query parameter or body field is invalid.
500 Internal Server ErrorUnexpected server error while processing the request.

Error bodies and how to handle each case: Errors.