Skip to main content

Spotr image uploads (1)

Download OpenAPI specification:Download

Upload images of properties to a portfolio on the Spotr platform, one image per call.

An upload takes two steps: create the upload here, then send the file with the signed POST in the answer. Then follow the upload at the address in the Location header of the create, until its status is done or failed. Send your API key in the X-API-Key header.

A request body above 10 MB is refused with 413 and a plain text body, not in the error format.

Create an upload

Create an upload of one image for one address, and get a signed POST to send the file with.

Rules for agents:

  • Date taken is never a guess. Send the date the photo was taken. If you do not know it, do not send today's date or any other made-up date, and do not upload the image.
  • Send the real image type when you know it. With unspecified, the platform decides the type itself, which takes longer. A type you send is never checked or changed. An interior inspection runs only for an image that ends up as interior.
  • Room type is used only for an image of type interior. With any other image type it is accepted and has no effect.
  • Addresses only. Every upload is for a property with an address. Estates, groups and communal areas without an address are not supported; a reference to one returns address_not_found.
  • One image per call. The API is for ongoing uploads, not for loading a large backlog.

Limits, per API key:

Limit Default
Creates per second 5, with a burst of 10
Creates per day (UTC) 1,000
Uploads in progress (waiting for their file, or being processed) 200

Over a limit the answer is 429 rate_limited, with a Retry-After header in seconds and the name of the limit in limit: per_second, per_day or in_progress. Wait for that number of seconds, then send the same request again. The limits are per key: do not switch to another key. A request sent again with the same Idempotency-Key after a successful create gets its first answer and is not counted.

Every error is in the Problem Details form (RFC 9457), with a stable type to branch on and a detail that says what to do.

A request body above 10 MB is refused with 413 and a plain text body, not in the error format.

header Parameters
Idempotency-Key
required
string (Idempotency-Key) [ 1 .. 255 ] characters

Required. A value you choose, unique for each image, for example a UUID.

If you sent a request and got no response, send the same request again with the same key.

  • Within 30 minutes: the same key with the same body returns the same upload: the same upload_id and the same link. No second upload is created.
  • The same key with a different body: 409 idempotency_conflict. Use a new key for a different image.
  • After 30 minutes: the key is forgotten. A request with it creates a new upload.

The link is valid for the same 30 minutes; expires_at in the response gives the exact time. If the link has expired, or too little time is left to send the file, create a new upload with a new key.

Sending the same image twice does no harm: the platform stores an image once.

Request Body schema: application/json
required
portfolio_id
required
string (Portfolio Id) ^[1-9][0-9]{0,9}$

The id of the portfolio the image is for, as digits without a leading zero. It must be a portfolio your key may use.

required
object (Address)

The address the image is of. Send either client_reference, or the postal fields country_code, postal_code, street_name and street_number with an optional street_number_addition. Never both. The address must exist in the portfolio; it is never created.

date_taken
required
string <date> (Date Taken)

The date the photo was taken, as YYYY-MM-DD. Never a guess: if you do not know it, do not send today's date or any other made-up date, and do not upload the image. A date in the future is refused.

image_type
required
string (Image Type)
Enum: "aerial" "drawing" "drone" "handheld" "interior" "other" "satellite" "streetview" "unspecified"

What the image shows. Send the real type when you know it. With unspecified the platform decides the type itself, which takes longer. A type you send is never checked or changed.

Room Type (string) or Room Type (null) (Room Type)

The room the image shows. Used only for an image of type interior; with any other type it is accepted and has no effect.

required
object (File)

The file that will be sent with the signed POST.

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "date_taken": "2026-11-03",
  • "file": {
    },
  • "image_type": "interior",
  • "portfolio_id": "135",
  • "room_type": "kitchen"
}

Response samples

Content type
application/json
{
  • "upload_id": "upl_0123456789abcdef0123456789abcdef",
  • "status": "awaiting_file",
  • "upload": {
    },
  • "expires_at": "2026-11-29T14:30:00Z"
}

Get the status of an upload

Where an upload is. Any API key of your organization may read it, not only the key that created it.

The statuses:

  • awaiting_file: the upload waits for its file. Send the file with the signed POST before expires_at.
  • processing: the file arrived and is being checked and processed.
  • done: final. The image is stored for the address in the portfolio. The answer holds no image id and no link.
  • failed: final. The image was not added. error.type says why and error.detail says what to do.

done and failed never change again.

How to follow an upload:

  • Poll every 5 seconds, not faster.
  • Stop polling when the status is done or failed. Both are final.
  • An image usually takes a few minutes. When many images are waiting it can take up to 60 minutes; then the upload fails with processing_timeout.
  • After a 429, wait for the number of seconds in Retry-After and continue. Do not switch to another key.

Limit, per API key: by default 50 status reads per second, with a burst of 100; Spotr can set another limit for one key. It is counted apart from the limits on creating uploads, so following uploads never uses up the budget for creating them.

When an upload fails, error.type is one of these codes:

Code What it means What to do
malware_detected The file failed the malware scan. Do not send this file again. Check the source of the file.
unsupported_file_type The file is not a JPEG or PNG, is not of the content type announced at create, or could not be scanned. Send a JPEG or PNG file and announce its real content type in a new upload.
invalid_image The file starts as a JPEG or PNG image but cannot be decoded. Check that the file opens as an image, then send it again in a new upload.
image_too_large The width times the height of the image is above the limit in pixels. Make the image smaller in pixels and send it in a new upload.
address_not_found The address left the portfolio after the upload was created. Check the address in the portfolio, then create a new upload.
portfolio_not_allowed The portfolio was taken off the API key, or is no longer usable, after the upload was created. Check which portfolios the API key may use, then create a new upload.
api_access_not_enabled The organization was switched off for uploads after the upload was created. Contact Spotr to enable API access, then create a new upload.
internal_error A fault on our side stopped the upload. Create a new upload and send the file again later.
upload_expired The file did not arrive before the signed POST of the upload expired. Create a new upload and send the file within 30 minutes, before its expires_at.
processing_timeout The file arrived, but the image was not processed in time. Create a new upload with the same file later. Contact Spotr support if it keeps happening.
processing_failed The image passed every check but could not be processed in time, after one or more failed tries. Create a new upload with the same file. Contact Spotr support if it fails again.

An unknown upload_id, an upload of another organization, and an upload removed 30 days after it became done or failed all answer 404 upload_not_found.

Every error is in the Problem Details form (RFC 9457), with a stable type to branch on and a detail that says what to do.

path Parameters
upload_id
required
string (Upload Id)
Examples: upl_0123456789abcdef0123456789abcdef

The upload_id from the answer of the create, also at the end of its Location header.

Responses

Response samples

Content type
application/json
{
  • "created_at": "2026-11-29T14:00:00Z",
  • "expires_at": "2026-11-29T14:30:00Z",
  • "status": "awaiting_file",
  • "updated_at": "2026-11-29T14:00:00Z",
  • "upload_id": "upl_0123456789abcdef0123456789abcdef"
}