{"openapi":"3.1.0","info":{"title":"Spotr image uploads","description":"Upload images of properties to a portfolio on the Spotr platform, one image per call.\n\nAn upload takes two steps: create the upload here, then send the file with the signed POST in the\nanswer. Then follow the upload at the address in the `Location` header of the create, until its\nstatus is `done` or `failed`. Send your API key in the `X-API-Key` header.\n\nA request body above 10 MB is refused with 413 and a plain text body, not in the error format.","version":"1"},"servers":[{"url":"https://api.spotr.ai"}],"paths":{"/v1/uploads":{"post":{"summary":"Create an upload","description":"Create an upload of one image for one address, and get a signed POST to send the file with.\n\nRules for agents:\n\n- **Date taken is never a guess.** Send the date the photo was taken. If you do not know it, do not\n  send today's date or any other made-up date, and do not upload the image.\n- **Send the real image type when you know it.** With `unspecified`, the platform decides the type\n  itself, which takes longer. A type you send is never checked or changed. An interior inspection\n  runs only for an image that ends up as `interior`.\n- **Room type** is used only for an image of type `interior`. With any other image type it is\n  accepted and has no effect.\n- **Addresses only.** Every upload is for a property with an address. Estates, groups and communal\n  areas without an address are not supported; a reference to one returns `address_not_found`.\n- **One image per call.** The API is for ongoing uploads, not for loading a large backlog.\n\nLimits, per API key:\n\n| Limit | Default |\n| -- | -- |\n| Creates per second | 5, with a burst of 10 |\n| Creates per day (UTC) | 1,000 |\n| Uploads in progress (waiting for their file, or being processed) | 200 |\n\nOver a limit the answer is 429 `rate_limited`, with a `Retry-After` header in seconds and the name of the\nlimit in `limit`: `per_second`, `per_day` or `in_progress`. Wait for that number of seconds, then send the\nsame request again. The limits are per key: do not switch to another key. A request sent again with the\nsame `Idempotency-Key` after a successful create gets its first answer and is not counted.\n\nEvery error is in the Problem Details form (RFC 9457), with a stable `type` to branch on and a\n`detail` that says what to do.\n\nA request body above 10 MB is refused with 413 and a plain text body, not in the error format.","operationId":"createUpload","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"**Required.** A value you choose, unique for each image, for example a UUID.\n\nIf you sent a request and got no response, send the same request again with the same key.\n\n- **Within 30 minutes:** the same key with the same body returns the same upload: the same `upload_id`\n  and the same link. No second upload is created.\n- **The same key with a different body:** 409 `idempotency_conflict`. Use a new key for a different image.\n- **After 30 minutes:** the key is forgotten. A request with it creates a new upload.\n\nThe link is valid for the same 30 minutes; `expires_at` in the response gives the exact time. If the\nlink has expired, or too little time is left to send the file, create a new upload with a new key.\n\nSending the same image twice does no harm: the platform stores an image once.","title":"Idempotency-Key"},"description":"**Required.** A value you choose, unique for each image, for example a UUID.\n\nIf you sent a request and got no response, send the same request again with the same key.\n\n- **Within 30 minutes:** the same key with the same body returns the same upload: the same `upload_id`\n  and the same link. No second upload is created.\n- **The same key with a different body:** 409 `idempotency_conflict`. Use a new key for a different image.\n- **After 30 minutes:** the key is forgotten. A request with it creates a new upload.\n\nThe link is valid for the same 30 minutes; `expires_at` in the response gives the exact time. If the\nlink has expired, or too little time is left to send the file, create a new upload with a new key.\n\nSending the same image twice does no harm: the platform stores an image once."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadRequest"}}}},"responses":{"201":{"description":"The upload is created. Send the file with the signed POST in `upload` within 30 minutes:\n`expires_at` gives the exact time. After that the upload fails with `upload_expired`, and a new\nupload has to be created. The `Location` header points to the status of the upload.\n\nHow to send the file: a `multipart/form-data` POST to `upload.url`, not to this API and without your\nAPI key. Send every entry of `upload.fields` as a form field, unchanged, and the file as the last\nfield, named `file`. The file must be of the `content_type` and exactly the `size_bytes` you\nannounced, or the POST is refused. A successful POST is answered with 204.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedUploadResponse"}}},"headers":{"Location":{"description":"The address of the status of this upload.","schema":{"type":"string"}}}},"400":{"description":"The request does not match this description (`invalid_request`). `errors` lists every part at fault.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InvalidRequestProblem"}}}},"401":{"description":"The API key is missing or not valid (`invalid_api_key`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key's organization is not set up for uploads (`api_access_not_enabled`), or the key may not use this portfolio (`portfolio_not_allowed`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The Idempotency-Key was used with a different request, or that request is still running (`idempotency_conflict`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"No address in the portfolio matches (`address_not_found`), or more than one does (`address_ambiguous`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit is reached (`rate_limited`); `limit` names it. Wait for the number of seconds in `Retry-After`, or 1 second when the header is not sent, then send the request again. Do not switch to another key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RateLimitedProblem"}}}},"500":{"description":"A fault on our side (`internal_error`). Sending the same request again at once will not help; try again later, and contact Spotr support if it keeps failing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A fault on our side that a retry can fix (`service_unavailable`). Send the request again after the number of seconds in `Retry-After`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/uploads/{upload_id}":{"get":{"summary":"Get the status of an upload","description":"Where an upload is. Any API key of your organization may read it, not only the key that created it.\n\nThe statuses:\n\n- `awaiting_file`: the upload waits for its file. Send the file with the signed POST before `expires_at`.\n- `processing`: the file arrived and is being checked and processed.\n- `done`: **final.** The image is stored for the address in the portfolio. The answer holds no image id\n  and no link.\n- `failed`: **final.** The image was not added. `error.type` says why and `error.detail` says what to do.\n\n`done` and `failed` never change again.\n\nHow to follow an upload:\n\n- **Poll every 5 seconds, not faster.**\n- **Stop polling when the status is `done` or `failed`.** Both are final.\n- **An image usually takes a few minutes.** When many images are waiting it can take up to 60 minutes;\n  then the upload fails with `processing_timeout`.\n- **After a 429, wait for the number of seconds in `Retry-After` and continue.** Do not switch to another key.\n\nLimit, per API key: by default 50 status reads per second, with a burst of 100; Spotr can set another\nlimit for one key. It is counted apart from the limits on creating uploads, so following uploads never\nuses up the budget for creating them.\n\nWhen an upload fails, `error.type` is one of these codes:\n\n| Code | What it means | What to do |\n| -- | -- | -- |\n| `malware_detected` | The file failed the malware scan. | Do not send this file again. Check the source of the file. |\n| `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. |\n| `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. |\n| `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. |\n| `address_not_found` | The address left the portfolio after the upload was created. | Check the address in the portfolio, then create a new upload. |\n| `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. |\n| `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. |\n| `internal_error` | A fault on our side stopped the upload. | Create a new upload and send the file again later. |\n| `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. |\n| `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. |\n| `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. |\n\nAn unknown `upload_id`, an upload of another organization, and an upload removed 30 days after it\nbecame `done` or `failed` all answer 404 `upload_not_found`.\n\nEvery error is in the Problem Details form (RFC 9457), with a stable `type` to branch on and a\n`detail` that says what to do.","operationId":"getUpload","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","description":"The `upload_id` from the answer of the create, also at the end of its `Location` header.","examples":["upl_0123456789abcdef0123456789abcdef"],"title":"Upload Id"},"description":"The `upload_id` from the answer of the create, also at the end of its `Location` header."}],"responses":{"200":{"description":"The upload and its status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStatusResponse"}}}},"401":{"description":"The API key is missing or not valid (`invalid_api_key`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The key's organization is not set up for uploads (`api_access_not_enabled`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No upload with this id exists for your organization (`upload_not_found`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The key reads statuses faster than its limit (`rate_limited`, with `limit` `reads_per_second`), or the service receives too many requests. Wait for the number of seconds in `Retry-After`, or 1 second when the header is not sent, then continue. Do not switch to another key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ReadRateLimitedProblem"}}}},"500":{"description":"A fault on our side (`internal_error`). Sending the same request again at once will not help; try again later, and contact Spotr support if it keeps failing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A fault on our side that a retry can fix (`service_unavailable`). Send the request again after the number of seconds in `Retry-After`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"Address":{"properties":{"client_reference":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Client Reference","description":"Your own reference for the address, exactly as it is stored in the portfolio.","examples":["A-000123"]},"country_code":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Country Code","description":"The country, as a two- or three-letter code, such as NL.","examples":["NL"]},"postal_code":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Postal Code","description":"The postal code. Spaces and case do not matter.","examples":["1234AB"]},"street_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Street Name","description":"The street name. Case does not matter.","examples":["Examplestreet"]},"street_number":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Street Number","description":"The house number, without its addition.","examples":["10"]},"street_number_addition":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Street Number Addition","description":"The addition to the house number, such as A. Leave it out only when the address has none: without it, addresses with and without an addition all match, and more than one match returns `address_ambiguous`.","examples":["A"]}},"additionalProperties":false,"type":"object","title":"Address","description":"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."},"CreateUploadRequest":{"properties":{"portfolio_id":{"type":"string","pattern":"^[1-9][0-9]{0,9}$","title":"Portfolio Id","description":"The id of the portfolio the image is for, as digits without a leading zero. It must be a portfolio your key may use.","examples":["135"]},"address":{"$ref":"#/components/schemas/Address"},"date_taken":{"type":"string","format":"date","title":"Date Taken","description":"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.","examples":["2026-11-03"]},"image_type":{"type":"string","enum":["aerial","drawing","drone","handheld","interior","other","satellite","streetview","unspecified"],"title":"Image Type","description":"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.","examples":["interior"]},"room_type":{"anyOf":[{"type":"string","enum":["kitchen","bathroom","toilet","bedroom","livingroom","hallway","common_area","cellar","garage","attic","utility_room","exterior","other","unknown"]},{"type":"null"}],"title":"Room Type","description":"The room the image shows. Used only for an image of type `interior`; with any other type it is accepted and has no effect.","examples":["kitchen"]},"file":{"$ref":"#/components/schemas/File"}},"additionalProperties":false,"type":"object","required":["portfolio_id","address","date_taken","image_type","file"],"title":"CreateUploadRequest","description":"One image for one address.","examples":[{"address":{"client_reference":"A-000123"},"date_taken":"2026-11-03","file":{"content_type":"image/jpeg","name":"kitchen-01.jpg","size_bytes":2483112},"image_type":"interior","portfolio_id":"135","room_type":"kitchen"},{"address":{"country_code":"NL","postal_code":"1234AB","street_name":"Examplestreet","street_number":"10","street_number_addition":"A"},"date_taken":"2026-10-28","file":{"content_type":"image/png","name":"front.png","size_bytes":5120000},"image_type":"handheld","portfolio_id":"135"}]},"CreatedUploadResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id","description":"The id of the upload.","examples":["upl_0123456789abcdef0123456789abcdef"]},"status":{"type":"string","const":"awaiting_file","title":"Status","description":"The upload waits for its file."},"upload":{"$ref":"#/components/schemas/SignedPostForm"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Until when the signed POST accepts the file, in UTC.","examples":["2026-11-29T14:30:00Z"]}},"type":"object","required":["upload_id","status","upload","expires_at"],"title":"CreatedUploadResponse","description":"The upload, created and waiting for its file."},"FieldError":{"properties":{"pointer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pointer","description":"Where in the body, as a JSON pointer.","examples":["#/file/size_bytes"]},"header":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header","description":"Which header.","examples":["Idempotency-Key"]},"parameter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter","description":"Which parameter of the path or the query."},"detail":{"type":"string","title":"Detail","description":"What is wrong.","examples":["Input should be less than or equal to 83886080"]}},"type":"object","required":["detail"],"title":"FieldError","description":"One part of the request that is at fault."},"File":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"The file name, shown as the name of the image. It is not used for anything else.","examples":["kitchen-01.jpg"]},"content_type":{"type":"string","enum":["image/jpeg","image/png"],"title":"Content Type","description":"The type of the file: `image/jpeg` or `image/png`.","examples":["image/jpeg"]},"size_bytes":{"type":"integer","maximum":83886080.0,"exclusiveMinimum":0.0,"title":"Size Bytes","description":"The size of the file in bytes. More than 0 and at most 83886080 (80 MB).","examples":[2483112]}},"additionalProperties":false,"type":"object","required":["name","content_type","size_bytes"],"title":"File","description":"The file that will be sent with the signed POST."},"InvalidRequestProblem":{"properties":{"type":{"type":"string","title":"Type","description":"A stable code to branch on.","examples":["address_not_found"]},"title":{"type":"string","title":"Title","description":"A short name of the problem.","examples":["Address not found"]},"status":{"type":"integer","title":"Status","description":"The HTTP status.","examples":[422]},"detail":{"type":"string","title":"Detail","description":"What to do about it."},"errors":{"items":{"$ref":"#/components/schemas/FieldError"},"type":"array","title":"Errors","description":"Every part of the request that is at fault."}},"type":"object","required":["type","title","status","detail"],"title":"InvalidRequestProblem","description":"400 invalid_request, with every part of the request that is at fault."},"Problem":{"properties":{"type":{"type":"string","title":"Type","description":"A stable code to branch on.","examples":["address_not_found"]},"title":{"type":"string","title":"Title","description":"A short name of the problem.","examples":["Address not found"]},"status":{"type":"integer","title":"Status","description":"The HTTP status.","examples":[422]},"detail":{"type":"string","title":"Detail","description":"What to do about it."}},"type":"object","required":["type","title","status","detail"],"title":"Problem","description":"An error, in the RFC 9457 Problem Details form."},"RateLimitedProblem":{"properties":{"type":{"type":"string","title":"Type","description":"A stable code to branch on.","examples":["address_not_found"]},"title":{"type":"string","title":"Title","description":"A short name of the problem.","examples":["Address not found"]},"status":{"type":"integer","title":"Status","description":"The HTTP status.","examples":[422]},"detail":{"type":"string","title":"Detail","description":"What to do about it."},"limit":{"anyOf":[{"type":"string","enum":["per_second","per_day","in_progress"]},{"type":"null"}],"title":"Limit","description":"Which limit was reached. Not sent when the limit of the whole service was reached."}},"type":"object","required":["type","title","status","detail"],"title":"RateLimitedProblem","description":"429 rate_limited: a limit per API key is reached. The Retry-After header says how long to wait."},"ReadRateLimitedProblem":{"properties":{"type":{"type":"string","title":"Type","description":"A stable code to branch on.","examples":["address_not_found"]},"title":{"type":"string","title":"Title","description":"A short name of the problem.","examples":["Address not found"]},"status":{"type":"integer","title":"Status","description":"The HTTP status.","examples":[422]},"detail":{"type":"string","title":"Detail","description":"What to do about it."},"limit":{"anyOf":[{"type":"string","const":"reads_per_second"},{"type":"null"}],"title":"Limit","description":"The read limit. Not sent when the limit of the whole service was reached."}},"type":"object","required":["type","title","status","detail"],"title":"ReadRateLimitedProblem","description":"429 rate_limited on reading a status: the key's read limit is reached. Retry-After says how long to wait."},"SignedPostForm":{"properties":{"method":{"type":"string","const":"POST","title":"Method","description":"Always POST."},"url":{"type":"string","title":"Url","description":"Where to send the file.","examples":["https://storage.example.com/"]},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields","description":"The form fields to send with the file, each unchanged, before the file itself.","examples":[{"Content-Type":"image/jpeg","key":"uploads/upl_0123456789abcdef0123456789abcdef","policy":"eyJleGFtcGxlIjogInBvbGljeSJ9","x-amz-algorithm":"AWS4-HMAC-SHA256","x-amz-credential":"EXAMPLE/20261129/eu-central-1/s3/aws4_request","x-amz-date":"20261129T140000Z","x-amz-signature":"0123456789abcdef"}]}},"type":"object","required":["method","url","fields"],"title":"SignedPostForm","description":"Where and how to send the file: a multipart/form-data POST to `url`, never to this API."},"UploadError":{"properties":{"type":{"type":"string","enum":["malware_detected","unsupported_file_type","invalid_image","image_too_large","address_not_found","portfolio_not_allowed","api_access_not_enabled","internal_error","upload_expired","processing_timeout","processing_failed"],"title":"Type","description":"The failure code. Branch on it; the table in the description of this endpoint lists every code.","examples":["invalid_image"]},"detail":{"type":"string","title":"Detail","description":"One sentence that says what happened and what to do. Fixed for each code.","examples":["The file could not be read as an image. It may be damaged or cut off."]}},"type":"object","required":["type","detail"],"title":"UploadError","description":"Why an upload failed: a failure code to branch on and a fixed sentence that says what to do."},"UploadStatusResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id","description":"The id of the upload.","examples":["upl_0123456789abcdef0123456789abcdef"]},"status":{"type":"string","enum":["awaiting_file","processing","done","failed"],"title":"Status","description":"`awaiting_file`, `processing`, `done` or `failed`. `done` and `failed` are final: stop following the upload when it has one of them."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the upload was created, in UTC.","examples":["2026-11-29T14:00:00Z"]},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the upload last changed, in UTC.","examples":["2026-11-29T14:02:10Z"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Only for `awaiting_file`: until when the signed POST accepts the file, in UTC.","examples":["2026-11-29T14:30:00Z"]},"error":{"anyOf":[{"$ref":"#/components/schemas/UploadError"},{"type":"null"}],"description":"Only for `failed`: why the upload failed and what to do."}},"type":"object","required":["upload_id","status","created_at","updated_at"],"title":"UploadStatusResponse","description":"Where an upload is. `expires_at` is only sent for `awaiting_file`, `error` only for `failed`.","examples":[{"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"},{"created_at":"2026-11-29T14:00:00Z","status":"processing","updated_at":"2026-11-29T14:02:10Z","upload_id":"upl_0123456789abcdef0123456789abcdef"},{"created_at":"2026-11-29T14:00:00Z","status":"done","updated_at":"2026-11-29T14:06:45Z","upload_id":"upl_0123456789abcdef0123456789abcdef"},{"created_at":"2026-11-29T14:00:00Z","error":{"detail":"The file could not be read as an image. It may be damaged or cut off.","type":"invalid_image"},"status":"failed","updated_at":"2026-11-29T14:02:30Z","upload_id":"upl_0123456789abcdef0123456789abcdef"}]}}}}