> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uk.housr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a property

> Updates an existing property. Server enforces ownership/permissions. Provide only the fields you wish to change. `images` accepts CSV string or array.




## OpenAPI

````yaml openapi.yaml patch /update-property/{propertyId}
openapi: 3.1.0
info:
  title: Housr API
  version: 1.0.0
  summary: Property management API with hourly-expiring bearer token authentication.
  description: >
    This API provides endpoints for managing properties in the Housr platform.
    It issues an hourly-expiring bearer token via HTTP Basic Auth for secure
    access. Unless otherwise noted, all endpoints require `Authorization: Bearer
    <token>` over HTTPS.


    ## Endpoints


    ### Health Check

    - `GET /health-check` - Check API service availability (no authentication
    required)


    ### Authentication

    - `POST /auth/token` - Obtain a bearer token using HTTP Basic Auth
      - Token expires in 1 hour by default
      - Token provides access based on client credentials and associated scopes

    ### Properties

    - `GET /get-property/{propertyId}` - Retrieve a property by ID
      - Requires bearer token authentication
    - `POST /create-property` - Create a new property record
      - Requires `properties:write` scope
      - Accepts JSON or form-encoded data
      - Supports image URLs as array or comma-separated string
    - `PATCH /update-property/{propertyId}` - Update an existing property
      - Requires `properties:write` scope
      - Server enforces ownership/permissions
      - Provide only fields you wish to change
    - `DELETE /delete-property/{propertyId}` - Delete a property
      - Requires `properties:delete` scope
      - Server enforces ownership/permissions

    ## Authentication

    - Obtain a token with Basic Auth to `/auth/token`.

    - Token expires in 1 hour by default.

    - Use the token in subsequent requests: `Authorization: Bearer <token>`


    ## Error Responses

    All error responses follow the `application/problem+json` format with a
    `response` field containing the error message. Validation errors include an
    additional `errors` object with field-specific error arrays.
servers:
  - url: https://v2.api.uk.housr.com
    description: Production
  - url: https://v2.staging.api.uk.housr.com
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Properties
  - name: Health Check
paths:
  /update-property/{propertyId}:
    patch:
      tags:
        - Properties
      summary: Update a property
      description: >
        Updates an existing property. Server enforces ownership/permissions.
        Provide only the fields you wish to change. `images` accepts CSV string
        or array.
      parameters:
        - $ref: '#/components/parameters/PropertyId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PropertyUpdate'
            examples:
              update-example:
                value:
                  title: Updated title
                  price_pw: 175
                  images:
                    - https://cdn.example.com/new1.jpg
                    - https://cdn.example.com/new2.jpg
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PropertyUpdateFormCompatible'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                ok:
                  value:
                    message: Property successfully updated
        '400':
          description: Bad request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                bad_request:
                  value:
                    response: Invalid JSON in request body
        '401':
          description: Missing or invalid authentication
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                unauthorized:
                  value:
                    response: Missing or invalid authentication token
        '403':
          description: Authenticated but not allowed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                forbidden:
                  value:
                    response: You do not have permission to perform this action
        '404':
          description: Resource not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                not_found:
                  value:
                    response: Property with ID 12345 not found
        '422':
          description: Validation errors
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
              examples:
                validation_error:
                  value:
                    response: Validation failed
                    errors:
                      title:
                        - Title cannot be empty
                      price_pw:
                        - Price must be a positive integer
      security:
        - bearerAuth: []
components:
  parameters:
    PropertyId:
      in: path
      name: propertyId
      required: true
      schema:
        type: integer
        format: int64
      description: ID of the property
  schemas:
    PropertyUpdate:
      allOf:
        - $ref: '#/components/schemas/PropertyBase'
        - type: object
          description: Send only fields to modify
    PropertyUpdateFormCompatible:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        address:
          type: string
        city:
          type: string
        images:
          type: string
          description: Comma-separated image URLs
        price_pw:
          type: integer
        bedrooms:
          type: integer
        bathrooms:
          type: integer
        postcode:
          type: string
        lat:
          type: number
          format: double
        lng:
          type: number
          format: double
        deposit:
          type: integer
    MessageResponse:
      type: object
      properties:
        message:
          type: string
    Problem:
      type: object
      properties:
        response:
          type: string
    ValidationProblem:
      allOf:
        - $ref: '#/components/schemas/Problem'
        - type: object
          properties:
            errors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
    PropertyBase:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        address:
          type: string
        city:
          type: string
        images:
          type: array
          items:
            type: string
            format: uri
          description: Array of image URLs, each their own comma-separated string
        price_pw:
          type: integer
          description: Weekly price as a string to preserve precision
        bedrooms:
          type: integer
          minimum: 0
        bathrooms:
          type: integer
          minimum: 0
        postcode:
          type: string
        lat:
          type: number
          format: double
          nullable: true
        lng:
          type: number
          format: double
          nullable: true
        deposit:
          type: integer
          default: 0
          description: Defaults to 0 if not supplied
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````