> ## 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.

# Change the sales office and the team

> Changes the sales office fields you send (address, phone, email, opening hours) and, with the owner's or an admin's key, the project's team, by your colleagues' emails. Only whoever runs the project. The response holds the updated project.



## OpenAPI

````yaml en/openapi.json PATCH /projects/{project}
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 your own
    application, under the same rules as the form on the Housera portal.
servers:
  - url: https://staging.housera.ro/api/v1
    description: 'Sandbox (staging): test data, same rules as production.'
  - url: https://housera.ro/api/v1
    description: 'Production: the real listings on housera.ro.'
security:
  - bearer: []
tags:
  - name: Your listings
  - name: Photos
  - name: Events
  - name: Vocabulary
  - name: Connect with Housera
  - name: Client requests
  - name: The company and its team
  - name: Marketing mandates
  - name: Viewings
  - name: Projects
  - name: Partnerships
  - name: API key
  - name: Statistics
paths:
  /projects/{project}:
    patch:
      tags:
        - Projects
      summary: Change the sales office and the team
      description: >-
        Changes the sales office fields you send (address, phone, email, opening
        hours) and, with the owner's or an admin's key, the project's team, by
        your colleagues' emails. Only whoever runs the project. The response
        holds the updated project.
      operationId: v1.projects.update
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
          description: >-
            The code of the project's development (8 characters, as in its
            address on Housera).
        - name: locale
          in: query
          required: false
          schema:
            type: string
            enum:
              - ro
              - en
            default: en
          example: en
          description: >-
            The response language, `ro` or `en`. It changes error messages
            (`title`, `detail`), labels and, when the listing has an approved
            translation in that language, its title and description. Codes are
            the same in every language. It takes precedence over
            `Accept-Language` and over the account's language.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type:
                    - string
                    - 'null'
                  maxLength: 255
                  description: Address.
                phone:
                  type:
                    - string
                    - 'null'
                  maxLength: 32
                  description: Phone.
                email:
                  type:
                    - string
                    - 'null'
                  format: email
                  maxLength: 255
                  description: The sales office's email.
                opening_hours:
                  type:
                    - string
                    - 'null'
                  description: Hours.
                team:
                  type: array
                  items:
                    type: string
                    format: email
                    maxLength: 255
                  maxItems: 200
                  description: Project team.
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProjectApiResource'
                    description: The result of the request.
                required:
                  - data
          description: The project, with the changes applied.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body is not valid JSON (`malformed_json`).
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The key is missing, revoked or expired (`unauthenticated`).
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Only the owner and admins choose the team (`forbidden`).
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The project doesn't exist or the key's account doesn't run it
            (`not_found`).
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body is larger than 1 MB (`payload_too_large`).
        '415':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The request body isn't declared as JSON (`unsupported_media_type`).
            Send it with `Content-Type: application/json`.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
          description: >-
            The data fails the rules: one entry per field in `errors[]`, each
            with a stable `code`.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Too many requests. Try again after the number of seconds in
            `Retry-After`.
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Housera has temporarily paused writes through the API
            (`api_writes_paused`). Try again after the number of seconds in
            `Retry-After`.
components:
  schemas:
    ProjectApiResource:
      type: object
      properties:
        code:
          type: string
          description: The code of the project's development.
        title:
          type:
            - string
            - 'null'
          description: The development's name.
        url:
          type:
            - string
            - 'null'
          description: The development's page on Housera.
        status:
          type:
            - string
            - 'null'
          enum:
            - draft
            - pending
            - active
            - rejected
            - paused
            - hidden
            - unconfirmed
            - sold
            - null
          description: >-
            The development's status, like any listing's (`active`, `pending`,
            `draft`, `paused`…).
        stage:
          type:
            - string
            - 'null'
          enum:
            - launch
            - under_construction
            - finished
            - mixed
            - null
          description: >-
            The project's stage: `launch`, `under_construction`, `finished` or
            `mixed`.
        address:
          type: string
          description: >-
            The development's address: the street and number, the area and the
            city.
        delivery:
          type:
            - object
            - 'null'
          properties:
            quarter:
              type: integer
              description: The quarter, from 1 to 4.
            year:
              type: integer
              description: The year.
          required:
            - quarter
            - year
          description: >-
            The delivery date, as in the portal's list. `null` once the project
            is finished, or while the quarter or the year is missing.
        price_from:
          type:
            - object
            - 'null'
          properties:
            amount:
              type: number
              description: The amount.
            currency:
              type:
                - string
                - 'null'
              description: The amount's currency, an ISO 4217 code.
          required:
            - amount
            - currency
          description: >-
            The development's starting price, the price on its listing. `null`
            if it has none.
        partners:
          type: object
          properties:
            active:
              type: integer
              description: How many partnerships are active.
            pending:
              type: integer
              description: How many partnership requests are waiting for your answer.
          required:
            - active
            - pending
          description: The project's partner agencies.
        requests:
          type: object
          properties:
            total:
              type: integer
              description: All requests.
            unassigned:
              type: integer
              description: The requests nobody has taken yet.
          required:
            - total
            - unassigned
          description: >-
            Client requests on the development and its units, as in the portal's
            list. These are figures only: you read the requests themselves with
            `leads:read`.
        manages:
          type: boolean
          description: >-
            `true` if the key's account runs the project (the owner, an admin,
            its manager): it can change the sales office and take partners'
            units out.
        sales_office:
          type: object
          properties:
            address:
              type:
                - string
                - 'null'
              description: The sales office's address.
            phone:
              type:
                - string
                - 'null'
              description: The office's phone number, in international format.
            email:
              type:
                - string
                - 'null'
              description: The office's email.
            opening_hours:
              type:
                - object
                - 'null'
              additionalProperties:
                type: object
                properties:
                  from:
                    type: string
                    description: Opening time (`HH:MM`).
                  to:
                    type: string
                    description: Closing time (`HH:MM`, `24:00` for the end of the day).
                required:
                  - from
                  - to
              description: >-
                Opening hours by day, from `mon` to `sun`, one `from` and `to`
                interval per day. A missing day is closed. `null` when the
                office has no hours.
          required:
            - address
            - phone
            - email
            - opening_hours
          description: >-
            The project's sales office, shown on the development's page and on
            its units.
        team:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: The colleague's name.
              email:
                type:
                  - string
                  - 'null'
                description: >-
                  The colleague's email. You send it in `team` to put them on
                  the project. Only the keys of the owner and admins get it, and
                  a manager's key only for the colleagues on their projects;
                  otherwise it is `null`, except on the key's own row.
              role:
                type: string
                description: >-
                  Their role in the company: `owner`, `admin`, `manager` or
                  `agent`.
              all_projects:
                type: boolean
                description: '`true` for the owner and admins, who are on every project.'
            required:
              - name
              - email
              - role
              - all_projects
          description: >-
            The project's team: the owner and admins, who are on every project,
            then the colleagues chosen for it.
        viewings:
          type:
            - object
            - 'null'
          properties:
            offer:
              type: object
              properties:
                places:
                  type: array
                  items:
                    type: object
                    properties:
                      place:
                        type: string
                        description: Meeting place.
                      rooms:
                        type:
                          - integer
                          - 'null'
                        description: Number of rooms.
                    required:
                      - place
                      - rooms
                  description: >-
                    The places a client can choose: `place` (`office`,
                    `show_flat` or `unit`) and `rooms` (the rooms of the flat to
                    see, or `null`).
                open_house:
                  type: boolean
                  description: >-
                    The state of an open house window, `null` for a viewing:
                    `note`, `rsvp`, `capacity`, `going`, `arrived`,
                    `savers_notified`, `savers_to_notify`, `running`.
                site_visit:
                  type: boolean
                  description: >-
                    `true` while visitors only go on site on a visit day with
                    places: an open house window needs `capacity`.
                flat_viewings:
                  type: boolean
                  description: '`true` when clients can book viewings at the flats.'
                needs_start:
                  type: boolean
                  description: >-
                    `true` for a Finished project whose viewings at the flats
                    you haven't started yet (`POST
                    /projects/{code}/flat-viewings`).
              required:
                - places
                - open_house
                - site_visit
                - flat_viewings
                - needs_start
              description: >-
                What clients can book now, by stage: `places` (where),
                `open_house`, `site_visit` (on site only on a visit day with
                places), `flat_viewings` and `needs_start`.
            flat_viewings_started_at:
              type:
                - string
                - 'null'
              description: When the viewings at the flats started, or `null`.
            consultants:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Name.
                  email:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The consultant's email, under the same rule as the emails
                      in `team`. It's `null` when the key may not see it.
                  role:
                    type: string
                    description: Role.
                required:
                  - name
                  - email
                  - role
              description: >-
                The project's consultants, who meet the clients: its team
                members who work at the firm, managers first. Empty when you
                haven't chosen anyone; then whoever runs the listing does the
                viewings.
            next_viewing:
              type:
                - string
                - 'null'
              description: The next booked or requested viewing, or `null`.
            next_open_house:
              type:
                - string
                - 'null'
              description: The next open house that hasn't ended, or `null`.
          required:
            - offer
            - flat_viewings_started_at
            - consultants
            - next_viewing
            - next_open_house
          description: The viewings filter.
        developer:
          type:
            - object
            - 'null'
          properties:
            name:
              type: string
              description: The name of the development's company.
            country:
              type:
                - string
                - 'null'
              description: The country of the company, ISO 3166-1 alpha-2 code.
            tax_id:
              type:
                - string
                - 'null'
              description: >-
                The tax ID, only when the company is verified in the register
                and is a legal entity. `null` for sole traders (PFA) and
                individual enterprises.
            verified:
              type: boolean
              description: >-
                `true` when the company's details were checked in the public
                registers .
            url:
              type:
                - string
                - 'null'
              description: >-
                The developer's page on Housera. `null` when the company does
                not have an account.
          required:
            - name
            - country
            - tax_id
            - verified
            - url
          description: >-
            The company that builds the development. `null` for other types and
            while the developer is not known.
        mandate:
          type:
            - object
            - 'null'
          properties:
            status:
              type: string
              description: >-
                `requested` (waiting for a decision), `confirmed`, `refused`,
                `withdrawn` (the agency withdrew its request), `revoked` or
                `expired`. The development is public only while the mandate is
                `confirmed`.
            decided_via:
              type:
                - string
                - 'null'
              description: >-
                Who decided: `developer` (the developer), `moderator` (a Housera
                moderator) or `legacy` (a decision without a mandate request).
                `null` until a decision is made.
            valid_until:
              type:
                - string
                - 'null'
              description: >-
                The contract's end date, `YYYY-MM-DD`. `null` when the contract
                has none.
            renewal_pending:
              type: boolean
              description: >-
                `true` while a new contract is waiting for the developer to
                confirm it.
          required:
            - status
            - decided_via
            - valid_until
            - renewal_pending
          description: >-
            On an agency's project, its open mandate on the development:
            `requested` or `confirmed`. `null` on a developer's projects.
        units:
          type: object
          properties:
            available:
              type: integer
              description: Active, unreserved units.
            reserved:
              type: integer
              description: Active, reserved units.
            sold:
              type: integer
              description: Sold units.
          required:
            - available
            - reserved
            - sold
          description: The project's public units, counted as on the development's page.
      required:
        - code
        - title
        - url
        - status
        - stage
        - address
        - delivery
        - price_from
        - partners
        - requests
        - manages
        - sales_office
        - team
        - viewings
        - developer
        - mandate
        - units
      title: ProjectApiResource
    Problem:
      type: object
      title: Problem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: The HTTP status code.
        code:
          type: string
          description: >-
            The stable code of the refusal, the one to handle the error by (the
            list is on the Errors page).
        detail:
          type: string
          description: The explanation, in the request's language.
        existing:
          type: object
          properties:
            code:
              type: string
              description: The existing listing's public code.
            external_ref:
              type:
                - string
                - 'null'
              description: >-
                Your ID for the existing listing, if you set it with `PUT
                /listings/ref/{ref}`. Otherwise `null`.
          required:
            - code
            - external_ref
          description: >-
            Only on `409 duplicate_listing`: the listing you already have for
            the same property.
      required:
        - type
        - title
        - status
        - code
        - detail
    ValidationProblem:
      type: object
      title: ValidationProblem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: 'The HTTP status code: `422`.'
        errors:
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
                description: The field it refers to, as a JSON Pointer (`/features/2`).
              code:
                type: string
                description: >-
                  The rule that failed, as a stable code (the list is on the
                  Errors page).
              detail:
                type: string
                description: >-
                  The explanation, in the request's language. The wording can
                  change, so handle the error by `code`.
            required:
              - pointer
              - code
              - detail
          description: One entry for each field that fails the rules.
      required:
        - type
        - title
        - status
        - errors
  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.