Rentberry User API

User

OpenAPI Specification

rentberry-user-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Rentberry User API
  description: Renting Done Right. Finally.
  version: 4
tags:
- name: User
  description: User
paths:
  /v{version}/user:
    get:
      tags:
      - User
      summary: Get the current authenticated user profile.
      description: Available since API version 1.
      operationId: get_api_v1_user_me_get
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Returns the authenticated user profile.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User2'
        '401':
          description: Unauthorized
      security:
      - XAuthToken: []
    post:
      tags:
      - User
      summary: Update the profile of the current authenticated user.
      description: Available since API version 1.
      operationId: post_api_v1_user_update
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountProfileType'
      responses:
        '200':
          description: Profile updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User2'
        '400':
          description: Validation failed.
        '401':
          description: Unauthorized
      security:
      - XAuthToken: []
    delete:
      tags:
      - User
      summary: Delete a user account (admin only).
      description: Available since API version 3.
      operationId: delete_api_v3_user_delete
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '204':
          description: User deleted.
        '400':
          description: Cannot delete account with active rentals
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
      - XAuthToken: []
  /v{version}/user/local:
    post:
      tags:
      - User
      summary: Update local settings of the authenticated user.
      description: Available since API version 4.
      operationId: post_api_v4_user_update_local_settings
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountLocalSettingsType'
      responses:
        '200':
          description: Local settings updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User2'
        '400':
          description: Validation failed.
        '401':
          description: Unauthorized
      security:
      - XAuthToken: []
  /v{version}/user/picture:
    post:
      tags:
      - User
      summary: Update the profile picture of the authenticated user.
      description: Available since API version 1.
      operationId: post_api_v1_user_picture
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountProfilePictureType'
      responses:
        '204':
          description: Profile picture updated.
        '400':
          description: Invalid image.
        '401':
          description: Unauthorized
      security:
      - XAuthToken: []
  /v{version}/user/{id}:
    get:
      tags:
      - User
      summary: Get public profile of a user.
      description: Available since API version 1.
      operationId: get_api_v1_user_get
      parameters:
      - name: id
        in: path
        description: User ID
        required: true
        schema:
          type: integer
          pattern: \d+
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Returns public user profile.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User8'
        '401':
          description: Unauthorized
        '404':
          description: User not found
      security:
      - XAuthToken: []
  /v{version}/user/email-verify/{reference}:
    post:
      tags:
      - User
      summary: Verify user email with reference token.
      description: Available since API version 1.
      operationId: post_api_v1_user_set_verify_email
      parameters:
      - name: reference
        in: path
        description: Email verification reference token
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Email verified successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User2'
        '401':
          description: Unauthorized
        '400':
          description: Invalid reference token
      security:
      - XAuthToken: []
  /v{version}/user/email-verify:
    put:
      tags:
      - User
      summary: Mark email verification reminder as shown.
      description: Available since API version 1.
      operationId: put_api_v1_user_verify_email_shown
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Reminder marked as shown.
        '401':
          description: Unauthorized
      security:
      - XAuthToken: []
    post:
      tags:
      - User
      summary: Resend email verification message.
      description: Available since API version 1.
      operationId: post_api_v1_user_verify_email_resend
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Verification email resent.
        '401':
          description: Unauthorized
        '400':
          description: Email already verified or rate limited
      security:
      - XAuthToken: []
  /v{version}/user/location/info:
    get:
      tags:
      - User
      summary: Get user location information based on IP.
      description: Available since API version 4. Returns IP address and country information based on request headers.
      operationId: get_api_v1_user_location_info
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Returns user location information.
          content:
            application/json:
              schema:
                properties:
                  ip:
                    description: User IP address
                    type:
                    - string
                    - 'null'
                  country:
                    description: Country code from CloudFlare
                    type:
                    - string
                    - 'null'
                type: object
  /v{version}/user/{id}/profile-apartment-list:
    get:
      tags:
      - User
      summary: Get user profile apartment listings.
      description: Available since API version 1. Returns paginated list of apartments for a specific user profile.
      operationId: get_api_v1_user_profile_apartment_list
      parameters:
      - name: id
        in: path
        description: User ID
        required: true
        schema:
          type: integer
          pattern: \d+
      - name: page
        in: query
        description: Page number for pagination
        required: false
        schema:
          type: integer
          default: 1
      - name: limit
        in: query
        description: Items per page
        required: false
        schema:
          type: integer
          default: 10
      - name: version
        in: path
        required: true
        schema:
          type: string
          pattern: \d+
      responses:
        '200':
          description: Returns paginated list of user apartments.
          content:
            application/json:
              schema:
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProfileListingResponse'
                  total:
                    description: Total number of items
                    type: integer
                  page:
                    description: Current page number
                    type: integer
                type: object
        '401':
          description: Unauthorized
        '404':
          description: User not found
      security:
      - XAuthToken: []
components:
  schemas:
    RentalPaymentUnit:
      properties:
        paymentAmount:
          type: string
        id:
          type: integer
        type:
          type: string
        amount:
          type: string
      type: object
    AccountLocalSettingsType:
      required:
      - locale
      - currency
      - lengthUnit
      properties:
        locale:
          type: string
        currency:
          type: string
        lengthUnit:
          type: string
      type: object
    ApplicantAttachment:
      properties:
        id:
          type: integer
        fileName:
          type: string
        mimeType:
          type: string
        size:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    UserCreditScore:
      properties:
        score:
          type: integer
        creditScoreUpdatedAt:
          type: string
          format: date-time
        alert:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    UserStripeCustomer2:
      properties:
        customerId:
          type: string
        user:
          $ref: '#/components/schemas/User2'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    AccountProfilePictureType:
      required:
      - profilePictureFile
      properties:
        profilePictureFile: []
      type: object
    Applicant:
      required:
      - employmentType
      properties:
        id:
          type: integer
        apartmentApply:
          $ref: '#/components/schemas/ListingApplication'
        user:
          $ref: '#/components/schemas/User'
        references:
          type: array
          items:
            $ref: '#/components/schemas/ApplicantReference'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/ApplicantAttachment'
        creator:
          type: boolean
          default: false
        active:
          type: boolean
          default: false
        rentalHistory:
          type: array
          items:
            $ref: '#/components/schemas/UserRentalHistory'
        employmentType:
          type: string
          enum:
          - employed
          - unemployed
          - student
        employmentName:
          type: string
          maxLength: 255
          minLength: 1
        employmentTitle:
          type: string
          maxLength: 255
          minLength: 1
        employmentSourceIncome:
          type: string
          maxLength: 255
          minLength: 1
        employmentIncome:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    User:
      required:
      - nameFirst
      - nameLast
      - username
      - phone
      - birthday
      properties:
        hasPassword:
          type: boolean
        phoneCountryCode:
          type: string
        id:
          type: integer
        nameFirst:
          type: string
          maxLength: 255
          minLength: 2
        nameMiddle:
          type: string
          maxLength: 255
          minLength: 1
        nameLast:
          type: string
          maxLength: 255
          minLength: 2
        company:
          $ref: '#/components/schemas/Company'
        companyName:
          type: string
          maxLength: 255
          minLength: 1
        username:
          type: string
          maxLength: 255
          minLength: 1
        profilePictureThumbs:
          type: string
        phone:
          type: string
          maxLength: 15
          minLength: 7
        birthday:
          type: string
          format: date-time
        bio:
          type: string
          maxLength: 1500
        oauthProviders:
          type: array
          items:
            $ref: '#/components/schemas/UserOauthProvider'
        address:
          $ref: '#/components/schemas/UserAddress'
        creditScore:
          $ref: '#/components/schemas/UserCreditScore'
        criminalReport:
          $ref: '#/components/schemas/UserCriminalReport'
        stripeCustomer:
          $ref: '#/components/schemas/UserStripeCustomer'
        active:
          type: boolean
          default: true
        fromNotBerryForbiddenCountry:
          type: boolean
          default: false
        verified:
          type: boolean
          default: false
        emailVerified:
          type: boolean
          default: false
        phoneVerified:
          type: boolean
          default: false
        registered:
          type: boolean
          default: true
        emailNotVerifiedAfter:
          type: string
          format: date-time
        lastActiveAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        statusType:
          type: string
          default: regular
          enum:
          - regular
          - premium
          - premium_pending
          - vip
          - vip_pending
        authToken:
          type: string
        rentalHistory:
          type: array
          items:
            $ref: '#/components/schemas/UserRentalHistory'
        deleted:
          type: boolean
          default: false
        rentalPaymentAccount:
          $ref: '#/components/schemas/RentalPaymentAccount'
        newsletterSubscription:
          type: boolean
          default: false
        premiumPartner:
          type: boolean
          default: false
        locale:
          type: string
          default: en_US
          enum:
          - en_US
          - es_ES
        currency:
          type: string
        lengthUnit:
          type: string
          enum:
          - m
          - ft
        isRaiUser:
          type: boolean
          default: false
      type: object
    UserDocument:
      required:
      - name
      properties:
        id:
          type: integer
        name:
          type: string
        mimeType:
          type: string
        size:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    AccountProfileType:
      required:
      - companyName
      - nameFirst
      - nameMiddle
      - nameLast
      - facebookUrl
      - linkedinUrl
      - birthday
      - bio
      - plainPassword
      - oldPassword
      - profilePictureFile
      properties:
        companyName:
          type: string
        nameFirst:
          type: string
        nameMiddle:
          type: string
        nameLast:
          type: string
        facebookUrl:
          type: string
        linkedinUrl:
          type: string
        birthday:
          type: integer
        bio:
          type: string
        plainPassword:
          type: string
          format: password
        oldPassword:
          type: string
          format: password
        profilePictureFile: []
      type: object
    UserRentalHistory:
      required:
      - address
      - city
      - homeownerPhone
      properties:
        id:
          type: integer
        user:
          $ref: '#/components/schemas/User'
        applicantId:
          type: integer
        address:
          type: string
          maxLength: 255
          minLength: 3
        city:
          type: string
          maxLength: 255
          minLength: 3
        price:
          type: integer
        term:
          type: integer
        homeownerPhone:
          type: integer
          maxLength: 15
          minLength: 7
      type: object
    ApplicantReference:
      required:
      - name
      - relationship
      - phone
      properties:
        id:
          type: integer
        applicant:
          $ref: '#/components/schemas/Applicant'
        name:
          type: string
          maxLength: 255
          minLength: 1
        relationship:
          type: string
          maxLength: 255
          minLength: 1
        email:
          type: string
        phone:
          type: integer
          maxLength: 15
          minLength: 7
      type: object
    RentalPaymentAccount:
      properties:
        stripeAccountId:
          type: string
        isStripeOnboardingFinished:
          type: boolean
          default: false
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    Coordinates:
      properties:
        latitude:
          type: number
          format: float
        longitude:
          type: number
          format: float
      type: object
    UserAddress:
      required:
      - street
      - houseNumber
      - city
      - zip
      properties:
        street:
          type: string
          maxLength: 255
          minLength: 1
        houseNumber:
          type: string
          maxLength: 255
          minLength: 1
        streetType:
          type:
          - string
          - 'null'
          maxLength: 10
        city:
          type: string
          maxLength: 255
          minLength: 3
        state:
          $ref: '#/components/schemas/State'
        zip:
          type: string
          maxLength: 9
          minLength: 5
      type: object
    UserCriminalReport:
      properties:
        criminalRecordFound:
          type: boolean
          default: false
        status:
          type: integer
          maxLength: 10
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    State:
      properties:
        id:
          type: integer
        shortName:
          type:
          - string
          - 'null'
          default: null
          maxLength: 200
          minLength: 1
        name:
          type:
          - string
          - 'null'
          default: null
          maxLength: 255
          minLength: 1
        description:
          type: string
      type: object
    UserStripeCustomer:
      properties:
        customerId:
          type: string
        user:
          $ref: '#/components/schemas/User'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    UserOauthProvider:
      properties:
        id:
          type: integer
        provider:
          type: string
        providerId:
          type: string
        connectId:
          type: string
        nameFirst:
          type: string
        nameLast:
          type: string
        pictureUrl:
          type: string
        appId:
          type: string
      type: object
    StripePayment:
      properties:
        id:
          type: integer
        amount:
          type: string
          default: '0'
        status:
          type: string
        cancellationReason:
          type: string
        errorMessage:
          type: string
        internalType:
          type: string
        last4Digits:
          type: string
        paymentMethod:
          type: string
          default: card
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    RentalSubscription:
      properties:
        id:
          type: integer
        amount:
          type: string
          default: '0'
        commissionFee:
          type: string
          default: '0'
        amountTotal:
          type: string
          default: '0'
        currency:
          type: string
        comment:
          type: string
        status:
          type: string
          default: incomplete
        paymentMethod:
          type: string
          default: card
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    UserAddress2:
      required:
      - street
      - houseNumber
      - city
      - zip
      properties:
        street:
          type: string
          maxLength: 255
          minLength: 1
        houseNumber:
          type: string
          maxLength: 255
          minLength: 1
        streetType:
          type:
          - string
          - 'null'
          maxLength: 10
        city:
          type: string
          maxLength: 255
          minLength: 3
        state:
          $ref: '#/components/schemas/State2'
        zip:
          type: string
          maxLength: 9
          minLength: 5
      type: object
    Rental:
      properties:
        listing:
          $ref: '#/components/schemas/Listing'
        apartmentId:
          title: for iOs compatibility.
          type: integer
        latestPayment:
          $ref: '#/components/schemas/RentalPayment'
        activeSubscription:
          $ref: '#/components/schemas/RentalSubscription'
        id:
          type: integer
        application:
          $ref: '#/components/schemas/ListingApplication'
        moveIn:
          type: string
          format: date-time
        moveOut:
          type: string
          format: date-time
        firstPaymentDate:
          type: string
          format: date-time
        monthlyRentAmount:
          type: string
          maximum: 9999999
          minimum: 1
        monthlyDueDate:
          type: integer
        tenantFirstName:
          type: string
        tenantLastName:
          type: string
        tenantEmail:
          type: string
        address:
          type: string
        unit:
          type: string
        homeowner:
          $ref: '#/components/schemas/User'
        tenant:
          $ref: '#/components/schemas/User'
        status:
          type: string
          default: pending
        isChargeable:
          type: boolean
          default: false
        documents:
          type: array
          items:
            $ref: '#/components/schemas/UserDocument'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    AdminLevelCollection:
      properties: []
      type: object
    ProfileListingResponse:
      required:
      - name
      - type
      - description
      - externalKey
      properties:
        openHousesEnabled:
          type: boolean
        leadUrl:
          type: boolean
        price:
          type: number
          format: float
        priceTerm:
          type: string
        user:
          $ref: '#/components/schemas/User'
        active:
          type: boolean
        rented:
          type: boolean
        providerType:
          type: string
        editedByUser:
          title: legacy.
          type: boolean
        expired:
          type: boolean
        promoted:
          type: boolean
        currency:
          type: string
        company:
          $ref: '#/components/schemas/Company'
        expireAt:
          type: integer
        listingStatus:
          type: string
        hasVirtualTour:
          type: boolean
        originalPrice:
          $ref: '#/components/schemas/Price'
        rooms:
          title: legacy.
          type: integer
        traffic:
          title: legacy.
          type: integer
        rentDuration:
          title: legacy.
          type: integer
        unitNumber:
          title: legacy.
          type: string
        levelId:
          title: legacy.
          type: integer
        shapeId:
          title: legacy.
          type: string
        panoramaId:
          title: legacy.
          type: string
        occupant:
          title: legacy.
          type: string
        id:
          type: integer
        apartmentPictures:
          type: array
          items:
            $ref: '#/components/schemas/ListingPicture'
        virtualTours:
          type: array
          items:
            $ref: '#/components/schemas/VirtualTour'
        address:
          $ref: '#/components/schemas/ListingAddress'
        apartmentApplies:
          type: array
          items:
            $ref: '#/components/schemas/ListingApplication'
        openHouseApplications:
          type: array
          items:
            $ref: '#/components/schemas/OpenHouseApplication'
        name:
          type: string
          maxLength: 255
          minLength: 1
        available:
          type: string
          format: date-time
        space:
          type: integer
          maximum: 99999
        lengthUnit:
          type: string
          enum:
          - ft
          - m
        type:
          type: string
          enum:
          - apartment
          - house
          - condo
          - townhouse
          - duplex
          - loft
          - room
          - land
          - other
        deposit:
          type: integer
          maximum: 999999999
          minimum: 0
        utilitiesPrice:
          type: integer
          maximum: 999999999
          minimum: 0
        description:
          type: string
          maxLength: 10000
        isAIDescription:
          type: boolean
          default: false
        deleted:
          type: boolean
          default: false
        syndicated:
          type: boolean
          default: false
        externalUrl:
          type: string
          maxLength: 2048
        seoUrl:
          type: string
        externalKey:
          type: string
        listedAt:
          type: string
          format: date-time
        publishedAt:
          title: Date when listing was published on MLS.
          type: string
          format: date-time
        provider:
          type: string
          default: rentberry
          enum:
          - rentberry
          - apartmentlist
          - apts
          - avail
          - bondnewyork
          - bostonapartments
          - collegestudentapartments
          - commercialpropertykenya
          - eurovilla
          - expedia
          - findroommate
          - flatio
          - fourstay
          - foreclosure
          - fultongrace
          - goplaceit
          - harlington
          - hemavi
          - homestay
          - housinganywhere
          - housestay
          - huurstunt
          - inlife
          - joivy
          - junehome
          - krn
          - levit
          - livinfrance
          - mapaprop
          - morningcroissant
          - mystate
          - navent
          - onthemarket
          - openimmo
          - padfinders
          - padsplit
          - parisattitude
          - pepehousing
          - pin
          - realbird
          - reallyo
          - realtymx
          - realtyww
          - rentalsource
          - rentengine
          - renthia
          - rentinsingapore
          - rentola
          - roomless
          - roomster
          - samtrygg
          - siamrealestate
          - speedhome
          - spotahome
          - 3dapartment
          - turbotenant
          - uniplaces
          - wunderflats
          - yourrentals
          - yucalive
          - xml2u
          - ziptoss
          - cheznestor
          - coliving
          - domaingroup
          - erasmusu
          - explorastay
          - rentcatalogue
          - homelike
          - hyrenbostad
          - lejebolig
          - listhub
          - properstar
          - studentsglobalrelocation
          - zappyrent
          - zeusliving
        maintenance:
          type: array
          items:
            $ref: '#/components/schemas/Maintenance'
        amenities:
          type: array
          items:
            enum:
            - gym
            - pool
            - garden
            - parking
            - doorman
            - storage
            - balcony
            - elevator
            - fireplace
            - highRise
            - roofDeck
            - furnished
            - dishwasher
            - beachView
            - washerUnit
            - hardwoodFloors
            - airConditioning
            - wheelchairAccessible
            - attic
            - basement
            - bbqArea
            - deck
            - disabledAccess
            - garageParking
            - greenhouse
            - intercom
            - lawn
            - new
            - secondarySuite
            - security
            - waterfront
            - wired
            - newConstruction
            - securitySystem
            - hotTube
            - studentFriendly
            - utilitiesIncluded
            - energyEfficient
            - solarPowered
            - kitchen
            - privateKitchen
            - sharedKitchen
            - internet
            - wifi
            - tv
            - localTv
            - cableTv
            - computer
            - laptopWorkspace
            - hotTube
            - tub
            - iron
            - towels
            - ironingBoard
            - toiletries
            - guestToilet
            - buzzerWirelessIntercom
            - privateEntrance
            - hairDryer
            - suitableForEvents
            - centralizedHeating
            - autonomousHeating
            - busStop
            - trainStation
            - airport
            - bicyclesForUse
            - library
            - shoppingCenter
            - hospital
            - park
            - golf
            - museums
            - healthClub
            - amusementPark
            - cinema
            - restaurant
            - gamesRoom
            - horseStables
            - bowling
            - smokeAlarm
            - smokeAlarmEachFloor
            - sportsArena
            - coDetector
            - cellar
            - blankets
            - pillows
            - bedClothes
            - broom
            - floorWiper
            - shower
            - toaster
            - microwave
            - fridge
            - coffee
            - kettle
            - cutlery
            - vacuumCleaner
            - stove
            - detergents
            - bidet
            - hourSecurity24
            - fishing
            - waterSports
            - creditApplication
            - smokingFriendly
            - brokerFee
            - garbageDisposer
            - iceMaker
            - trashCompactor
            - warmingDrawer
            - coffeeSystem
            - coffeeSystemRoughIn
            - cooktop
            - cooktopElectric
            - cooktopElectric2Burner
            - cooktopElectric6Burner
            - cooktopGas
            - cooktopGas2Burner
            - cooktopGas5Burner
            - cooktopGas6Burner
            - cooktopGasCustom
            - cooktopInduction
            - cooktopInduction2Burner
            - cooktopInduction6Burner
            - dishwasherDrawer
            - d

# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/rentberry/refs/heads/main/openapi/rentberry-user-api-openapi.yml