> ## Documentation Index
> Fetch the complete documentation index at: https://api.housera.ro/llms.txt
> Use this file to discover all available pages before exploring further.

# Set the photos

> The complete list of photos, in order (the first is the cover): URLs to download or pre-signed upload keys. A photo missing from the list is deleted. The response comes immediately (202); the photos are processed in the background, and `media.processing` shows when it's done.



## OpenAPI

````yaml en/openapi.json PUT /listings/{code}/photos
openapi: 3.1.2
info:
  title: Housera API
  version: 1.0.0
  description: >-
    Publish and manage real estate listings on Housera from your CRM or
    application, with the same rules as the Housera form.
servers:
  - url: https://staging.housera.ro/api/v1
    description: 'Sandbox (staging): test data, the same rules as production.'
  - url: https://housera.ro/api/v1
    description: 'Production: real listings from housera.ro.'
security:
  - bearer: []
tags:
  - name: Your Listings
  - name: Photos
  - name: Events
  - name: Vocabulary
paths:
  /listings/{code}/photos:
    put:
      tags:
        - Photos
      summary: Set the photos
      description: >-
        The complete list of photos, in order (the first is the cover): URLs to
        download or pre-signed upload keys. A photo missing from the list is
        deleted. The response comes immediately (202); the photos are processed
        in the background, and `media.processing` shows when it's done.
      operationId: v1.listings.photos
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
          description: >-
            The public code of the listing (8 characters, as in its address on
            Housera).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                photos:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type:
                          - string
                          - 'null'
                        format: uri
                        maxLength: 2048
                        description: Address.
                      key:
                        type:
                          - string
                          - 'null'
                        maxLength: 255
                        description: >-
                          The key of the uploaded file, to be sent later in
                          `photos[].key`.
                      floor:
                        type:
                          - string
                          - 'null'
                        description: Floor.
                      rooms:
                        type:
                          - array
                          - 'null'
                        items:
                          type: string
                        maxItems: 3
                        description: Number of rooms.
                  maxItems: 100
                  description: Photos.
              required:
                - photos
      responses:
        '202':
          content:
            application/json:
              schema:
                type: object
                properties:
                  queued:
                    type: integer
                    description: >-
                      How many images have entered processing. The result comes
                      in events `media.*`.
                required:
                  - queued
          description: 'Accepted: processing in the background.'
        '401':
          content:
            application/problem+json:
              schema:
                $ref: df9e5864-a2f9-487d-b0db-169bf3dc8506
          description: The key is missing, revoked, or expired (`unauthenticated`).
        '403':
          content:
            application/problem+json:
              schema:
                $ref: df9e5864-a2f9-487d-b0db-169bf3dc8506
          description: >-
            The key does not have the requested permission (`missing_ability`)
            or access is denied (`forbidden`).
        '404':
          content:
            application/problem+json:
              schema:
                $ref: df9e5864-a2f9-487d-b0db-169bf3dc8506
          description: The listing does not exist or it is not your account (`not_found`).
        '422':
          content:
            application/problem+json:
              schema:
                $ref: e53cadd6-998b-41ac-a57d-ce6040097918
          description: >-
            The data do not pass the rules: one entry per field in `errors[]`,
            with a stable `code`.
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.