openapi: 3.0.0
components:
  schemas:
    CountryName:
      type: string
      enum:
        - Afghanistan
        - Albania
        - Algeria
        - American Samoa
        - Andorra
        - Angola
        - Anguilla
        - Antarctica
        - Antigua and Barbuda
        - Argentina
        - Armenia
        - Aruba
        - Australia
        - Austria
        - Azerbaijan
        - Bahamas
        - Bahrain
        - Bangladesh
        - Barbados
        - Belarus
        - Belgium
        - Belize
        - Benin
        - Bermuda
        - Bhutan
        - Bolivia
        - Bosnia and Herzegovina
        - Botswana
        - Brazil
        - British Indian Ocean Territory
        - British Virgin Islands
        - Brunei
        - Bulgaria
        - Burkina Faso
        - Burundi
        - Cambodia
        - Cameroon
        - Canada
        - Cape Verde
        - Cayman Islands
        - Central African Republic
        - Chad
        - Chile
        - China
        - Christmas Island
        - Cocos Islands
        - Colombia
        - Comoros
        - Cook Islands
        - Costa Rica
        - Croatia
        - Cuba
        - Curacao
        - Cyprus
        - Czech Republic
        - Democratic Republic of the Congo
        - Denmark
        - Djibouti
        - Dominica
        - Dominican Republic
        - East Timor
        - Ecuador
        - Egypt
        - El Salvador
        - Equatorial Guinea
        - Eritrea
        - Estonia
        - Ethiopia
        - Falkland Islands
        - Faroe Islands
        - Fiji
        - Finland
        - France
        - French Polynesia
        - Gabon
        - Gambia
        - Georgia
        - Germany
        - Ghana
        - Gibraltar
        - Greece
        - Greenland
        - Grenada
        - Guam
        - Guatemala
        - Guernsey
        - Guinea
        - Guinea-Bissau
        - Guyana
        - Haiti
        - Honduras
        - Hong Kong
        - Hungary
        - Iceland
        - India
        - Indonesia
        - Iran
        - Iraq
        - Ireland
        - Isle of Man
        - Israel
        - Italy
        - Ivory Coast
        - Jamaica
        - Japan
        - Jersey
        - Jordan
        - Kazakhstan
        - Kenya
        - Kiribati
        - Kosovo
        - Kuwait
        - Kyrgyzstan
        - Laos
        - Latvia
        - Lebanon
        - Lesotho
        - Liberia
        - Libya
        - Liechtenstein
        - Lithuania
        - Luxembourg
        - Macau
        - Macedonia
        - Madagascar
        - Malawi
        - Malaysia
        - Maldives
        - Mali
        - Malta
        - Marshall Islands
        - Mauritania
        - Mauritius
        - Mayotte
        - Mexico
        - Micronesia
        - Moldova
        - Monaco
        - Mongolia
        - Montenegro
        - Montserrat
        - Morocco
        - Mozambique
        - Myanmar
        - Namibia
        - Nauru
        - Nepal
        - Netherlands
        - Netherlands Antilles
        - New Caledonia
        - New Zealand
        - Nicaragua
        - Niger
        - Nigeria
        - Niue
        - North Korea
        - Northern Mariana Islands
        - Norway
        - Oman
        - Pakistan
        - Palau
        - Palestine
        - Panama
        - Papua New Guinea
        - Paraguay
        - Peru
        - Philippines
        - Pitcairn
        - Poland
        - Portugal
        - Puerto Rico
        - Qatar
        - Republic of the Congo
        - Reunion
        - Romania
        - Russia
        - Rwanda
        - Saint Barthelemy
        - Saint Helena
        - Saint Kitts and Nevis
        - Saint Lucia
        - Saint Martin
        - Saint Pierre and Miquelon
        - Saint Vincent and the Grenadines
        - Samoa
        - San Marino
        - Sao Tome and Principe
        - Saudi Arabia
        - Senegal
        - Serbia
        - Seychelles
        - Sierra Leone
        - Singapore
        - Sint Maarten
        - Slovakia
        - Slovenia
        - Solomon Islands
        - Somalia
        - South Africa
        - South Korea
        - South Sudan
        - Spain
        - Sri Lanka
        - Sudan
        - Suriname
        - Svalbard and Jan Mayen
        - Swaziland
        - Sweden
        - Switzerland
        - Syria
        - Taiwan
        - Tajikistan
        - Tanzania
        - Thailand
        - Togo
        - Tokelau
        - Tonga
        - Trinidad and Tobago
        - Tunisia
        - Turkey
        - Turkmenistan
        - Turks and Caicos Islands
        - Tuvalu
        - U.S. Virgin Islands
        - Uganda
        - Ukraine
        - United Arab Emirates
        - United Kingdom
        - United States
        - Uruguay
        - Uzbekistan
        - Vanuatu
        - Vatican
        - Venezuela
        - Vietnam
        - Wallis and Futuna
        - Western Sahara
        - Yemen
        - Zambia
        - Zimbabwe
      description: >-
        Common English country name accepted by the Autohost API. These are
        everyday English names, not formal ISO 3166-1 names (e.g. use 'United
        States' not 'United States of America', 'Russia' not 'Russian
        Federation'). Alternatively, pass a 2-letter ISO 3166-1 alpha-2 code in
        the `country` field and it will be resolved automatically.
      title: CountryName
    QueryParamCountry:
      type: string
      description: ISO country code (two letters)
      title: QueryParamCountry
    QueryParamPMS:
      type: string
      enum:
        - api
        - apaleo
        - beds24
        - booking
        - cloudbeds
        - guesty
        - hostaway
        - hostfully
        - inforhms
        - impala
        - lavanda
        - myvr
        - opera
        - smartbnb
        - stayntouch
        - streamline
        - trackhs
      description: >-
        PMS integration name. If supplied, the API will assume the path
        parameter `id` is a confirmation code.
      title: QueryParamPMS
    QueryParamCallback:
      type: string
      title: QueryParamCallback
    QueryParamSync:
      type: boolean
      enum:
        - 1
        - true
      title: QueryParamSync
    QueryParamSkipGP:
      type: boolean
      enum:
        - 1
        - true
      title: QueryParamSkipGP
    QueryParamListingStatus:
      type: string
      enum:
        - ACTIVE
        - INACTIVE
      title: QueryParamListingStatus
    QueryParamReservationStatus:
      type: string
      enum:
        - CONFIRMED
        - CANCELED
        - INQUIRY
        - any
      title: QueryParamReservationStatus
    ErrorResponse:
      properties:
        error:
          type: string
      description: This is an error
      title: ErrorResponse
    ReservationScreensResponse:
      properties:
        AboutYou:
          type: string
          enum:
            - disabled
            - required
            - inherit
        AuthorityReporting:
          type: string
          enum:
            - disabled
            - required
            - inherit
        BuildingScreen:
          type: string
          enum:
            - disabled
            - required
            - inherit
        BackgroundCheck:
          type: string
          enum:
            - disabled
            - required
            - inherit
        CreditCheck:
          type: string
          enum:
            - disabled
            - required
            - inherit
        IDVerification:
          type: string
          enum:
            - disabled
            - required
            - inherit
        IDCollection:
          type: string
          enum:
            - disabled
            - required
            - inherit
        SecurityDeposit:
          type: string
          enum:
            - disabled
            - required
            - inherit
        UsageAgreement:
          type: string
          enum:
            - disabled
            - required
            - inherit
        Coronavirus:
          type: string
          enum:
            - disabled
            - required
            - inherit
        CustomScreen:
          type: string
          enum:
            - disabled
            - required
            - inherit
        FileUpload:
          type: string
          enum:
            - disabled
            - required
            - inherit
        GuestList:
          type: string
          enum:
            - disabled
            - required
            - inherit
        HouseRules:
          type: string
          enum:
            - disabled
            - required
            - inherit
        LongTerm:
          type: string
          enum:
            - disabled
            - required
            - inherit
        PurposeOfStay:
          type: string
          enum:
            - disabled
            - required
            - inherit
        TimeInfoEdit:
          type: string
          enum:
            - disabled
            - required
            - inherit
        SexOffendersAddon:
          type: string
          enum:
            - disabled
            - required
            - inherit
        SocialVerificationAddon:
          type: string
          enum:
            - disabled
            - required
            - inherit
        SanctionsSearchAddon:
          type: string
          enum:
            - disabled
            - required
            - inherit
        FraudDetectionAddon:
          type: string
          enum:
            - disabled
            - required
            - inherit
        AdverseMediaSearchAddon:
          type: string
          enum:
            - disabled
            - required
            - inherit
      description: Reservation Guest Portal screens configuration
      title: ReservationScreensResponse
    ListingDetailsResponse:
      properties:
        id:
          type: string
        my_id:
          type: string
        user_id:
          type: string
        status:
          type: string
        name:
          type: string
        nickname:
          type: string
        property_type:
          type: string
        accommodates:
          type: number
        bedrooms:
          type: number
        bathrooms:
          type: number
        beds:
          type: number
        check_in_time:
          type: number
        check_out_time:
          type: number
        location:
          type: object
          properties:
            street:
              type: string
            city:
              type: string
            state:
              type: string
            country:
              type: string
            time_zone_name:
              type: string
            building:
              type: string
        created_at:
          type: string
        updated_at:
          type: string
      description: Listing object
      title: ListingDetailsResponse
    ListingSearchResponse:
      properties:
        total:
          type: number
        from:
          type: number
        size:
          type: number
        count:
          type: number
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              status:
                type: string
      description: List of listing objects
      title: ListingSearchResponse
    ListingSuperhogRequest:
      properties:
        action:
          type: string
          enum:
            - connect
            - disconnect
      description: Listing SuperHog connect or disconnect request
      title: ListingSuperhogRequest
    ListingSuperhogResponse:
      properties:
        autohost_id:
          type: string
        superhog_id:
          type: string
      description: Listing SuperHog connect or disconnect response
      title: ListingSuperhogResponse
    ReservationSearchResponse:
      properties:
        total:
          type: number
        from:
          type: number
        size:
          type: number
        count:
          type: number
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              status:
                type: string
      description: List of reservation objects
      title: ReservationSearchResponse
    ReservationsVerificationChangeRequest:
      properties:
        supervised:
          type: string
          enum:
            - approve
            - decline
        notes:
          type: string
      description: Reservation set or update verification status
      title: ReservationsVerificationChangeRequest
    ListingCreateRequest:
      required:
        - my_id
        - status
        - name
        - location
      properties:
        id:
          type: string
          description: Autohost listing ID. Used for updating an existing listing.
        my_id:
          type: string
          description: >-
            Your unique identifier for this listing. Alphanumeric characters
            only, no spaces or special characters.
        status:
          type: string
          description: Listing status. Must be ACTIVE or INACTIVE.
          enum:
            - ACTIVE
            - INACTIVE
        name:
          type: string
          description: Public-facing name for the listing.
        nickname:
          type: string
          description: >-
            Internal nickname for the listing. Defaults to the value of `name`
            if not provided.
        property_type:
          type: string
          description: Type of property for risk assessment.
          enum:
            - Apartment
            - House
            - Loft
            - Boat
            - Camper/RV
            - Condominium
            - Serviced Apartment
            - Cottage
            - Chalet
            - Bed&Breakfast
            - Villa
            - Tent
            - Other
            - Cabin
            - Townhouse
            - Bungalow
            - Hut
            - Dorm
            - Parking Space
            - Plane
            - Treehouse
            - Yurt
            - Tipi
            - Igloo
            - Earth House
            - Island
            - Cave
            - Castle
            - Studio
            - Hotel
        accommodates:
          type: number
          description: Maximum number of guests. Defaults to 2.
        bedrooms:
          type: number
          description: Number of bedrooms. Defaults to 1.
        bathrooms:
          type: number
          description: Number of bathrooms. Defaults to 1.
        beds:
          type: number
          description: Number of beds. Defaults to 1.
        check_in_time:
          type: number
          description: Check-in hour (0-24). Defaults to 16.
        check_out_time:
          type: number
          description: Check-out hour (0-24). Defaults to 11.
        location:
          type: object
          description: >-
            Listing location. Required fields: street, city, country, state,
            zipcode. Timezone is derived automatically if not provided (from geo
            coordinates first, then via address geocoding as a deprecated
            fallback). Providing timezone or geo coordinates directly will be
            required soon.
          required:
            - street
            - city
            - country
            - zipcode
            - timezone
          properties:
            street:
              type: string
              description: Street address.
            city:
              type: string
              description: City name.
            country:
              $ref: '#/components/schemas/CountryName'
            country_code:
              type: string
              description: >-
                ISO 3166-1 alpha-2 country code (e.g. 'US', 'CA', 'GB').
                Optional — derived automatically from `country` if not provided.
            state:
              type: string
              description: State or province code (e.g. ON, CA, NY).
            zipcode:
              type: string
              description: Postal or ZIP code.
            timezone:
              type: string
              description: >-
                IANA timezone identifier (e.g. America/Toronto, Europe/London).
                Optional — if not provided, derived from `geo` coordinates
                (preferred) or via address geocoding (deprecated fallback).
                Recommended to provide explicitly or via `geo` coordinates.
            building:
              type: string
              description: >-
                Building identifier for grouping listings. Alphanumeric only, no
                spaces or special characters.
            address:
              type: string
              description: Full formatted address string.
            floor:
              type: string
              description: Floor number.
            apartment:
              type: string
              description: Apartment or unit number.
            geo:
              type: object
              description: Geographic coordinates.
              properties:
                lat:
                  type: number
                  description: Latitude.
                lon:
                  type: number
                  description: Longitude.
        pictures:
          type: object
          description: >-
            Listing images. If not provided on creation, default images are
            used.
          properties:
            large_url:
              type: string
              description: URL for the large listing image.
            regular_url:
              type: string
              description: URL for the regular listing image.
            thumbnail_url:
              type: string
              description: URL for the thumbnail listing image.
      description: Listing create or update request object
      title: ListingCreateRequest
    ReservationDetailsResponse:
      properties:
        id:
          type: string
        user_id:
          type: string
        confirmation_code:
          type: string
        status:
          type: string
        source:
          type: string
        listing_id:
          type: string
        listing_nickname:
          type: string
        listing_timezone_name:
          type: string
        number_of_guests:
          type: number
        nights:
          type: number
        total_price:
          type: number
        average_daily_rate:
          type: number
        check_in_date:
          type: string
        check_out_date:
          type: string
        guest_portal_url:
          type: string
        guest:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            full_name:
              type: string
            phone:
              type: string
            email:
              type: string
              format: email
            location:
              type: string
        identification:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            middle_name:
              type: string
            document_number:
              type: string
            document_type:
              type: string
            nationality:
              type: string
            sex:
              type: string
            address:
              type: string
            birth_date:
              type: string
            expiry_date:
              type: string
            issue_date:
              type: string
        created_at:
          type: string
        updated_at:
          type: string
      description: Reservation object
      title: ReservationDetailsResponse
    ReservationStatusResponse:
      properties:
        status:
          type: string
          enum:
            - verified
            - review
            - pending
        pms_status:
          type: string
          enum:
            - CONFIRMED
            - CANCELED
            - INQUIRY
        supervised:
          type: string
          enum:
            - approve
            - decline
        reason:
          type: string
        guestportal_completed:
          type: boolean
        business_rules:
          type: array
          items:
            type: string
      description: Reservation status object
      title: ReservationStatusResponse
    ReservationSummaryResponse:
      properties:
        guest_portal_status:
          type: string
          enum:
            - COMPLETED
            - INCOMPLETE
        guest_portal_last_screen:
          type: string
        verification_composite_status:
          type: string
          enum:
            - verified
            - review
            - pending
            - approve
            - decline
        verification_status:
          type: string
          enum:
            - verified
            - review
            - pending
        verification_status_reason:
          type: string
        supervised_status:
          type: string
          enum:
            - approve
            - decline
        supervised_decline_reason:
          type: string
        risk_color:
          type: string
        top_risks:
          type: array
          items:
            type: string
        top_recommendations:
          type: array
          items:
            type: string
        loyalty_segments:
          type: array
          description: >-
            Guest loyalty RFM segmentation results. Only present when
            segmentation data is available.
          items:
            type: object
            properties:
              guest_id:
                type: string
                description: Guest identifier (email or phone)
              timestamp:
                type: string
                description: Timestamp of segmentation calculation
              segment:
                type: object
                description: Segment classification with actionable guidance
                properties:
                  name:
                    type: string
                    description: RFM segment classification
                    enum:
                      - Champions
                      - High Value Active
                      - High Value At Risk
                      - High Value Slipping
                      - Loyal Active
                      - Loyal At Risk
                      - Potential Loyalists
                      - Repeat At Risk
                      - Promising First-Timers
                      - Recent First-Timers
                      - First-Timers Need Attention
                      - Hibernating
                      - Other
                  tier:
                    type: integer
                    description: Priority tier (1 = highest)
                    minimum: 1
                    maximum: 3
                  description:
                    type: string
                  recommended_action:
                    type: string
                  offer_type:
                    type: string
                  priority:
                    type: string
                    description: Action priority level
                    enum:
                      - CRITICAL
                      - HIGH
                      - MEDIUM
                      - LOW
              rfm_scores:
                type: object
                description: RFM score breakdown
                properties:
                  recency:
                    type: integer
                    minimum: 1
                    maximum: 5
                  frequency:
                    type: integer
                    minimum: 2
                    maximum: 5
                  monetary:
                    type: integer
                    minimum: 1
                    maximum: 5
                  composite:
                    type: string
                    description: Combined RFM score, e.g. '535'
              metrics:
                type: object
                description: Guest behavioral metrics
                properties:
                  days_since_last_stay:
                    type: integer
                  last_stay_date:
                    type: string
                  first_stay_date:
                    type: string
                  total_stays:
                    type: integer
                  total_revenue:
                    type: number
                  total_nights:
                    type: integer
                  avg_booking_value:
                    type: number
                  nights_equivalent:
                    type: number
                  customer_tenure_days:
                    type: integer
              data_quality:
                type: object
                description: Data quality indicators
                properties:
                  confidence:
                    type: string
                    description: Guest identification confidence
                    enum:
                      - HIGH
                      - MEDIUM
                      - LOW
                      - UNKNOWN
                  has_email:
                    type: boolean
                  has_phone:
                    type: boolean
                  is_ota_masked:
                    type: boolean
                  identifier_type:
                    type: string
                    description: Identifier type used for lookup ('email' or 'phone')
              top_factors:
                type: array
                description: Explanation factors for segment assignment
                items:
                  type: object
                  properties:
                    factor:
                      type: string
                    value:
                      description: Factor value
                    impact:
                      type: string
                      description: Whether the factor is positive or negative
                      enum:
                        - positive
                        - negative
                    description:
                      type: string
              flags:
                type: object
                description: Guest classification flags
                properties:
                  is_corporate_account:
                    type: boolean
                  is_ota_guest:
                    type: boolean
                  has_future_booking:
                    type: boolean
                  is_seasonal_guest:
                    type: boolean
        details:
          type: object
          properties:
            general_risk:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            background_check:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            credit_check:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            blacklist:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            payment_verification:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            identification_document:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            fraud_detection:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - DECLINE
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            social_verification:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            sanctions:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
            agreement:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - PASS
                    - REVIEW
                    - INCOMPLETE
                    - DISABLED
                value:
                  type: string
      description: Reservation summary object
      title: ReservationSummaryResponse
    ReservationNotesResponse:
      type: array
      items:
        type: object
        properties:
          text:
            type: string
          author_id:
            type: string
          author_name:
            type: string
          author_type:
            type: string
          timestamp:
            type: string
      description: Reservation notes object
      title: ReservationNotesResponse
    ReservationGuestPortalResponse:
      properties:
        full_name:
          type: string
        phone:
          type: string
        email:
          type: string
          format: email
        name_on_card:
          type: string
        security_deposit:
          type: boolean
        last_step:
          type: string
        completed:
          type: boolean
        completed_at:
          type: string
        updated_at:
          type: string
        guests:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              email:
                type: string
                format: email
      description: Reservation Guest Portal object
      title: ReservationGuestPortalResponse
    IDCheckUploadResponse:
      properties:
        code:
          type: string
        error:
          type: string
        card:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            full_name:
              type: string
            birth_date:
              type: string
            expiry_date:
              type: string
      description: ID Check upload response object
      title: IDCheckUploadResponse
    IDCheckStatusResponse:
      properties:
        status:
          type: string
          enum:
            - passed
            - review
            - failed
        errors:
          type: array
          items:
            type: string
      description: ID Check status response object
      title: IDCheckStatusResponse
    ReservationEmbedLinkResponse:
      properties:
        url:
          type: string
        expires:
          type: string
      description: Embed link and expiry information (DEPRECATED - Use SDK instead)
      title: ReservationEmbedLinkResponse
    IDCheckUploadRequest:
      properties:
        imageBase64:
          type: string
      description: ID Check upload request object
      title: IDCheckUploadRequest
    IDCheckImageResponse:
      properties:
        imageBase64:
          type: string
      description: ID Check image response object
      title: IDCheckImageResponse
    ReservationCreateRequest:
      required:
        - status
        - source
        - listing_id
        - confirmation_code
        - number_of_guests
        - total_price
        - check_in_date
        - check_out_date
        - guest.first_name
        - guest.last_name
      properties:
        status:
          type: string
          enum:
            - CONFIRMED
            - CANCELED
            - INQUIRY
        source:
          type: string
        listing_id:
          type: string
        confirmation_code:
          type: string
        number_of_guests:
          type: number
        nights:
          type: number
        total_price:
          type: number
        check_in_date:
          type: string
          format: date-time
        check_out_date:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        guest:
          type: object
          properties:
            first_name:
              type: string
            last_name:
              type: string
            location:
              type: string
            phone:
              type: string
            email:
              type: string
              format: email
            access_code:
              type: string
            birth_date:
              type: string
              format: date
            metadata:
              type: object
              properties:
                ip_address:
                  type: string
                  format: ipv4
                user_agent:
                  type: string
        guest_portal_screens:
          type: object
          properties:
            AboutYou:
              type: string
              enum:
                - disabled
                - required
                - inherit
            AuthorityReporting:
              type: string
              enum:
                - disabled
                - required
                - inherit
            BuildingScreen:
              type: string
              enum:
                - disabled
                - required
                - inherit
            BackgroundCheck:
              type: string
              enum:
                - disabled
                - required
                - inherit
            CreditCheck:
              type: string
              enum:
                - disabled
                - required
                - inherit
            IDVerification:
              type: string
              enum:
                - disabled
                - required
                - inherit
            IDCollection:
              type: string
              enum:
                - disabled
                - required
                - inherit
            SecurityDeposit:
              type: string
              enum:
                - disabled
                - required
                - inherit
            UsageAgreement:
              type: string
              enum:
                - disabled
                - required
                - inherit
            Coronavirus:
              type: string
              enum:
                - disabled
                - required
                - inherit
            CustomScreen:
              type: string
              enum:
                - disabled
                - required
                - inherit
            FileUpload:
              type: string
              enum:
                - disabled
                - required
                - inherit
            GuestList:
              type: string
              enum:
                - disabled
                - required
                - inherit
            HouseRules:
              type: string
              enum:
                - disabled
                - required
                - inherit
            LongTerm:
              type: string
              enum:
                - disabled
                - required
                - inherit
            PurposeOfStay:
              type: string
              enum:
                - disabled
                - required
                - inherit
            TimeInfoEdit:
              type: string
              enum:
                - disabled
                - required
                - inherit
            SexOffendersAddon:
              type: string
              enum:
                - disabled
                - required
                - inherit
            SocialVerificationAddon:
              type: string
              enum:
                - disabled
                - required
                - inherit
            SanctionsSearchAddon:
              type: string
              enum:
                - disabled
                - required
                - inherit
            FraudDetectionAddon:
              type: string
              enum:
                - disabled
                - required
                - inherit
            AdverseMediaSearchAddon:
              type: string
              enum:
                - disabled
                - required
                - inherit
        listing:
          type: object
          description: >-
            Inline listing object. Use this to create or update the listing in
            the same request instead of providing a `listing_id`. If a listing
            with the same `my_id` already exists it will be updated; otherwise a
            new listing is created.
          required:
            - my_id
            - status
            - name
            - location
          properties:
            my_id:
              type: string
              description: >-
                Your unique identifier for this listing. Alphanumeric characters
                only, no spaces or special characters.
            status:
              type: string
              description: Listing status.
              enum:
                - ACTIVE
                - INACTIVE
            name:
              type: string
              description: Public-facing name for the listing.
            nickname:
              type: string
              description: >-
                Internal nickname for the listing. Defaults to the value of
                `name` if not provided.
            property_type:
              type: string
              description: Type of property for risk assessment.
              enum:
                - Apartment
                - House
                - Loft
                - Boat
                - Camper/RV
                - Condominium
                - Serviced Apartment
                - Cottage
                - Chalet
                - Bed&Breakfast
                - Villa
                - Tent
                - Other
                - Cabin
                - Townhouse
                - Bungalow
                - Hut
                - Dorm
                - Parking Space
                - Plane
                - Treehouse
                - Yurt
                - Tipi
                - Igloo
                - Earth House
                - Island
                - Cave
                - Castle
                - Studio
                - Hotel
            accommodates:
              type: number
              description: Maximum number of guests. Defaults to 2.
            bedrooms:
              type: number
              description: Number of bedrooms. Defaults to 1.
            bathrooms:
              type: number
              description: Number of bathrooms. Defaults to 1.
            beds:
              type: number
              description: Number of beds. Defaults to 1.
            check_in_time:
              type: number
              description: Check-in hour (0-24). Defaults to 16.
            check_out_time:
              type: number
              description: Check-out hour (0-24). Defaults to 11.
            location:
              type: object
              description: >-
                Listing location. Timezone is derived automatically if not
                provided (from geo coordinates first, then via address geocoding
                as a deprecated fallback). Providing timezone or geo coordinates
                directly is recommended.
              required:
                - street
                - city
                - country
                - zipcode
                - geo
                - timezone
              properties:
                street:
                  type: string
                  description: Street address.
                city:
                  type: string
                  description: City name.
                country:
                  $ref: '#/components/schemas/CountryName'
                country_code:
                  type: string
                  description: >-
                    ISO 3166-1 alpha-2 country code (e.g. 'US', 'CA', 'GB').
                    Optional — derived automatically from `country` if not
                    provided.
                state:
                  type: string
                  description: State or province code (e.g. ON, CA, NY).
                zipcode:
                  type: string
                  description: Postal or ZIP code.
                timezone:
                  type: string
                  description: >-
                    IANA timezone identifier (e.g. America/Toronto,
                    Europe/London). Optional — if not provided, derived from
                    `geo` coordinates (preferred) or via address geocoding
                    (deprecated fallback). Recommended to provide explicitly or
                    via `geo` coordinates.
                building:
                  type: string
                  description: >-
                    Building identifier for grouping listings. Alphanumeric
                    only, no spaces or special characters.
                address:
                  type: string
                  description: Full formatted address string.
                floor:
                  type: string
                  description: Floor number.
                apartment:
                  type: string
                  description: Apartment or unit number.
                geo:
                  type: object
                  description: Geographic coordinates.
                  properties:
                    lat:
                      type: number
                      description: Latitude.
                    lon:
                      type: number
                      description: Longitude.
      description: Reservation create or update request object
      title: ReservationCreateRequest
    FraudAnalysisRequest:
      properties:
        sessionToken:
          type: string
        productToken:
          type: string
        email:
          type: string
          format: email
        phoneNumber:
          type: string
        phoneCountry:
          type: string
        ipAddress:
          type: string
        billingCountry:
          type: string
        billingZip:
          type: string
      description: Start fraud analysis
      title: FraudAnalysisRequest
    FraudAnalysisResponse:
      properties:
        score:
          type: number
        status:
          type: string
          enum:
            - pass
            - review
            - decline
        cacheKey:
          type: string
      description: Fraud response object
      title: FraudAnalysisResponse
    VerifyEmailResponse:
      properties:
        status:
          type: string
        result:
          type: object
          properties:
            isEduEmail:
              type: boolean
              description: Whether the email is a university or school email
            emailDomainEducation:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the school or university
                countryName:
                  type: string
                  description: The name of the country
                countryCode:
                  type: string
                  description: The code of the country
                domains:
                  type: array
                  items:
                    type: string
                    description: The domain of the school or university
                urls:
                  type: array
                  items:
                    type: string
                    description: The URL of the school or university
      description: Verification response object
      title: VerifyEmailResponse
    VerifyPhoneResponse:
      properties:
        countryCode:
          type: string
        phoneNumber:
          type: string
        nationalFormat:
          type: string
        error:
          type: string
      description: Verification response object
      title: VerifyPhoneResponse
    LookupPhoneResponse:
      properties:
        countryCode:
          type: string
        phoneNumber:
          type: string
        nationalFormat:
          type: string
        error:
          type: string
        carrier:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
      description: Phone lookup response object
      title: LookupPhoneResponse
    LookupSocialRequest:
      properties:
        email:
          type: string
          format: email
        phoneNumber:
          type: string
      description: Request body for social lookup
      title: LookupSocialRequest
    LookupSocialResponse:
      properties:
        phoneNumber:
          type: object
          properties:
            accountDetails:
              type: object
              properties:
                facebook:
                  type: object
                  properties:
                    registered:
                      type: boolean
                google:
                  type: object
                  properties:
                    registered:
                      type: boolean
        email:
          type: object
      description: Social accounts search response object
      title: LookupSocialResponse
    LookupBreachesResponse:
      type: array
      items:
        type: object
        properties:
          Name:
            type: string
          Domain:
            type: string
          BreachDate:
            type: string
      description: Breached online accounts response object
      title: LookupBreachesResponse
    LookupWhoisResponse:
      type: array
      items:
        type: object
        properties:
          server:
            type: string
          data:
            type: object
            properties:
              domainName:
                type: string
              registrar:
                type: string
              creationDate:
                type: string
              expirationDate:
                type: string
      description: Whois response object
      title: LookupWhoisResponse
    LookupDomainCompanyResponse:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
          country:
            type: string
          industry:
            type: string
          size:
            type: string
          linkedin_url:
            type: string
          founded:
            type: string
      description: Whois response object
      title: LookupDomainCompanyResponse
    LookupGeoipResponse:
      type: array
      items:
        type: object
        properties:
          country_code:
            type: string
          country_name:
            type: string
          city:
            type: string
          postal_code:
            type: string
          time_zone_name:
            type: string
          latitude:
            type: number
          longitude:
            type: number
      description: GeoIP response object
      title: LookupGeoipResponse
    LookupSexOffenderResponse:
      properties:
        from:
          type: number
        size:
          type: number
        total:
          type: number
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              fname:
                type: string
              lname:
                type: string
              city:
                type: string
              county:
                type: string
              state:
                type: string
              zip:
                type: string
              dob:
                type: string
                format: date
              timestamp:
                type: string
                format: date-time
              imageURL:
                type: string
                format: uri
              charge:
                type: array
                items:
                  type: string
              aliases:
                type: array
                items:
                  type: string
      description: Sex Offender response object
      title: LookupSexOffenderResponse
    LookupWatchlistResponse:
      properties:
        from:
          type: number
        size:
          type: number
        total:
          type: number
        items:
          type: array
          items:
            type: object
            properties:
              info:
                type: string
              full_name:
                type: string
              first_name:
                type: string
              last_name:
                type: string
              middle_name:
                type: string
              description:
                type: string
              yob:
                type: array
                items:
                  type: number
              dob:
                type: array
                items:
                  type: string
              aliases:
                type: array
                items:
                  type: string
      description: Global Watchlist response object
      title: LookupWatchlistResponse
    LookupWatchlistSourcesResponse:
      properties:
        sources:
          type: array
          items:
            type: string
      description: Global Watchlist sources response object
      title: LookupWatchlistSourcesResponse
    LookupEvictionsResponse:
      properties:
        from:
          type: number
        size:
          type: number
        total:
          type: number
        items:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              source_url:
                type: uri
              eviction_address:
                type: string
              eviction_zip:
                type: string
              eviction_date:
                type: date
              case_number:
                type: string
              location:
                type: object
                properties:
                  geo:
                    type: object
                    properties:
                      lat:
                        type: number
                      lon:
                        type: number
                  street:
                    type: string
                  unit:
                    type: string
                  city:
                    type: string
                  state_name:
                    type: string
                  country_name:
                    type: string
                  postal_code:
                    type: string
      description: Tenant Evictions response object
      title: LookupEvictionsResponse
    LookupEvictionsSourcesResponse:
      properties:
        sources:
          type: array
          items:
            type: string
      description: Tenant Evictions sources response object
      title: LookupEvictionsSourcesResponse
    LookupAddressResponse:
      properties:
        address:
          type: string
        street:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        country_code:
          type: string
        zipcode:
          type: string
        timezone:
          type: string
        geo:
          type: object
          properties:
            lat:
              type: number
            lon:
              type: number
      description: Address response object
      title: LookupAddressResponse
    LookupIPThreatsResponse:
      type: array
      items:
        type: object
        properties:
          ip:
            type: string
          title:
            type: string
          link:
            type: string
          timestamp:
            type: string
          source:
            type: string
          tags:
            type: array
            items:
              type: string
          reasons:
            type: array
            items:
              type: string
      description: IP Threats response object
      title: LookupIPThreatsResponse
    AccountDetailsResponse:
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        is_active:
          type: boolean
        is_suspended:
          type: boolean
        last_login:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        company:
          type: object
          properties:
            name:
              type: string
            email:
              type: string
              format: email
            phone:
              type: string
        billing:
          type: object
          properties:
            parent_account:
              type: string
      description: User account details response object
      title: AccountDetailsResponse
    AccountSignupLinkResponse:
      properties:
        url:
          type: string
          format: uri
        expiry:
          type: string
          format: date-time
      description: Account signup link object
      title: AccountSignupLinkResponse
    AccountRegistrationRequest:
      properties:
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        password:
          type: string
        company:
          type: object
          properties:
            name:
              type: string
            email:
              type: string
              format: email
            phone:
              type: string
      description: New user account object
      title: AccountRegistrationRequest
    AccountChildrenResponse:
      properties:
        from:
          type: number
        size:
          type: number
        total:
          type: number
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
      description: A list of user account objects
      title: AccountChildrenResponse
    AccountApiKeysResponse:
      type: array
      items:
        type: object
        properties:
          user_id:
            type: string
            description: The user ID of the API key owner
          user_name:
            type: string
            description: The user name of the API key owner
          value:
            type: string
            description: The API key secret
          description:
            type: string
            description: User-controlled description of the API key
          sdk:
            type: boolean
            description: Whether this is an SDK API key
      description: A list of API key objects for all children accounts
      title: AccountApiKeysResponse
    AccountApiKeyResponse:
      properties:
        id:
          type: string
          description: The API key ID
        name:
          type: string
          description: The API key name
        description:
          type: string
          description: User-controlled description of the API key
        value:
          type: string
          description: The API key secret
        enabled:
          type: boolean
          description: Whether the API key is enabled
        created_at:
          type: string
          format: date-time
          description: The date and time the API key was created
        updated_at:
          type: string
          format: date-time
          description: The date and time the API key was last updated
        sdk:
          type: boolean
          description: Whether this is an SDK API key
      description: API key object
      title: AccountApiKeyResponse
    AccountApiKeyCreateRequest:
      properties:
        description:
          type: string
          description: Description for the API key
        sdk:
          type: boolean
          description: Whether this is an SDK API key
          default: false
      description: API key creation request
      title: AccountApiKeyCreateRequest
    AccountApiKeyUpdateRequest:
      required:
        - description
      properties:
        description:
          type: string
          description: New description for the API key
      description: API key update request
      title: AccountApiKeyUpdateRequest
    AccountApiKeyDeleteResponse:
      properties:
        message:
          type: string
      description: API key deletion success response
      title: AccountApiKeyDeleteResponse
    ReservationPaymentsResponse:
      properties:
        security_deposit:
          type: object
          properties:
            successful_authorizations:
              type: array
              items:
                type: object
                properties:
                  currency:
                    type: string
                  amount:
                    type: number
                  receipt_url:
                    type: string
                  card_brand:
                    type: string
                  timestamp:
                    type: string
            charge_failures:
              type: array
              items:
                type: object
                properties:
                  message:
                    type: string
                  timestamp:
                    type: string
            refunds:
              type: array
              items:
                type: object
                properties:
                  currency:
                    type: string
                  amount:
                    type: number
                  receipt_url:
                    type: string
                  timestamp:
                    type: string
            deposit_captures:
              type: array
              items:
                type: object
                properties:
                  currency:
                    type: string
                  amount:
                    type: number
                  receipt_url:
                    type: string
                  card_brand:
                    type: string
                  timestamp:
                    type: string
        payment_validation:
          type: object
          properties:
            receipt_url:
              type: string
            name_on_card:
              type: string
            funding_type:
              type: string
            card_brand:
              type: string
            card_country:
              type: string
            status:
              type: string
            errors:
              type: array
              items:
                type: object
                properties:
                  title:
                    type: string
                  description:
                    type: string
        damage_waiver:
          type: object
          properties:
            amount:
              type: number
            currency:
              type: string
            timestamp:
              type: string
            receipt_url:
              type: string
        extra_services:
          type: object
          properties:
            amount:
              type: number
            receipt_url:
              type: string
            products:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  price:
                    type: number
      description: Payment details collected on Guest Portal for a reservation
      title: ReservationPaymentsResponse
    ListingPropertyTypesResponse:
      type: array
      items:
        type: string
      description: Listing property types
      title: ListingPropertyTypesResponse
    AccountWebhooksRequest:
      properties:
        webhook_url:
          type: string
          format: uri
        webhook_key:
          type: string
          enum:
            - guest_portal_webhook_url
            - screening_webhook_url
            - stargate_webhook_url
            - reservation_webhook_url
            - listing_webhook_url
            - account_webhook_url
      description: Webhook create or remove request
      title: AccountWebhooksRequest
    AccountWebhooksResponse:
      properties:
        message:
          type: string
      description: Success response when a webhook was created or removed
      title: AccountWebhooksResponse
    ReservationStargateResponse:
      type: array
      items:
        type: object
        properties:
          email:
            type: string
            format: email
          phone:
            type: string
          tag:
            type: string
          method:
            type: string
          via:
            type: string
          sendAfter:
            type: string
            format: date-time
          created:
            type: string
            format: date-time
          updated:
            type: string
            format: date-time
          reservation_id:
            type: string
          listing_id:
            type: string
          confirmation_code:
            type: string
          message:
            type: object
            properties:
              subject:
                type: string
              text:
                type: string
              html:
                type: string
      description: List of Stargate messages for a reservation
      title: ReservationStargateResponse
    PaymentEventRequest:
      required:
        - reservation_id
        - event_id
        - event_source
        - event_type
        - event_status
      properties:
        reservation_id:
          type: string
          description: Autohost reservation ID
        event_source:
          type: string
          description: Payment processor
          enum:
            - adyen
            - stripe
            - other
        event_id:
          type: string
          description: Unique event ID from payment processor
        event_type:
          type: string
          description: Type of the event
          enum:
            - authorization
            - charge
            - refund
            - dispute
            - chargeback
        event_status:
          type: string
          description: Status of the event
          enum:
            - info
            - warning
            - success
            - failure
        customer_id:
          type: string
          description: Unique customer ID from payment processor or your system
        processor_status_code:
          type: string
          description: Status code from the payment processor
        processor_message:
          type: string
          description: Message from the payment processor
        network_status_code:
          type: string
          description: Network status code
          enum:
            - approved_by_network
            - declined_by_network
            - not_sent_to_network
            - reversed_after_approval
        three_d_secure:
          type: string
          description: 3D Secure status (if applicable)
          enum:
            - attempt_acknowledged
            - authenticated
            - exempted
            - failed
            - not_supported
            - processing_error
        amount:
          type: number
          description: Amount in major currency units (e.g. 1.25)
          minimum: 0
        currency:
          type: string
          description: ISO 4217 currency code (e.g. usd)
          minLength: 3
          maxLength: 3
        charge_descriptor:
          description: Short description of the charge
          type: string
        name_on_card:
          type: string
          description: Name on the card
        payment_method:
          type: string
          description: Payment method
          enum:
            - card
            - ach
        card_type:
          type: string
          description: Card type (credit, debit, prepaid)
          enum:
            - credit
            - debit
            - prepaid
        card_provider:
          type: string
          description: Issuer of the card
          enum:
            - visa
            - mastercard
            - amex
            - discover
            - jcb
            - diners
            - maestro
            - unionpay
            - other
        card_country:
          type: string
          description: >-
            The country where the card was issued in ISO 3166-1 alpha-2 format
            (e.g. US)
          minLength: 2
          maxLength: 2
        card_iin:
          type: string
          description: Issuer Identification Number
          minLength: 4
          maxLength: 6
        card_last4:
          type: string
          description: Last 4 digits of the card number
          minLength: 4
          maxLength: 4
        card_expiry_month:
          type: string
          minLength: 2
          maxLength: 2
          description: Expiry month of the card
        card_expiry_year:
          type: string
          description: Expiry year of the card
          minLength: 4
          maxLength: 4
        card_fingerprint:
          type: string
          description: Unique card fingerprint provided by payment processor (if available)
        card_cvc_check:
          type: string
          description: Card security code check
          enum:
            - pass
            - fail
            - unavailable
        card_postal_code_check:
          type: string
          description: Card postal code check
          enum:
            - pass
            - fail
            - unavailable
        card_line1_check:
          type: string
          description: Card address line 1 check
          enum:
            - pass
            - fail
            - unavailable
        billing_country_code:
          type: string
          description: Country code of the billing address in ISO 3166-1 alpha-2 format
          minLength: 2
          maxLength: 2
        billing_address:
          type: string
          description: Billing street address
        billing_city:
          type: string
          description: Billing city
        billing_state_code:
          type: string
          description: Billing state code in ISO 3166-2 format
        billing_postal_code:
          type: string
          description: Billing postal code
        billing_phone:
          type: string
          description: Billing phone number in E.164 format (e.g. +15555555555)
        billing_email:
          type: string
          format: email
          description: Billing email address
        billing_name:
          type: string
          description: Billing name
        ip_address:
          type: string
          description: IP address of the customer
          format: ipv4
        user_agent:
          type: string
          description: User agent of the customer
        timestamp:
          type: string
          format: date-time
          description: >-
            Timestamp of the event in ISO 8601 format (e.g.
            2022-05-22T18:06:20.352Z)
      description: >-
        This is the Payment Event object. NEVER include card numbers in this
        object.
      title: PaymentEventRequest
    PaymentEventResponse:
      properties:
        message:
          type: string
      description: Success response when submitting a payment event
      title: PaymentEventResponse
    AdverseMediaSearchResponse:
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - NO_RESULTS
            - REVIEW
            - FINISHED
        startDate:
          type: string
          format: date-time
      description: Adverse media search response
      title: AdverseMediaSearchResponse
    AdverseMediaReportResponse:
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - NO_RESULTS
            - REVIEW
            - FINISHED
        riskCategories:
          type: array
          items:
            type: string
        findings:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              snippet:
                type: string
              summary:
                type: string
              displayLink:
                type: string
              link:
                type: string
                format: uri
              image:
                type: string
                format: uri
              riskCategories:
                type: array
                items:
                  type: string
        startDate:
          type: string
          format: date-time
        stopDate:
          type: string
          format: date-time
      description: Adverse media report
      title: AdverseMediaReportResponse
    BackgroundCheckSubmitRequest:
      type: object
      required:
        - first_name
        - last_name
        - country
        - email
        - date_of_birth
      properties:
        first_name:
          type: string
          description: First name
        last_name:
          type: string
          description: Last name
        middle_name:
          type: string
          description: Middle name (optional)
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code
          maxLength: 2
          minLength: 2
        state:
          type: string
          description: ISO 3166-2 state code (e.g. US-NY)
          minLength: 2
        city:
          type: string
          description: City
        street:
          type: string
          description: Street address
        gender:
          type: string
          description: Gender type (optional)
          enum:
            - M
            - F
            - X
        phone:
          type: string
          description: E.164 phone number (e.g. +15555555555)
        email:
          type: string
          format: email
          description: Email address
        year_of_birth:
          type: integer
          description: Year of birth (e.g. 1990)
          minimum: 1900
          maximum: 2100
        date_of_birth:
          type: string
          description: ISO 8601 date (e.g. 1990-01-01)
          format: date
        reservation_id:
          type: string
          description: >-
            Autohost reservation ID for additional context (recommended if
            available)
      description: Background check submit request object
      title: BackgroundCheckSubmitRequest
    BackgroundCheckSubmitResponse:
      properties:
        id:
          type: string
          description: Background check report ID
        status:
          type: string
          description: Background check report status
          enum:
            - PENDING
            - REVIEW
            - FINISHED
            - FAILED
        start_date:
          type: string
          format: date-time
          description: Background check report start date
        type:
          type: string
          description: Background check report type
          enum:
            - globalcheck
      description: Background check submit response
      title: BackgroundCheckSubmitResponse
    BackgroundCheckResultsResponse:
      properties:
        id:
          type: string
          description: Background check report ID
        status:
          type: string
          description: Background check report status
          enum:
            - PENDING
            - REVIEW
            - FINISHED
            - FAILED
        risk_status:
          type: string
          description: Background check risk status
          enum:
            - CLEARED
            - REVIEW
        type:
          type: string
          description: Background check report type
          enum:
            - globalcheck
        start_date:
          type: string
          format: date-time
          description: Date when the background check was started
        stop_date:
          type: string
          format: date-time
          description: Date when the background check was finished
        pdf:
          type: string
          format: uri
          description: URL to the PDF report
        report_items:
          type: array
          description: List of report sections
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the report section
              status:
                type: string
                enum:
                  - FINISHED
                  - FAILED
                  - PENDING
                  - NO_RESULTS
              items:
                type: array
                description: List of report section items
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Name of the report item
                    subtitle:
                      type: string
                      description: Subtitle of the report item
                    description:
                      type: string
                      description: Description of the report item
                    tags:
                      type: array
                      description: List of tags
                      items:
                        type: string
                        description: Tag
                    image:
                      type: string
                      format: uri
                      description: URL to an image
                    images:
                      type: array
                      description: List of images
                      items:
                        type: string
                        format: uri
                        description: URL to an image
                    link:
                      type: string
                      format: uri
                      description: URL for more information
      description: Background check results response
      title: BackgroundCheckResultsResponse
    AccountSettingsRequest:
      properties:
        config_key:
          type: string
          description: Configuration key
          enum:
            - guest_portal_screens_for_repeat_guests
            - guest_portal_screens_by_source
        config_data:
          type: array
          description: Configuration data for each source
          items:
            - type: object
              properties:
                source:
                  type: string
                  description: Source name
                guest_portal_screens:
                  type: object
                  description: Guest portal screens configuration
                  properties:
                    AboutYou:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    AuthorityReporting:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    BuildingScreen:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    BackgroundCheck:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    CreditCheck:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    IDVerification:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    IDCollection:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    SecurityDeposit:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    UsageAgreement:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    Coronavirus:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    CustomScreen:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    FileUpload:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    GuestList:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    HouseRules:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    LongTerm:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    PurposeOfStay:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    TimeInfoEdit:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    SexOffendersAddon:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    SocialVerificationAddon:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    SanctionsSearchAddon:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    FraudDetectionAddon:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
                    AdverseMediaSearchAddon:
                      type: string
                      enum:
                        - disabled
                        - required
                        - inherit
      description: User account settings request object
      title: AccountSettingsRequest
    AccountSettingsResponse:
      properties:
        config_key:
          type: string
          description: Configuration key
          enum:
            - guest_portal_screens_for_repeat_guests
            - guest_portal_screens_by_source
        config_data:
          type: object
          description: Configuration data
      description: User account settings response object
      title: AccountSettingsResponse
    UsageAgreementSettingsRequest:
      type: object
      properties:
        user:
          type: object
          description: User-level agreement template
          properties:
            format:
              type: string
              description: Content format
              enum:
                - html
                - markdown
            content:
              type: string
              description: Template content (minimum 10 characters)
              minLength: 10
        sources:
          type: array
          description: Source-specific templates (upserted by name)
          items:
            type: object
            properties:
              name:
                type: string
                description: Source name (e.g. airbnb, vrbo) — used as the upsert key
              format:
                type: string
                enum:
                  - html
                  - markdown
              content:
                type: string
                description: Template content (minimum 10 characters)
                minLength: 10
            required:
              - name
              - content
        reservations:
          type: array
          description: Reservation-level template overrides
          items:
            type: object
            properties:
              id:
                type: string
                description: Reservation ID
              format:
                type: string
                enum:
                  - html
                  - markdown
              content:
                type: string
                description: Template content (minimum 10 characters)
                minLength: 10
            required:
              - id
              - content
        listings:
          type: array
          description: Listing-level template overrides
          items:
            type: object
            properties:
              id:
                type: string
                description: Listing ID
              format:
                type: string
                enum:
                  - html
                  - markdown
              content:
                type: string
                description: Template content (minimum 10 characters)
                minLength: 10
            required:
              - id
              - content
      description: >-
        Request body for updating usage agreement template settings. All
        top-level fields are optional — only provided fields are upserted.
      title: UsageAgreementSettingsRequest
    UsageAgreementSettingsResponse:
      type: object
      properties:
        user:
          type: object
          description: User-level agreement template
          properties:
            id:
              type: string
              description: User ID
            format:
              type: string
              enum:
                - html
                - markdown
            content:
              type: string
              description: Template content
        sources:
          type: array
          description: Source-specific templates
          items:
            type: object
            properties:
              name:
                type: string
                description: Source name
              format:
                type: string
                enum:
                  - html
                  - markdown
              content:
                type: string
                description: Template content
        reservations:
          type: array
          description: Reservation-level template overrides (at most one element)
          items:
            type: object
            properties:
              id:
                type: string
                description: Reservation ID
              format:
                type: string
                enum:
                  - html
                  - markdown
              content:
                type: string
                description: Template content
        listings:
          type: array
          description: Listing-level template overrides (at most one element)
          items:
            type: object
            properties:
              id:
                type: string
                description: Listing ID
              format:
                type: string
                enum:
                  - html
                  - markdown
              content:
                type: string
                description: Template content
      description: Resolved usage agreement template settings in modern format
      title: UsageAgreementSettingsResponse
    ReservationReportResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: >-
            Pre-signed URL to download the report PDF. Expires after a short
            time window.
      required:
        - url
      description: >-
        Response containing a pre-signed download URL for a reservation report
        (e.g. signed usage agreement PDF).
      title: ReservationReportResponse
    ReservationFeatures:
      type: object
      properties:
        lead_time_days:
          type: number
          description: Days between booking and check-in
          minimum: -365
          maximum: 730
          default: 0
        nights:
          type: number
          description: Length of stay in nights
          minimum: 0
          maximum: 365
          default: 1
        guests_count:
          type: number
          description: Number of guests
          minimum: 0
          maximum: 50
          default: 1
        booking_hour:
          type: number
          description: Hour of day booking was made (0-23)
          minimum: 0
          maximum: 23
          default: 12
        is_weekend_booking:
          type: number
          description: 1 if booked on weekend, 0 otherwise
          minimum: 0
          maximum: 1
          default: 0
        price_total:
          type: number
          description: Total booking price
          minimum: 0
          default: 0
        has_phone:
          type: number
          description: 1 if phone number provided
          minimum: 0
          maximum: 1
          default: 0
        name_word_count:
          type: number
          description: Words in guest name
          minimum: 0
          maximum: 20
          default: 2
        risk_color_numeric:
          type: number
          description: Risk color (0=green, 1=yellow, 2=orange, 3=red, 4=black)
          minimum: 0
          maximum: 4
          default: 0
        stripe_fraud_numeric:
          type: number
          description: Stripe fraud level (0-2)
          minimum: 0
          maximum: 2
          default: 0
        blacklist_count:
          type: number
          description: Blacklist match count
          minimum: 0
          default: 0
        verification_status_numeric:
          type: number
          description: Verification status (0-2)
          minimum: 0
          maximum: 2
          default: 0
        stripe_decline_count:
          type: number
          description: Prior Stripe declines
          minimum: 0
          default: 0
        idv_attempt_count:
          type: number
          description: ID verification attempts
          minimum: 0
          default: 0
        idv_success_count:
          type: number
          description: Successful ID verification attempts
          minimum: 0
          default: 0
        idv_failure_count:
          type: number
          description: Failed ID verification attempts
          minimum: 0
          default: 0
        idv_success_ratio:
          type: number
          description: ID verification success rate
          minimum: 0
          maximum: 1
          default: 0
        blurred_front_count:
          type: number
          description: Blurred front ID scans
          minimum: 0
          default: 0
        blurred_back_count:
          type: number
          description: Blurred back ID scans
          minimum: 0
          default: 0
        payment_event_count:
          type: number
          description: Total payment events
          minimum: 0
          default: 0
        payment_success_count:
          type: number
          description: Successful payments
          minimum: 0
          default: 0
        payment_failure_count:
          type: number
          description: Failed payments
          minimum: 0
          default: 0
        payment_failure_ratio:
          type: number
          description: Payment failure rate
          minimum: 0
          maximum: 1
          default: 0
        distinct_cards:
          type: number
          description: Distinct cards used
          minimum: 0
          default: 0
        has_chargeback:
          type: number
          description: 1 if has chargeback
          minimum: 0
          maximum: 1
          default: 0
        has_dispute:
          type: number
          description: 1 if has dispute
          minimum: 0
          maximum: 1
          default: 0
        has_refund:
          type: number
          description: 1 if has refund
          minimum: 0
          maximum: 1
          default: 0
        has_stolen_card_flag:
          type: number
          description: 1 if stolen card detected
          minimum: 0
          maximum: 1
          default: 0
        has_fraudulent_flag:
          type: number
          description: 1 if fraudulent flag
          minimum: 0
          maximum: 1
          default: 0
        has_lost_card_flag:
          type: number
          description: 1 if lost card detected
          minimum: 0
          maximum: 1
          default: 0
        has_highest_risk_flag:
          type: number
          description: 1 if highest risk
          minimum: 0
          maximum: 1
          default: 0
        has_blocklist_flag:
          type: number
          description: 1 if on blocklist
          minimum: 0
          maximum: 1
          default: 0
        insufficient_funds_count:
          type: number
          description: Insufficient funds events
          minimum: 0
          default: 0
        do_not_honor_count:
          type: number
          description: Do not honor events
          minimum: 0
          default: 0
        fingerprint_count:
          type: number
          description: Total fingerprints
          minimum: 0
          default: 0
        distinct_fingerprints:
          type: number
          description: Distinct fingerprints
          minimum: 0
          default: 0
        distinct_ips:
          type: number
          description: Distinct IP addresses
          minimum: 0
          default: 0
        has_stripe_fp:
          type: number
          description: Has Stripe fingerprint
          minimum: 0
          maximum: 1
          default: 0
        has_fpjspro_fp:
          type: number
          description: Has FPJSPro fingerprint
          minimum: 0
          maximum: 1
          default: 0
        has_default_fp:
          type: number
          description: Has default fingerprint
          minimum: 0
          maximum: 1
          default: 0
        prior_res_same_email_30d:
          type: number
          description: Prior bookings same email (30 days)
          minimum: 0
          default: 0
        prior_res_same_email_90d:
          type: number
          description: Prior bookings same email (90 days)
          minimum: 0
          default: 0
        distinct_listings_90d:
          type: number
          description: Distinct listings booked (90 days)
          minimum: 0
          default: 0
        has_booking_data:
          type: number
          description: Has booking data
          minimum: 0
          maximum: 1
          default: 1
        has_idv_data:
          type: number
          description: Has ID verification data
          minimum: 0
          maximum: 1
          default: 0
        has_payment_data:
          type: number
          description: Has payment data
          minimum: 0
          maximum: 1
          default: 0
        has_fingerprint_data:
          type: number
          description: Has fingerprint data
          minimum: 0
          maximum: 1
          default: 0
        has_velocity_data:
          type: number
          description: Has velocity data
          minimum: 0
          maximum: 1
          default: 0
        email_domain_freq:
          type: number
          description: Email domain frequency encoding
          minimum: 0
          default: 0
        booking_source_freq:
          type: number
          description: Booking source frequency encoding
          minimum: 0
          default: 0
        first_idv_status_freq:
          type: number
          description: First IDV status encoding
          minimum: 0
          default: 0
        last_idv_status_freq:
          type: number
          description: Last IDV status encoding
          minimum: 0
          default: 0
        first_recognition_status_STAGE_VALID:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        first_recognition_status_UNCERTAIN:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        first_recognition_status_VALID:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        first_recognition_status_unknown:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        last_recognition_status_STAGE_VALID:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        last_recognition_status_UNCERTAIN:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        last_recognition_status_VALID:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        last_recognition_status_unknown:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        earliest_fp_engine_fpjspro:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        earliest_fp_engine_guesty:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        earliest_fp_engine_stripe:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        earliest_fp_engine_unknown:
          type: number
          minimum: 0
          maximum: 1
          default: 0
        price_per_night:
          type: number
          description: Price per night
          minimum: 0
          default: 0
        has_idv_failure:
          type: number
          description: Has IDV failure
          minimum: 0
          maximum: 1
          default: 0
        payment_risk_score:
          type: number
          description: Composite payment risk score
          minimum: 0
          default: 0
        high_velocity_flag:
          type: number
          description: High booking velocity
          minimum: 0
          maximum: 1
          default: 0
        multiple_cards_flag:
          type: number
          description: Multiple cards used
          minimum: 0
          maximum: 1
          default: 0
      description: >-
        Input features for fraud prediction. All fields are optional with
        sensible defaults. The model performs best when more features are
        provided.
      title: ReservationFeatures
    RiskTier:
      type: string
      enum:
        - auto_approve
        - review
        - flag
      description: Risk classification tier
      title: RiskTier
    ThresholdConfig:
      type: object
      properties:
        auto_approve_max:
          type: number
          description: Maximum score for auto-approve tier
          default: 0.13
        review_min:
          type: number
          description: Minimum score for review tier
          default: 0.13
        flag_min:
          type: number
          description: Minimum score for flag tier
          default: 0.325
      description: Risk tier threshold configuration
      title: ThresholdConfig
    PredictionResult:
      type: object
      required:
        - fraud_probability
        - risk_tier
        - action
        - threshold_info
      properties:
        fraud_probability:
          type: number
          description: Probability of fraud (0.0 to 1.0)
          minimum: 0
          maximum: 1
        risk_tier:
          type: string
          description: Risk classification tier
          enum:
            - auto_approve
            - review
            - flag
        action:
          type: string
          description: Recommended action based on risk tier
        threshold_info:
          type: object
          description: Threshold configuration used for classification
          properties:
            auto_approve_max:
              type: number
              default: 0.13
            review_min:
              type: number
              default: 0.13
            flag_min:
              type: number
              default: 0.325
      description: Output of fraud prediction
      title: PredictionResult
    ValidationErrorDetail:
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          type: array
          description: Location of the error
          items:
            type: string
        msg:
          type: string
          description: Error message
        type:
          type: string
          description: Error type
      description: Detail of a validation error
      title: ValidationErrorDetail
    ValidationErrorResponse:
      type: object
      required:
        - details
      properties:
        error:
          type: string
          description: Error type
          default: Invalid input
        details:
          type: array
          description: Validation error details
          items:
            type: object
            properties:
              loc:
                type: array
                items:
                  type: string
              msg:
                type: string
              type:
                type: string
      description: Response for validation errors (400)
      title: ValidationErrorResponse
    GuestLoyaltyFeatures:
      type: object
      properties:
        booking_month:
          type: number
          description: Month of booking (1-12)
          minimum: 1
          maximum: 12
          default: 6
        booking_dow:
          type: number
          description: Day of week for booking (0=Mon, 6=Sun)
          minimum: 0
          maximum: 6
          default: 3
        booking_hour:
          type: number
          description: Hour of day booking was made (0-23)
          minimum: 0
          maximum: 23
          default: 12
        checkin_dow:
          type: number
          description: Day of week for check-in (0=Mon, 6=Sun)
          minimum: 0
          maximum: 6
          default: 4
        checkin_month:
          type: number
          description: Month of check-in (1-12)
          minimum: 1
          maximum: 12
          default: 6
        email_domain_rank:
          type: number
          description: Email domain frequency rank (lower = more common)
          minimum: 0
          default: 0
        risk_color_encoded:
          type: number
          description: Risk color encoding (0=green, 1=yellow, 2=orange, 3=red, 4=black)
          minimum: 0
          maximum: 4
          default: 0
        city_rank:
          type: number
          description: City frequency rank (lower = more common)
          minimum: 0
          default: 0
        lead_time_days:
          type: number
          description: Days between booking and check-in
          minimum: -365
          maximum: 730
          default: 14
        nights:
          type: number
          description: Length of stay in nights
          minimum: 0
          maximum: 365
          default: 2
        total_price:
          type: number
          description: Total booking price in USD
          minimum: 0
          default: 300
        average_daily_rate:
          type: number
          description: Average price per night
          minimum: 0
          default: 150
        number_of_guests:
          type: number
          description: Number of guests
          minimum: 0
          maximum: 50
          default: 2
        price_tier:
          type: number
          description: Price tier category (0-5, higher = more expensive)
          minimum: 0
          maximum: 5
          default: 2
        revenue_per_guest_night:
          type: number
          description: Revenue per guest per night
          minimum: 0
          default: 75
        bedrooms:
          type: number
          description: Number of bedrooms in listing
          minimum: 0
          maximum: 20
          default: 1
        guest_density:
          type: number
          description: Guests per bedroom
          minimum: 0
          default: 2
        prior_bookings_30d:
          type: number
          description: Prior bookings by this guest in last 30 days
          minimum: 0
          default: 0
        prior_bookings_90d:
          type: number
          description: Prior bookings by this guest in last 90 days
          minimum: 0
          default: 0
        prior_bookings_365d:
          type: number
          description: Prior bookings by this guest in last 365 days
          minimum: 0
          default: 0
        prior_revenue_total:
          type: number
          description: Total revenue from prior bookings
          minimum: 0
          default: 0
        prior_bookings_same_pm:
          type: number
          description: Prior bookings with the same property manager
          minimum: 0
          default: 0
        days_since_last_booking:
          type: number
          description: Days since guest's last booking (0 if first booking)
          minimum: 0
          default: 0
        booking_intensity:
          type: number
          description: Booking frequency score
          minimum: 0
          default: 0
        max_guests:
          type: number
          description: Maximum guests allowed at listing
          minimum: 0
          maximum: 50
          default: 4
        capacity_utilization:
          type: number
          description: Ratio of guests to max capacity
          minimum: 0
          maximum: 1
          default: 0.5
        payment_success_count:
          type: number
          description: Successful payment count
          minimum: 0
          default: 0
        payment_failure_count:
          type: number
          description: Failed payment count
          minimum: 0
          default: 0
        distinct_cards:
          type: number
          description: Number of distinct payment cards used
          minimum: 0
          default: 0
        payment_success_ratio:
          type: number
          description: Ratio of successful to total payment attempts
          minimum: 0
          maximum: 1
          default: 0
        idv_attempt_count:
          type: number
          description: ID verification attempt count
          minimum: 0
          default: 0
        idv_success_count:
          type: number
          description: Successful ID verification count
          minimum: 0
          default: 0
        idv_success_ratio:
          type: number
          description: ID verification success rate
          minimum: 0
          maximum: 1
          default: 0
        portal_started:
          type: number
          description: Guest portal started count
          minimum: 0
          default: 0
        portal_completed:
          type: number
          description: Guest portal completed count
          minimum: 0
          default: 0
        screens_count:
          type: number
          description: Number of portal screens viewed
          minimum: 0
          default: 0
        total_activity_events:
          type: number
          description: Total activity log events
          minimum: 0
          default: 0
        portal_completion_rate:
          type: number
          description: Portal completion rate
          minimum: 0
          maximum: 1
          default: 0
        distinct_fingerprints:
          type: number
          description: Number of distinct device fingerprints
          minimum: 0
          default: 0
        distinct_ips:
          type: number
          description: Number of distinct IP addresses
          minimum: 0
          default: 0
        total_fingerprint_events:
          type: number
          description: Total fingerprint events
          minimum: 0
          default: 0
        avg_confidence:
          type: number
          description: Average fingerprint confidence score
          minimum: 0
          maximum: 1
          default: 0
        incident_count:
          type: number
          description: Total incident count for guest
          minimum: 0
          default: 0
        is_direct_booking:
          type: number
          description: 1 if direct booking, 0 otherwise
          minimum: 0
          maximum: 1
          default: 0
        is_ota_booking:
          type: number
          description: 1 if OTA booking (Airbnb, VRBO, etc.)
          minimum: 0
          maximum: 1
          default: 0
        is_free_email:
          type: number
          description: 1 if using free email provider (gmail, yahoo, etc.)
          minimum: 0
          maximum: 1
          default: 0
        is_booking_guest:
          type: number
          description: 1 if guest made the booking themselves
          minimum: 0
          maximum: 1
          default: 1
        is_long_stay:
          type: number
          description: 1 if stay is 7+ nights
          minimum: 0
          maximum: 1
          default: 0
        has_prior_booking:
          type: number
          description: 1 if guest has prior bookings
          minimum: 0
          maximum: 1
          default: 0
        has_idv_enabled:
          type: number
          description: 1 if ID verification was enabled for this booking
          minimum: 0
          maximum: 1
          default: 0
        has_payment_data:
          type: number
          description: 1 if payment data available
          minimum: 0
          maximum: 1
          default: 0
        has_payment_issues:
          type: number
          description: 1 if any payment issues occurred
          minimum: 0
          maximum: 1
          default: 0
        has_idv_data:
          type: number
          description: 1 if ID verification data available
          minimum: 0
          maximum: 1
          default: 0
        idv_completed:
          type: number
          description: 1 if ID verification was completed
          minimum: 0
          maximum: 1
          default: 0
        has_payment_failure:
          type: number
          description: 1 if any payment failures
          minimum: 0
          maximum: 1
          default: 0
        has_activity_data:
          type: number
          description: 1 if activity log data available
          minimum: 0
          maximum: 1
          default: 0
        has_multiple_devices:
          type: number
          description: 1 if multiple devices detected
          minimum: 0
          maximum: 1
          default: 0
        has_fingerprint_data:
          type: number
          description: 1 if fingerprint data available
          minimum: 0
          maximum: 1
          default: 0
        has_chargeback_incident:
          type: number
          description: 1 if guest has chargeback history
          minimum: 0
          maximum: 1
          default: 0
        has_fraud_warning:
          type: number
          description: 1 if fraud warning on record
          minimum: 0
          maximum: 1
          default: 0
        has_creditcard_incident:
          type: number
          description: 1 if credit card incident on record
          minimum: 0
          maximum: 1
          default: 0
        has_any_incident:
          type: number
          description: 1 if any incident on record
          minimum: 0
          maximum: 1
          default: 0
        is_verified:
          type: number
          description: 1 if guest identity is verified
          minimum: 0
          maximum: 1
          default: 0
        guestportal_completed_flag:
          type: number
          description: 1 if guest portal was completed
          minimum: 0
          maximum: 1
          default: 0
      description: >-
        Input features for guest loyalty prediction. All fields are optional
        with sensible defaults. The model performs best when more features are
        provided.
      title: GuestLoyaltyFeatures
    LoyaltyTier:
      type: string
      enum:
        - high_loyalty
        - medium_loyalty
        - low_loyalty
      description: Loyalty classification tiers based on rebooking probability
      title: LoyaltyTier
    GLVTier:
      type: string
      enum:
        - high_value
        - medium_value
        - low_value
      description: Guest Lifetime Value classification tiers
      title: GLVTier
    LoyaltyThresholdConfig:
      type: object
      properties:
        rebooking_high_min:
          type: number
          description: Minimum score for high loyalty tier
          default: 70
        rebooking_medium_min:
          type: number
          description: Minimum score for medium loyalty tier
          default: 40
        glv_high_min:
          type: number
          description: Minimum GLV (USD) for high value tier
          default: 2000
        glv_medium_min:
          type: number
          description: Minimum GLV (USD) for medium value tier
          default: 500
      description: Threshold configuration for loyalty tier classification
      title: LoyaltyThresholdConfig
    LoyaltyPredictionResult:
      type: object
      required:
        - rebooking_score
        - rebooking_tier
        - rebooking_tier_description
        - predicted_glv
        - glv_tier
        - glv_tier_description
        - threshold_info
      properties:
        rebooking_score:
          type: number
          description: Rebooking probability score (0-100)
          minimum: 0
          maximum: 100
        rebooking_tier:
          type: string
          description: Loyalty classification tier
          enum:
            - high_loyalty
            - medium_loyalty
            - low_loyalty
        rebooking_tier_description:
          type: string
          description: Description of the loyalty tier
        predicted_glv:
          type: number
          description: Predicted Guest Lifetime Value in USD
          minimum: 0
        glv_tier:
          type: string
          description: GLV classification tier
          enum:
            - high_value
            - medium_value
            - low_value
        glv_tier_description:
          type: string
          description: Description of the GLV tier
        threshold_info:
          type: object
          description: Threshold configuration used for classification
          properties:
            rebooking_high_min:
              type: number
              default: 70
            rebooking_medium_min:
              type: number
              default: 40
            glv_high_min:
              type: number
              default: 2000
            glv_medium_min:
              type: number
              default: 500
      description: Output of guest loyalty prediction
      title: LoyaltyPredictionResult
    RFMSegment:
      type: string
      enum:
        - Champions
        - High Value Active
        - High Value At Risk
        - High Value Slipping
        - Loyal Active
        - Loyal At Risk
        - Potential Loyalists
        - Repeat At Risk
        - Promising First-Timers
        - Recent First-Timers
        - First-Timers Need Attention
        - Hibernating
        - Other
      description: RFM segment classifications (13 segments)
      title: RFMSegment
    SegmentPriority:
      type: string
      enum:
        - CRITICAL
        - HIGH
        - MEDIUM
        - LOW
      description: Action priority levels
      title: SegmentPriority
    IDConfidence:
      type: string
      enum:
        - HIGH
        - MEDIUM
        - LOW
        - UNKNOWN
      description: Guest identification confidence
      title: IDConfidence
    RFMSegmentResult:
      type: object
      required:
        - guest_id
        - timestamp
        - segment
        - rfm_scores
        - metrics
        - data_quality
        - top_factors
        - flags
      properties:
        guest_id:
          type: string
        timestamp:
          type: string
        segment:
          type: object
          description: Segment classification with actionable guidance
          required:
            - name
            - tier
            - description
            - recommended_action
            - offer_type
            - priority
          properties:
            name:
              type: string
              description: Segment name
              enum:
                - Champions
                - High Value Active
                - High Value At Risk
                - High Value Slipping
                - Loyal Active
                - Loyal At Risk
                - Potential Loyalists
                - Repeat At Risk
                - Promising First-Timers
                - Recent First-Timers
                - First-Timers Need Attention
                - Hibernating
                - Other
            tier:
              type: number
              description: Priority tier (1=highest)
              minimum: 1
              maximum: 3
            description:
              type: string
            recommended_action:
              type: string
            offer_type:
              type: string
            priority:
              type: string
              enum:
                - CRITICAL
                - HIGH
                - MEDIUM
                - LOW
        rfm_scores:
          type: object
          description: RFM score breakdown
          required:
            - recency
            - frequency
            - monetary
            - composite
          properties:
            recency:
              type: number
              minimum: 1
              maximum: 5
            frequency:
              type: number
              minimum: 2
              maximum: 5
            monetary:
              type: number
              minimum: 1
              maximum: 5
            composite:
              type: string
              description: Combined RFM score (e.g. '554')
        metrics:
          type: object
          description: Guest behavioral metrics
          required:
            - days_since_last_stay
            - last_stay_date
            - first_stay_date
            - total_stays
            - total_revenue
            - total_nights
            - avg_booking_value
            - nights_equivalent
            - customer_tenure_days
          properties:
            days_since_last_stay:
              type: number
            last_stay_date:
              type: string
            first_stay_date:
              type: string
            total_stays:
              type: number
            total_revenue:
              type: number
            total_nights:
              type: number
            avg_booking_value:
              type: number
            nights_equivalent:
              type: number
            customer_tenure_days:
              type: number
        data_quality:
          type: object
          description: Data quality indicators
          required:
            - confidence
            - has_email
            - has_phone
            - is_ota_masked
            - identifier_type
          properties:
            confidence:
              type: string
              enum:
                - HIGH
                - MEDIUM
                - LOW
                - UNKNOWN
            has_email:
              type: boolean
            has_phone:
              type: boolean
            is_ota_masked:
              type: boolean
            identifier_type:
              type: string
              description: '''email'' or ''phone'''
        top_factors:
          type: array
          description: Explanation factors for segment assignment
          items:
            type: object
            required:
              - factor
              - value
              - impact
              - description
            properties:
              factor:
                type: string
              value:
                type: string
              impact:
                type: string
                description: '''positive'' or ''negative'''
              description:
                type: string
        flags:
          type: object
          description: Guest classification flags
          properties:
            is_corporate_account:
              type: boolean
              default: false
            is_ota_guest:
              type: boolean
            has_future_booking:
              type: boolean
              default: false
            is_seasonal_guest:
              type: boolean
              default: false
      description: Complete RFM segmentation response
      title: RFMSegmentResult
    RFMBatchRequest:
      type: object
      required:
        - guest_ids
      properties:
        guest_ids:
          type: array
          description: Max 100 guest IDs per request
          items:
            type: string
      description: Batch lookup request for RFM segments
      title: RFMBatchRequest
    RFMBatchResult:
      type: object
      required:
        - results
        - not_found
        - total_requested
        - total_found
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              guest_id:
                type: string
              timestamp:
                type: string
              segment:
                type: object
              rfm_scores:
                type: object
              metrics:
                type: object
              data_quality:
                type: object
              top_factors:
                type: array
              flags:
                type: object
        not_found:
          type: array
          items:
            type: string
        total_requested:
          type: number
        total_found:
          type: number
      description: Batch lookup response for RFM segments
      title: RFMBatchResult
    RFMNotFoundError:
      type: object
      required:
        - message
        - suggestions
      properties:
        error:
          type: string
          default: GUEST_NOT_FOUND
        message:
          type: string
        suggestions:
          type: array
          items:
            type: string
      description: Error response for guest not found in RFM data
      title: RFMNotFoundError
  securitySchemes:
    x-api-key:
      name: x-api-key
      type: apiKey
      in: header
info:
  title: Autohost API
  description: |
    Private API for Autohost customers.

    [Contact Sales](https://www.autohost.ai/talk-to-us) to open an account.
  version: '1'
servers:
  - url: https://data.autohost.ai/v1
paths:
  /accounts/me:
    get:
      operationId: accounts-me
      summary: My account
      description: >-
        Return current user account information. This is often used to validate
        authentication.
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A user object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/children:
    get:
      operationId: accounts-children
      summary: Reseller accounts list
      description: Paginated list of user accounts belonging to a reseller profile.
      parameters:
        - name: from
          in: query
          description: Pagination control
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: size
          in: query
          description: Number of items to return
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A list of account objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountChildrenResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/keys:
    get:
      operationId: accounts-keys
      summary: Reseller API keys
      description: List of API keys for all accounts owned by a reseller.
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A list of API keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountApiKeysResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: accounts-keys
      summary: Create new API key
      description: Create a new API key for the authenticated user.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountApiKeyCreateRequest'
            examples:
              minimal:
                value:
                  description: My API Key
                  sdk: false
              sdk-key:
                value:
                  description: My SDK Key
                  sdk: true
        description: API key creation request
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Created API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountApiKeyResponse'
        '403':
          description: Only channel accounts can create keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/keys/{key}:
    post:
      operationId: accounts-keys
      summary: Update API key
      description: Update an existing API key's description.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountApiKeyUpdateRequest'
            examples:
              update:
                value:
                  description: Updated API Key Description
        description: API key update request
      parameters:
        - name: key
          in: path
          description: The API key ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Updated API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountApiKeyResponse'
        '403':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: accounts-keys
      summary: Delete API key
      description: Delete an existing API key.
      parameters:
        - name: key
          in: path
          description: The API key ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deletion success message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountApiKeyDeleteResponse'
              examples:
                success:
                  value:
                    message: Key removed
        '403':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/register:
    post:
      operationId: accounts-register
      summary: Reseller new account
      description: >-
        Register a new account under a channel profile. This is used by
        resellers and channel partners to create Autohost user accounts.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountRegistrationRequest'
        description: JSON object with user account details
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A user object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/{id}:
    put:
      operationId: accounts-update
      summary: Reseller update account
      description: >-
        Update a channel account. This is used by resellers and channel partners
        to update Autohost user accounts.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountRegistrationRequest'
        description: JSON object with user account details
      parameters:
        - name: id
          in: path
          description: Autohost user ID
          required: true
          schema:
            type: string
        - name: suspended
          in: query
          description: Suspend or unsuspend the account
          required: false
          allowEmptyValue: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: status
          in: query
          description: Enable or disable the account
          required: false
          allowEmptyValue: false
          schema:
            type: string
            enum:
              - active
              - disabled
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: User account object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/signup:
    post:
      operationId: accounts-signup
      summary: Reseller signup link
      description: >-
        Generate a self-signup link for a given PMS. This is used by resellers
        and channel partners to create registration links they can send to their
        customers.
      parameters:
        - name: pms
          in: query
          description: PMS integration name
          required: true
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: redirect
          in: query
          description: URL to redirect to after signup
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: hidepw
          in: query
          description: Hide password screen during user signup
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A signup object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSignupLinkResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/webhooks:
    post:
      operationId: accounts-webhooks-create
      summary: Account create webhook
      description: >-
        Register a new webhook. This is used by platforms such as Zapier to
        register webhooks.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountWebhooksRequest'
        description: JSON object with webhook details
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Webhooks object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountWebhooksResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: accounts-webhooks-delete
      summary: Account remove webhook
      description: >-
        Delete an existing webhook. This is used by platforms such as Zapier to
        unregister webhooks.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountWebhooksRequest'
        description: JSON object with webhook details
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Webhooks object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountWebhooksResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/{id}/settings/guest-portal-screens:
    put:
      operationId: accounts-settings-gpscreens-update
      summary: Update Guest Portal screen settings for an account
      description: >-
        Update your own account settings, or update another user's account Guest
        Portal screen settings if you have the necessary permissions.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountSettingsRequest'
            examples:
              preconfirmed-guests:
                value:
                  config_key: guest_portal_screens_for_repeat_guests
                  config_data:
                    - source: MINT
                      guest_portal_screens:
                        AboutYou: required
                        AuthorityReporting: disabled
                        FraudDetectionAddon: disabled
                        AdverseMediaSearchAddon: disabled
              screens-by-source:
                value:
                  config_key: guest_portal_screens_by_source
                  config_data:
                    - source: Airbnb
                      guest_portal_screens:
                        BackgroundCheck: disabled
                        CreditCheck: disabled
                        IDVerification: disabled
        description: JSON object with account settings
      parameters:
        - name: id
          in: path
          description: Autohost user ID (optional — defaults to the authenticated user)
          required: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Settings object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSettingsResponse'
              examples:
                guest_portal_screens_for_repeat_guests:
                  value:
                    config_key: guest_portal_screens_for_repeat_guests
                    config_data:
                      - source: MINT
                        guest_portal_screens:
                          AboutYou: required
                          PurposeOfStay: disabled
                          TimeInfoEdit: disabled
                guest_portal_screens_by_source:
                  value:
                    config_key: guest_portal_screens_by_source
                    config_data:
                      - source: Airbnb
                        guest_portal_screens:
                          BackgroundCheck: disabled
                          CreditCheck: disabled
                          IDVerification: disabled
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/{id}/settings/guest-portal-screens/{key}:
    get:
      operationId: accounts-settings-gpscreens-update
      summary: Retrieve account settings
      description: >-
        Fetch your own account settings, or another user's account settings if
        you have the necessary permissions.
      parameters:
        - name: id
          in: path
          description: Autohost user ID (optional — defaults to the authenticated user)
          required: false
          schema:
            type: string
        - name: key
          in: path
          description: Setting key
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Settings object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSettingsResponse'
              examples:
                guest_portal_screens_for_repeat_guests:
                  value:
                    config_key: guest_portal_screens_for_repeat_guests
                    config_data:
                      - source: MINT
                        guest_portal_screens:
                          AboutYou: required
                          PurposeOfStay: disabled
                          TimeInfoEdit: disabled
                guest_portal_screens_by_source:
                  value:
                    config_key: guest_portal_screens_by_source
                    config_data:
                      - source: Airbnb
                        guest_portal_screens:
                          BackgroundCheck: disabled
                          CreditCheck: disabled
                          IDVerification: disabled
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /accounts/{id}/settings/usage-agreement:
    get:
      operationId: accounts-settings-usage-agreement
      summary: Retrieve usage agreement template settings
      description: >-
        Fetch resolved usage agreement template settings for your account, with
        optional reservation or listing overrides. Channel accounts may fetch
        settings for child accounts by passing the target user ID in the path.
      parameters:
        - name: id
          in: path
          description: Autohost user ID (optional — defaults to the authenticated user)
          required: false
          schema:
            type: string
        - name: reservationId
          in: query
          description: Resolve the reservation-level template override for this reservation
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: listingId
          in: query
          description: Resolve the listing-level template override for this listing
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Usage agreement template settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageAgreementSettingsResponse'
              examples:
                full-response:
                  value:
                    user:
                      id: user-123
                      format: html
                      content: >-
                        <p>By checking in, you agree to our house rules and
                        policies.</p>
                    sources:
                      - name: airbnb
                        format: html
                        content: <p>Airbnb-specific usage agreement terms.</p>
                    reservations:
                      - id: res-456
                        format: html
                        content: <p>Custom agreement for this reservation.</p>
                    listings:
                      - id: list-789
                        format: html
                        content: >-
                          <p>Beachfront property agreement with pool access
                          rules.</p>
                user-only:
                  value:
                    user:
                      id: user-123
                      format: html
                      content: <p>Standard agreement for all guests.</p>
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden — not authorized to access this user's settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: accounts-settings-usage-agreement
      summary: Update usage agreement template settings
      description: >-
        Save (merge) usage agreement template settings for your account. All
        top-level fields are optional — only provided fields are upserted.
        Channel accounts may update settings for child accounts by passing the
        target user ID in the path.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsageAgreementSettingsRequest'
            examples:
              user-template-only:
                value:
                  user:
                    format: html
                    content: >-
                      <p>By checking in, you agree to our house rules and
                      policies.</p>
              with-listing-override:
                value:
                  user:
                    format: html
                    content: <p>Standard agreement template for all properties.</p>
                  listings:
                    - id: list-789
                      format: html
                      content: >-
                        <p>Special agreement for our beachfront property with
                        pool access rules.</p>
        description: Partial usage agreement settings to upsert
      parameters:
        - name: id
          in: path
          description: Autohost user ID (optional — defaults to the authenticated user)
          required: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Updated usage agreement settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageAgreementSettingsResponse'
              examples:
                full-response:
                  value:
                    user:
                      id: user-123
                      format: html
                      content: >-
                        <p>By checking in, you agree to our house rules and
                        policies.</p>
                    sources:
                      - name: airbnb
                        format: html
                        content: <p>Airbnb-specific usage agreement terms.</p>
                    reservations:
                      - id: res-456
                        format: html
                        content: <p>Custom agreement for this reservation.</p>
                    listings:
                      - id: list-789
                        format: html
                        content: >-
                          <p>Beachfront property agreement with pool access
                          rules.</p>
                user-only:
                  value:
                    user:
                      id: user-123
                      format: html
                      content: <p>Standard agreement for all guests.</p>
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden — not authorized to update this user's settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /background-check/submit:
    post:
      operationId: background-check-submit
      summary: Background Check - Submit
      description: Start a background check
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BackgroundCheckSubmitRequest'
            examples:
              example:
                value:
                  first_name: John
                  last_name: Doe
                  middle_name: Smith
                  country: US
                  state: CA
                  city: Los Angeles
                  email: user@example.com
                  phone: '+14155555555'
                  date_of_birth: '1985-12-31'
        description: JSON object with candidate details
      parameters:
        - name: type
          in: query
          description: Background check type (default is `globalcheck`)
          required: false
          allowEmptyValue: false
          schema:
            type: string
            enum:
              - globalcheck
              - usa_criminal
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A analysis object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackgroundCheckSubmitResponse'
              examples:
                example:
                  value:
                    id: >-
                      98efb578c68591e90f8a05d0d52224a7c70df4fbd3faabc92bb011ab28ac5e7d
                    start_date: '2023-07-30T18:25:56.536Z'
                    status: PENDING
                    type: globalcheck
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /background-check/results/{id}:
    get:
      operationId: background-check-results
      summary: Background Check - Results
      description: Get background check results
      parameters:
        - name: id
          in: path
          description: Background check report ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A verification status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackgroundCheckResultsResponse'
              examples:
                example:
                  value:
                    id: >-
                      98efb578c68591e90f8a05d0d52224a7c70df4fbd3faabc92bb011ab28ac5e7d
                    start_date: '2023-07-30T18:25:56.536Z'
                    stop_date: '2023-07-30T18:29:56.536Z'
                    status: FINISHED
                    risk_status: CLEARED
                    type: globalcheck
                    pdf: https://www.example.com/report.pdf
                    report_items:
                      - name: Social Accounts
                        status: FINISHED
                        items:
                          - title: Found 10 registered accounts
                            description: >-
                              List of registered accounts:\n- Apple\n-
                              Booking\n- Facebook\n- Github\n- Google\n-
                              Instagram\n- Spotify\n- Telegram\n- Whatsapp\n-
                              Yahoo
                            tags:
                              - social
                      - name: Phone Verification
                        status: FINISHED
                        items:
                          - title: Phone number is valid
                            subtitle: 054-000-0000
                            description: >-
                              - Country: Israel\n- Carrier: HOT Telecom\n- Line
                              Type: mobile
                            tags:
                              - phone
                      - name: Avatars
                        status: FINISHED
                        items:
                          - title: Found 7 profile pictures
                            subtitle: Review to see if any of these are the same person
                            images:
                              - https://www.example.com/avatar1.jpg
                              - https://www.example.com/avatar2.jpg
                            tags:
                              - avatar
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /global-watchlist/search:
    get:
      operationId: global-watchlist-search
      summary: Global Watchlist search
      description: >-
        Search entities in the Global Watchlist list by name, date of birth and
        aliases
      parameters:
        - name: image
          in: query
          description: >-
            Base64-encoded image for facial recognition (uploaded images are not
            stored)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: name
          in: query
          description: Full name or alias
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: dob
          in: query
          description: Date of birth (YYYY-MM-DD)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: yob
          in: query
          description: Year of birth (YYYY)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: country_code
          in: query
          description: Country code (e.g. US)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: sources
          in: query
          description: 'Comma-separated list of sources to search (default: all)'
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: source_country_code
          in: query
          description: Limit results to specific watchlists from a country (e.g. US)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: from
          in: query
          description: 'Pagination start (default: 0)'
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupWatchlistResponse'
              examples:
                Simple:
                  value:
                    dob:
                      - '1961-04-25'
                    yob:
                      - 1961
                    full_name: maria soledad iparraguirre guenechea
                    first_name: maria
                    last_name: iparraguirre guenechea
                    middle_name: soledad
                    description: Member ETA.
                    aliases:
                      - maria soledad iparraguirre guenechea
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /global-watchlist/sources:
    get:
      operationId: global-watchlist-sources
      summary: Global Watchlist sources
      description: Retrieve a list of sources available in the Global Watchlist
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupWatchlistSourcesResponse'
              examples:
                Simple:
                  value:
                    sources:
                      - OFAC
                      - INTERPOL
                      - UN-NOTICE-RED
                      - ...
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /idcheck/upload/{id}/{step}/{type}:
    post:
      operationId: idcheck-upload
      summary: ID verification upload
      description: Upload base64-encoded photo for analysis and verification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IDCheckUploadRequest'
            examples:
              dataurl:
                value:
                  imageBase64: data:image/jpeg;base64,<base64-encoded image>
              base64:
                value:
                  imageBase64: <base64-encoded image>
        description: JSON object with DataURL or base64-encoded image
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: step
          in: path
          description: Document side (front, back, selfie)
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: Document type (drivers, passport, id)
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A analysis object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IDCheckUploadResponse'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /idcheck/status/{id}:
    get:
      operationId: idcheck-status
      summary: ID verification status
      description: Get verification results for photos that you uploaded
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A verification status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IDCheckStatusResponse'
              examples:
                success:
                  value:
                    status: passed
                failure:
                  value:
                    status: review
                    errors:
                      - Name on document does not match reservation details
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /idcheck/image/{id}/{step}:
    get:
      operationId: idcheck-image
      summary: ID verification image
      description: Get uploaded image for identification document on a reservation
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: step
          in: path
          description: Document side (front, back, selfie)
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Identification document image encoded using Base64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IDCheckImageResponse'
              examples:
                DataURL:
                  value:
                    base64Image: data:image/jpeg;base64,<base64-encoded image>
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /listings/{id}:
    get:
      operationId: listings-detail
      summary: Listing details
      description: Get details object for a given listing.
      parameters:
        - name: id
          in: path
          description: Autohost listing ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will perform a lookup
            using the PMS listing ID or the identifier supplied in `my_id`
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A listing object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: listings-update
      summary: Listing update
      description: Update a given listing in your account.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListingCreateRequest'
            examples:
              minimal:
                value:
                  my_id: UNIT100
                  status: ACTIVE
                  name: Beautiful Downtown View for Two
                  location:
                    street: 100 King West
                    city: Toronto
                    country: Canada
                    state: 'ON'
                    zipcode: M5K 2A1
                    geo:
                      lat: 43.6486
                      lon: -79.3826
              full:
                value:
                  my_id: INTERNAL1234
                  status: ACTIVE
                  name: Beautiful Downtown View for Two
                  nickname: DT PH 100
                  property_type: Condominium
                  accommodates: 2
                  bedrooms: 1
                  bathrooms: 1
                  beds: 1
                  check_in_time: 15
                  check_out_time: 10
                  location:
                    street: 100 King West
                    city: Toronto
                    country: Canada
                    state: 'ON'
                    zipcode: M5K 2A1
                    timezone: America/Toronto
                    building: GROUP123
                    geo:
                      lat: 43.6486
                      lon: -79.3826
                  pictures:
                    large_url: https://www.example.com/large.jpg
                    regular_url: https://www.example.com/regular.jpg
                    thumbnail_url: https://www.example.com/thumbnail.jpg
        description: JSON object with listing details
      parameters:
        - name: id
          in: path
          description: Autohost listing ID
          required: true
          schema:
            type: string
        - name: callback
          in: query
          description: Webhook URL to POST the list object.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamCallback'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A listing object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /listings:
    get:
      operationId: listings-search
      summary: Listing search
      description: Return paginated list of listings matching the search criteria.
      parameters:
        - name: status
          in: query
          description: Listing status
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamListingStatus'
        - name: search
          in: query
          description: String search
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: building
          in: query
          description: Building name
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A list of listing objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingSearchResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: listings-create
      summary: Listing create
      description: Create a new listing in your account.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListingCreateRequest'
            examples:
              minimal:
                value:
                  my_id: UNIT100
                  status: ACTIVE
                  name: Beautiful Downtown View for Two
                  location:
                    street: 100 King West
                    city: Toronto
                    country: Canada
                    state: 'ON'
                    zipcode: M5K 2A1
                    geo:
                      lat: 43.6486
                      lon: -79.3826
              full:
                value:
                  my_id: INTERNAL1234
                  status: ACTIVE
                  name: Beautiful Downtown View for Two
                  nickname: DT PH 100
                  property_type: Condominium
                  accommodates: 2
                  bedrooms: 1
                  bathrooms: 1
                  beds: 1
                  check_in_time: 15
                  check_out_time: 10
                  location:
                    street: 100 King West
                    city: Toronto
                    country: Canada
                    state: 'ON'
                    zipcode: M5K 2A1
                    timezone: America/Toronto
                    building: GROUP123
                    geo:
                      lat: 43.6486
                      lon: -79.3826
                  pictures:
                    large_url: https://www.example.com/large.jpg
                    regular_url: https://www.example.com/regular.jpg
                    thumbnail_url: https://www.example.com/thumbnail.jpg
        description: JSON object with listing details
      parameters:
        - name: callback
          in: query
          description: Webhook URL to POST the list object.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamCallback'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A listing object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /listings/propertyTypes:
    get:
      operationId: listings-propertyTypes
      summary: Listing property types
      description: >-
        Return a static list of supported property types. This list is used to
        populate the `property_type` field when creating a new listing object.
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A list of listing objects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingPropertyTypesResponse'
              examples:
                Full:
                  value:
                    - Apartment
                    - Cottage
                    - Condominium
                    - House
                    - Hotel
                    - Boat
                    - Camper/RV
                    - Other
  /listings/{id}/superhog:
    post:
      operationId: listings-superhog
      summary: Listing manage SuperHog connection
      description: Connect or disconnect your listings from SuperHog.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListingSuperhogRequest'
            examples:
              connect:
                value:
                  action: connect
              disconnect:
                value:
                  action: disconnect
        description: JSON object with listing details
      parameters:
        - name: id
          in: path
          description: Autohost listing ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Listing SuperHog connect or disconnect response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingSuperhogResponse'
              examples:
                connected:
                  value:
                    autohost_id: xyxyxyxyxyxyx
                    superhog_id: abcd1234
                disconnected:
                  value:
                    autohost_id: xyxyxyxyxyxyx
                    superhog_id: null
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /loyalty/guest-loyalty:
    post:
      operationId: predict-guest-loyalty
      summary: Predict guest loyalty for a reservation
      description: >-
        Predict guest rebooking probability and lifetime value for short-term
        rentals. Returns rebooking probability score (0-100) with loyalty tier,
        and predicted Guest Lifetime Value (USD) with value tier.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestLoyaltyFeatures'
            examples:
              minimal:
                value:
                  lead_time_days: 7
                  nights: 3
                  number_of_guests: 2
                  total_price: 450
              with_history:
                value:
                  lead_time_days: 7
                  nights: 3
                  number_of_guests: 2
                  total_price: 450
                  average_daily_rate: 150
                  prior_bookings_90d: 1
                  prior_bookings_365d: 2
                  prior_revenue_total: 800
                  prior_bookings_same_pm: 1
                  days_since_last_booking: 90
                  has_prior_booking: 1
                  is_verified: 1
                  guestportal_completed_flag: 1
        description: Guest loyalty features for prediction
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful loyalty prediction with rebooking score and GLV
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoyaltyPredictionResult'
              examples:
                high_loyalty:
                  value:
                    rebooking_score: 75.5
                    rebooking_tier: high_loyalty
                    rebooking_tier_description: Top prospects for re-engagement
                    predicted_glv: 2500
                    glv_tier: high_value
                    glv_tier_description: VIP treatment candidates
                    threshold_info:
                      rebooking_high_min: 70
                      rebooking_medium_min: 40
                      glv_high_min: 2000
                      glv_medium_min: 500
                low_loyalty:
                  value:
                    rebooking_score: 20.3
                    rebooking_tier: low_loyalty
                    rebooking_tier_description: Unlikely to rebook
                    predicted_glv: 150
                    glv_tier: low_value
                    glv_tier_description: Standard service
                    threshold_info:
                      rebooking_high_min: 70
                      rebooking_medium_min: 40
                      glv_high_min: 2000
                      glv_medium_min: 500
        '400':
          description: Invalid input - validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
              examples:
                validation_error:
                  value:
                    error: Invalid input
                    details:
                      - loc:
                          - nights
                        msg: Input should be greater than or equal to 0
                        type: greater_than_equal
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /loyalty/guest-segmentation:
    post:
      operationId: predict-guest-segmentation
      summary: Look up RFM segments for multiple guests (batch)
      description: >-
        Look up RFM segments for multiple guests (max 100). Returns found
        results and list of not-found guest IDs.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RFMBatchRequest'
            examples:
              batch:
                value:
                  guest_ids:
                    - guest1@example.com
                    - guest2@example.com
                    - '+15555555555'
        description: Batch lookup request with guest IDs
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Batch segmentation results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFMBatchResult'
              examples:
                batch_result:
                  value:
                    results:
                      - guest_id: guest1@example.com
                        timestamp: '2026-01-15T10:30:00Z'
                        segment:
                          name: Champions
                          tier: 1
                          priority: CRITICAL
                        rfm_scores:
                          recency: 5
                          frequency: 5
                          monetary: 4
                          composite: '554'
                        metrics:
                          total_stays: 8
                          total_revenue: 4200
                    not_found:
                      - guest2@example.com
                    total_requested: 2
                    total_found: 1
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /loyalty/guest-segmentation/{segment}:
    get:
      operationId: predict-guest-segmentation
      summary: Look up RFM segment for a guest
      description: >-
        Look up RFM segment for a guest. The segment path parameter accepts a
        guest ID (email address or phone number). Optionally filter by property
        manager.
      parameters:
        - name: segment
          in: path
          description: Guest ID (email address or phone number)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: RFM segmentation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFMSegmentResult'
              examples:
                champion:
                  value:
                    guest_id: guest@example.com
                    timestamp: '2026-01-15T10:30:00Z'
                    segment:
                      name: Champions
                      tier: 1
                      description: Best customers who book frequently and spend the most
                      recommended_action: Offer exclusive perks and early access
                      offer_type: VIP
                      priority: CRITICAL
                    rfm_scores:
                      recency: 5
                      frequency: 5
                      monetary: 4
                      composite: '554'
                    metrics:
                      days_since_last_stay: 15
                      last_stay_date: '2026-01-01'
                      first_stay_date: '2024-06-15'
                      total_stays: 8
                      total_revenue: 4200
                      total_nights: 24
                      avg_booking_value: 525
                      nights_equivalent: 3
                      customer_tenure_days: 549
                    data_quality:
                      confidence: HIGH
                      has_email: true
                      has_phone: true
                      is_ota_masked: false
                      identifier_type: email
                    top_factors:
                      - factor: total_stays
                        value: '8'
                        impact: positive
                        description: Frequent repeat guest
                      - factor: total_revenue
                        value: '4200'
                        impact: positive
                        description: High lifetime spending
                    flags:
                      is_corporate_account: false
                      is_ota_guest: false
                      has_future_booking: true
                      is_seasonal_guest: false
        '404':
          description: Guest not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RFMNotFoundError'
              examples:
                not_found:
                  value:
                    error: GUEST_NOT_FOUND
                    message: 'No RFM data found for guest: unknown@example.com'
                    suggestions:
                      - Verify the guest ID (email or phone) is correct
                      - Guest may not have enough booking history
                      - Try searching with a different identifier
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /reservations/{id}:
    get:
      operationId: reservations-detail
      summary: Reservation details
      description: Get reservation details object.
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: usepmsid
          in: query
          description: >-
            Assume `id` is the PMS reservation ID. Must be used with `pms`.
            (Default: false)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: reservations-update
      summary: Reservation update
      description: Update reservation object
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReservationCreateRequest'
            examples:
              Minimal:
                value:
                  guest:
                    first_name: John
                    last_name: Doe
              PMS:
                value:
                  status: INQUIRY
                  source: Airbnb
                  confirmation_code: X1BYGHDL
                  number_of_guests: 2
                  nights: 3
                  total_price: 459
                  listing_id: <Autohost Listing ID>
                  check_in_date: '2020-11-15T20:00:00.000Z'
                  check_out_date: '2020-11-16T16:00:00.000Z'
                  guest:
                    first_name: John
                    last_name: Doe
                    birth_date: YYYY-MM-DD
                    email: guest@example.com
                    phone: '+44857993444'
                    location: London, UK
              WithListing:
                value:
                  status: INQUIRY
                  source: Airbnb
                  confirmation_code: X1BYGHDL
                  number_of_guests: 2
                  nights: 3
                  total_price: 459
                  check_in_date: '2020-11-15T20:00:00.000Z'
                  check_out_date: '2020-11-16T16:00:00.000Z'
                  listing:
                    my_id: UNIQUE123
                    status: ACTIVE
                    name: Beautiful Downtown View for Two
                    nickname: DT PH 100
                    property_type: Condominium
                    accommodates: 2
                    bedrooms: 1
                    bathrooms: 1
                    beds: 1
                    check_in_time: 15
                    check_out_time: 10
                    location:
                      street: 100 King West
                      city: Toronto
                      country: Canada
                      state: 'ON'
                      zipcode: M6K 1Z7
                      timezone: America/Toronto
                  guest:
                    first_name: John
                    last_name: Doe
                    birth_date: '1985-05-20'
                    email: guest@example.com
                    phone: '+44857993444'
                    location: London, UK
              Full:
                value:
                  status: INQUIRY
                  source: Airbnb
                  confirmation_code: X1BYGHDL
                  number_of_guests: 2
                  nights: 3
                  total_price: 459
                  check_in_date: '2020-11-15T20:00:00.000Z'
                  check_out_date: '2020-11-16T16:00:00.000Z'
                  listing_id: <Autohost Listing ID>
                  guest:
                    first_name: John
                    last_name: Doe
                    birth_date: YYYY-MM-DD
                    email: guest@example.com
                    phone: '+44857993444'
                    location: London, UK
                    metadata:
                      ip_address: 1.1.1.1
                      user_agent: Android
                  guest_portal_screens:
                    BackgroundCheck: disabled
                    CreditCheck: required
        description: JSON object with reservation details
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: callback
          in: query
          description: >-
            Webhook URL to post data back to once Screening AI finished
            analyzing the reservation.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamCallback'
        - name: sync
          in: query
          description: >-
            Execution is asynchronous by default and the response, including
            reservation ID, will be returned via webhook when you supply the
            `callback` parameter. You can enable synchronous execution by
            setting `sync=1`, but it is discouraged when sending large amounts
            of requests.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamSync'
        - name: skip_gp
          in: query
          description: >-
            Verification analysis to proceed without dependence on Guest Portal
            completion. To be included for all reservations where the guest is
            not expected to complete the portal.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamSkipGP'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /reservations/{id}/summary:
    get:
      operationId: reservations-summary
      summary: Reservation summary
      description: Get reservation verifications summary and details
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationSummaryResponse'
              examples:
                example-1:
                  value:
                    guest_portal_status: COMPLETED
                    guest_portal_last_screen: IDCheck
                    verification_composite_status: review
                    verification_status: review
                    verification_status_reason: >-
                      ID Check, Fraud Detection and Business Rules require your
                      attention
                    risk_color: yellow
                    top_risks:
                      - >-
                        High risk potential for fraud detected. You should only
                        allow the guest to enter if you've spoken to the guest
                        over the phone and have met them in person
                      - >-
                        Some fraud signals detected. Make sure to treat it
                        carefully and manually review other information
                        collected
                      - >-
                        Guest location was detected to be within 50 KM (30
                        miles) of the listing
                      - Guest name does not match the name on the reservation
                      - >-
                        There are 1 reports for this user IP on Autohost Threat
                        Intelligence with the following tags: 'spam' and
                        'suspicious'
                    top_recommendations:
                      - >-
                        Proceed to confirm the accuracy of all reservation
                        details
                      - >-
                        Collect additional information about the guests, and the
                        trip, that may have been unclear or undisclosed
                      - >-
                        Make sure the guests receive and acknowledge the house
                        rules
                      - >-
                        For security purposes, make sure you have the guest's ID
                        for your records
                    loyalty_segments:
                      - guest_id: guest@example.com
                        timestamp: '2026-02-17T12:00:00Z'
                        segment:
                          name: Loyal Active
                          tier: 1
                          description: Frequent guest with consistent booking pattern
                          recommended_action: >-
                            Offer loyalty rewards and early access to new
                            listings
                          offer_type: loyalty_reward
                          priority: HIGH
                        rfm_scores:
                          recency: 5
                          frequency: 4
                          monetary: 4
                          composite: '544'
                        metrics:
                          days_since_last_stay: 22
                          last_stay_date: '2026-01-26'
                          first_stay_date: '2024-08-10'
                          total_stays: 6
                          total_revenue: 4200
                          total_nights: 18
                          avg_booking_value: 700
                          nights_equivalent: 3
                          customer_tenure_days: 556
                        data_quality:
                          confidence: HIGH
                          has_email: true
                          has_phone: true
                          is_ota_masked: false
                          identifier_type: email
                        top_factors:
                          - factor: total_stays
                            value: 6
                            impact: positive
                            description: Above-average repeat booking count
                          - factor: days_since_last_stay
                            value: 22
                            impact: positive
                            description: Recent activity indicates engaged guest
                        flags:
                          is_corporate_account: false
                          is_ota_guest: false
                          has_future_booking: false
                          is_seasonal_guest: false
                    details:
                      general_risk:
                        status: PASS
                        value: YELLOW
                      background_check:
                        status: DISABLED
                        value: ''
                      credit_check:
                        status: DISABLED
                        value: ''
                      blacklist:
                        status: INCOMPLETE
                        value: ''
                      payment_verification:
                        status: INCOMPLETE
                        value: ''
                      identification_document:
                        status: REVIEW
                        value: review
                        help: Guest name does not match the name on the reservation
                      fraud_detection:
                        status: REVIEW
                        value: REVIEW
                        findings:
                          - >-
                            Email address appears on breach reports and leaked
                            data dumps online. This could indicate other
                            malicious parties are using this account to
                            impersonate legitimate users.
                          - >-
                            Email address seems to belong to a disposable
                            provider. These providers are often used to create
                            fake accounts and bypass email validation.
                          - >-
                            The phone number does not seem to be registered at
                            all. Check for typos, otherwise this may be a bogus
                            number.
                        help: Manual review suggested
                      adverse_media:
                        status: REVIEW
                        value: REVIEW
                        findings:
                          - Fraud or Financial Crime
                          - Harassment
                          - Discrimination
                        help: Manual review suggested
                      social_verification:
                        status: PASS
                        value: 13 accounts found
                      sanctions:
                        status: INCOMPLETE
                        value: ''
                      house_rules:
                        status: INCOMPLETE
                    supervised_status: null
  /reservations/{id}/status:
    get:
      operationId: reservations-status
      summary: Reservation status
      description: Get reservation status and verification details
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationStatusResponse'
    post:
      operationId: reservations-status-update
      summary: Reservation status change
      description: Approve or decline a reservation manually
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReservationsVerificationChangeRequest'
            examples:
              minimal:
                value:
                  supervised: decline
              full:
                value:
                  supervised: approve
                  notes: >-
                    I called the guest and the confirmed the credit card belongs
                    to their parents
        description: JSON object with verification details
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationStatusResponse'
  /reservations/{id}/screens:
    get:
      operationId: reservations-screens
      summary: Reservation Guest Portal Screens
      description: Guest Portal screens configuration for a specific reservation.
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Guest Portal screens configuration object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationScreensResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /reservations/{id}/embed:
    get:
      operationId: reservations-embed-link
      summary: Reservation embed link
      description: >-
        Generate a temporary link to embed reservation details on your web page
        (DEPRECATED - Use SDK instead)
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation embed object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationEmbedLinkResponse'
              examples:
                success:
                  value:
                    url: https://exmpale.com/embed/34857439857439857349857
                    expires: '2021-09-05T16:18:39.808Z'
  /reservations/{id}/notes:
    get:
      operationId: reservations-notes
      summary: Reservation notes
      description: Get list of notes for a reservation
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationNotesResponse'
  /reservations/{id}/payments:
    get:
      operationId: reservations-payments
      summary: Reservation payments
      description: >-
        Payment details for a reservation. Includes Security Deposit, Damage
        Waiver and Payment Validation.
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationPaymentsResponse'
  /reservations/{id}/stargate:
    get:
      operationId: reservations-stargate
      summary: Reservation messages
      description: List of queued and sent Stargate messages for a given reservation.
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A list of Stargate messages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationStargateResponse'
        '404':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /reservations/{id}/guestportal:
    get:
      operationId: reservations-guestportal
      summary: Reservation Guest Portal
      description: Guest Portal details for a reservation
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: pms
          in: query
          description: >-
            PMS integration name. If supplied, the API will assume the path
            parameter `id` is a confirmation code.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamPMS'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationGuestPortalResponse'
  /reservations:
    get:
      operationId: reservations-search
      summary: Reservation search
      description: Return paginated list of reservations matching the search criteria.
      parameters:
        - name: from
          in: query
          description: Pagination control
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: size
          in: query
          description: Number of items to return
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: status
          in: query
          description: Reservation OTA status
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamReservationStatus'
        - name: search
          in: query
          description: String search
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: listings
          in: query
          description: Autohost listing ID. Use commas for multiple IDs.
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: guestportal_completed
          in: query
          description: Filter by Guest Portal completion status (true|false).
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: active
          in: query
          description: Filter by active reservations.
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: pending_review
          in: query
          description: Return reservations that require a manual review (true|false)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: emails
          in: query
          description: >-
            Search reservations by guest email. Use commas for multiple
            addresses.
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: source
          in: query
          description: Filter reservation by booking source name.
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: startDate
          in: query
          description: Filter reservation from the specified start date (YYYY-MM-DD).
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: endDate
          in: query
          description: Filter reservation from the specified end date (YYYY-MM-DD).
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: dateField
          in: query
          description: >-
            Check-in date is used by default, but it can be changed
            (check_in_date|check_out_date|created_at|updated_at).
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: reservations-create
      summary: Reservation creation
      description: Create new reservation object
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReservationCreateRequest'
            examples:
              Minimal:
                value:
                  guest:
                    first_name: John
                    last_name: Doe
              PMS:
                value:
                  status: INQUIRY
                  source: Airbnb
                  confirmation_code: X1BYGHDL
                  number_of_guests: 2
                  nights: 3
                  total_price: 459
                  listing_id: <Autohost Listing ID>
                  check_in_date: '2020-11-15T20:00:00.000Z'
                  check_out_date: '2020-11-16T16:00:00.000Z'
                  guest:
                    first_name: John
                    last_name: Doe
                    birth_date: YYYY-MM-DD
                    email: guest@example.com
                    phone: '+44857993444'
                    location: London, UK
              WithListing:
                value:
                  status: INQUIRY
                  source: Airbnb
                  confirmation_code: X1BYGHDL
                  number_of_guests: 2
                  nights: 3
                  total_price: 459
                  check_in_date: '2020-11-15T20:00:00.000Z'
                  check_out_date: '2020-11-16T16:00:00.000Z'
                  listing:
                    my_id: UNIQUE123
                    status: ACTIVE
                    name: Beautiful Downtown View for Two
                    nickname: DT PH 100
                    property_type: Condominium
                    accommodates: 2
                    bedrooms: 1
                    bathrooms: 1
                    beds: 1
                    check_in_time: 15
                    check_out_time: 10
                    location:
                      street: 100 King West
                      city: Toronto
                      country: Canada
                      state: 'ON'
                      zipcode: M6K 1Z7
                      timezone: America/Toronto
                  guest:
                    first_name: John
                    last_name: Doe
                    birth_date: '1985-05-20'
                    email: guest@example.com
                    phone: '+44857993444'
                    location: London, UK
              Full:
                value:
                  status: INQUIRY
                  source: Airbnb
                  confirmation_code: X1BYGHDL
                  number_of_guests: 2
                  nights: 3
                  total_price: 459
                  check_in_date: '2020-11-15T20:00:00.000Z'
                  check_out_date: '2020-11-16T16:00:00.000Z'
                  listing_id: <Autohost Listing ID>
                  guest:
                    first_name: John
                    last_name: Doe
                    birth_date: YYYY-MM-DD
                    email: guest@example.com
                    phone: '+44857993444'
                    location: London, UK
                    metadata:
                      ip_address: 1.1.1.1
                      user_agent: Android
                  guest_portal_screens:
                    BackgroundCheck: disabled
                    CreditCheck: required
        description: JSON object with reservation details
      parameters:
        - name: callback
          in: query
          description: >-
            Webhook URL to post data back to once Screening AI finished
            analyzing the reservation.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamCallback'
        - name: sync
          in: query
          description: >-
            Execution is asynchronous by default and the response, including
            reservation ID, will be returned via webhook when you supply the
            `callback` parameter. You can enable synchronous execution by
            setting `sync=1`, but it is discouraged when sending large amounts
            of requests.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamSync'
        - name: skip_gp
          in: query
          description: >-
            Verification analysis to proceed without dependence on Guest Portal
            completion. To be included for all reservations where the guest is
            not expected to complete the portal.
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamSkipGP'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A reservation object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationDetailsResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /reservations/{id}/payment-event:
    post:
      operationId: reservations-payment-event
      summary: Reservation payment event
      description: >
        Record a payment event belonging to a reservation for fraud analysis and
        business rules.


        The following parameters are optional, but highly recommended:

        - `card_country`

        - `card_provider`

        - `card_expiry_month`

        - `card_expiry_year`

        - `three_d_secure`

        - `billing_email`

        - `billing_phone`

        - `ip_address`


        If you are using Adyen, see this 

        [guide](https://docs.adyen.com/development-resources/webhooks/additional-settings/) 

        for more information on how to get the required parameters.


        Examples of how to map the webhook events from common providers:

        -
        [Adyen](https://gist.github.com/r0yfire/5eab419ab81296df2d8bced561881d79)

        -
        [Stripe](https://gist.github.com/r0yfire/2ce76b0236704a070eedfb4eb78d2095)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentEventRequest'
            examples:
              adyen-declined:
                value:
                  event_source: adyen
                  event_id: '123456789'
                  event_type: charge
                  event_status: failure
                  customer_id: '123456789'
                  processor_status_code: '111'
                  processor_message: Invalid BankCountryCode specified
                  network_status_code: declined_by_network
                  three_d_secure: exempted
                  amount: 101.5
                  currency: usd
                  charge_descriptor: PRE-AUTH Security Deposit
                  name_on_card: John Doe
                  payment_method: card
                  card_type: credit
                  card_provider: visa
                  card_iin: '41111'
                  card_last4: '1111'
                  card_expiry_month: '12'
                  card_expiry_year: '2025'
                  billing_country_code: US
                  billing_address: 123 Main St
                  billing_city: New York
                  billing_state_code: NY
                  billing_postal_code: '10001'
                  billing_phone: '+15555555555'
                  billing_email: user@example.com
                  billing_name: John Doe
                  ip_address: 8.8.8.8
                  user_agent: >-
                    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6)
                    AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
                    Safari/537.36
                  timestamp: '2022-05-22T18:06:20.352Z'
              stripe-declined:
                value:
                  event_source: stripe
                  event_id: '123456789'
                  event_type: charge
                  event_status: failure
                  customer_id: '123456789'
                  processor_status_code: outcome.type (e.g. issuer_declined)
                  processor_message: outcome.seller_message
                  network_status_code: outcome.network_status (e.g. declined_by_network)
                  three_d_secure: failed
                  amount: 101.5
                  currency: usd
                  charge_descriptor: Security Deposit
                  name_on_card: John Doe
                  payment_method: card
                  card_type: credit
                  card_provider: visa
                  card_iin: '41111'
                  card_last4: '1111'
                  card_expiry_month: '12'
                  card_expiry_year: '2025'
                  card_fingerprint: payment_method_details.card.fingerprint (e.g. 123456789)
                  card_cvc_check: fail
                  card_postal_code_check: unavailable
                  card_line1_check: unavailable
                  billing_country_code: US
                  billing_address: 123 Main St
                  billing_city: New York
                  billing_state_code: NY
                  billing_postal_code: 10001
                  billing_phone: 15555555555
                  billing_email: user@example.com
                  billing_name: John Doe
                  ip_address: 8.8.8.8
                  user_agent: >-
                    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6)
                    AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100
                    Safari/537.36
                  timestamp: '2022-05-22T18:06:20.352Z'
        description: JSON object with payment event details
      parameters:
        - name: id
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A success message object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentEventResponse'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /reservations/{reservationId}/reports/{reportType}:
    get:
      operationId: reservations-reports
      summary: Download a reservation report
      description: >-
        Download a report PDF for a specific reservation. Currently supports
        `usage-agreement` reports — returns a pre-signed URL to the signed usage
        agreement PDF. The caller must own the reservation, or be a channel
        account whose child account owns it.
      parameters:
        - name: reservationId
          in: path
          description: Autohost reservation ID
          required: true
          schema:
            type: string
        - name: reportType
          in: path
          description: Type of report to download
          required: true
          schema:
            type: string
            enum:
              - usage-agreement
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Report download URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationReportResponse'
              examples:
                usage-agreement:
                  value:
                    url: >-
                      https://autohost-resources.s3.amazonaws.com/userdata/usage-agreements/res-456/signed.pdf?X-Amz-Expires=3600&...
        '400':
          description: Invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Not authorized to access this reservation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Reservation or user not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to generate report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /lookup/phone/{number}:
    get:
      operationId: lookup-phone
      summary: Lookup phone number
      description: Lookup line type and carrier
      parameters:
        - name: number
          in: path
          description: >-
            URL-encoded phone number in international format (e.g.
            +441234567890)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Phone validation results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupPhoneResponse'
              examples:
                Simple:
                  value:
                    countryCode: US
                    phoneNumber: '+1234567890'
                    nationalFormat: (123) 456-7890
                    carrier:
                      name: Verizon
                      type: mobile
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupPhoneResponse'
              examples:
                Simple:
                  value:
                    countryCode: US
                    phoneNumber: '+1234567890'
                    nationalFormat: (123) 456-7890
                    carrier:
                      name: Verizon
                      type: mobile
  /lookup/social:
    post:
      operationId: lookup-social
      summary: Lookup social accounts
      description: >-
        Lookup social accounts by email and phone number to Check users are not
        using fake profiles by validating they have online social accounts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LookupSocialRequest'
        description: Transaction details object
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Phone validation results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupSocialResponse'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupSocialResponse'
  /lookup/breaches/{email}:
    get:
      operationId: lookup-breaches
      summary: Lookup breaches by email
      description: Discover how many times a user has been compromised
      parameters:
        - name: email
          in: path
          description: URL encoded email address
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Breaches results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupBreachesResponse'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupBreachesResponse'
  /lookup/whois/{domain}:
    get:
      operationId: lookup-whois
      summary: Lookup whois records by domain
      description: Discover who owns a domain
      parameters:
        - name: domain
          in: path
          description: domain name (e.g. google.com)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Whois results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupWhoisResponse'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupWhoisResponse'
  /lookup/domain/{domain}:
    get:
      operationId: lookup-domain
      summary: Lookup company details by domain
      description: Find company details by domain
      parameters:
        - name: domain
          in: path
          description: domain name (e.g. oracle.com)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupDomainCompanyResponse'
              examples:
                Simple:
                  value:
                    - name: Google
                      country: US
                      industry: Internet
                      size: 1000+ employees
                      linkedin_url: https://www.linkedin.com/company/google
                      founded: '1998'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupDomainCompanyResponse'
              examples:
                Simple:
                  value:
                    - name: Google
                      country: US
                      industry: Internet
                      size: 1000+ employees
                      linkedin_url: https://www.linkedin.com/company/google
                      founded: '1998'
  /lookup/geoip/{ip}:
    get:
      operationId: lookup-geoip
      summary: Lookup geo-location by IP
      description: Find location details by IP address
      parameters:
        - name: ip
          in: path
          description: IP Address
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupGeoipResponse'
              examples:
                Simple:
                  value:
                    country_code: US
                    country_name: United States
                    city: Mountain View
                    postal_code: '94043'
                    time_zone_name: America/Los_Angeles
                    latitude: 37.4192
                    longitude: -122.0574
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupGeoipResponse'
              examples:
                Simple:
                  value:
                    country_code: US
                    country_name: United States
                    city: Mountain View
                    postal_code: '94043'
                    time_zone_name: America/Los_Angeles
                    latitude: 37.4192
                    longitude: -122.0574
  /lookup/sexoffender:
    get:
      operationId: lookup-sexoffender
      summary: Lookup sex offenders
      description: Search sex offenders in the USA
      parameters:
        - name: fname
          in: query
          description: First name
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: lname
          in: query
          description: Last name
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: dob
          in: query
          description: Date of birth (YYYY-MM-DD)
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: state
          in: query
          description: State (e.g. CA)
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupSexOffenderResponse'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupSexOffenderResponse'
  /lookup/geocode/{address}:
    get:
      operationId: lookup-address
      summary: Lookup postal address
      description: Lookup or verify billing and shipping addresses
      parameters:
        - name: address
          in: path
          description: Street or mailing address (URL-encoded)
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupAddressResponse'
              examples:
                Simple:
                  value:
                    address: 123 Main St
                    street: 123 Main St
                    city: Mountain View
                    state: CA
                    country: US
                    country_code: US
                    zipcode: '94043'
                    timezone: America/Los_Angeles
                    geo:
                      lat: 37.4192
                      lon: -122.0574
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupAddressResponse'
              examples:
                Simple:
                  value:
                    address: 123 Main St
                    street: 123 Main St
                    city: Mountain View
                    state: CA
                    country: US
                    country_code: US
                    zipcode: '94043'
                    timezone: America/Los_Angeles
                    geo:
                      lat: 37.4192
                      lon: -122.0574
  /lookup/ip-threats/{ip}:
    get:
      operationId: lookup-ip
      summary: Lookup IP Threats
      description: Lookup threat reports associated with an IP address
      parameters:
        - name: ip
          in: path
          description: IP Address
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupIPThreatsResponse'
              examples:
                Simple:
                  value:
                    - ip: 5.167.66.39
                      title: IP reported on blocklist.de feed
                      link: https://lists.blocklist.de/lists/
                      timestamp: '2016-01-01T00:00:00Z'
                      source: blocklist
                      tags:
                        - attack
                        - suspicious
                      reasons:
                        - The IP is blacklisted on blocklist.de
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupIPThreatsResponse'
              examples:
                Simple:
                  value:
                    - ip: 5.167.66.39
                      title: IP reported on blocklist.de feed
                      link: https://lists.blocklist.de/lists/
                      timestamp: '2016-01-01T00:00:00Z'
                      source: blocklist
                      tags:
                        - attack
                        - suspicious
                      reasons:
                        - The IP is blacklisted on blocklist.de
  /lookup/adverse-media/search:
    get:
      operationId: adverse-media-search
      summary: Adverse Media Search
      description: Initiate an adverse media search for a person or company
      parameters:
        - name: first_name
          in: query
          description: First name or alias
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: middle_name
          in: query
          description: Middle name
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: last_name
          in: query
          description: Last name or alias
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: year_of_birth
          in: query
          description: Year of birth (YYYY)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: country
          in: query
          description: Country code (e.g. US)
          required: true
          allowEmptyValue: false
          schema:
            type: string
        - name: city
          in: query
          description: City
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: state
          in: query
          description: State code (e.g. CA)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Search status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdverseMediaSearchResponse'
              examples:
                Simple:
                  value:
                    id: >-
                      ab48405329f526a3f43f6e9c711466f503395f86a18110641ae246df544e56f1
                    status: PENDING
                    startDate: '2023-01-01T00:00:00.000Z'
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /lookup/adverse-media/results/{id}:
    get:
      operationId: adverse-media-report
      summary: Adverse Media Report
      description: View results of an adverse media search for a person or company
      parameters:
        - name: id
          in: path
          description: Report ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Search status object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdverseMediaReportResponse'
              examples:
                Simple:
                  value:
                    id: >-
                      ab48405329f526a3f43f6e9c711466f503395f86a18110641ae246df544e56f1
                    status: FINISHED
                    startDate: '2023-01-01T00:00:00.000Z'
                    stopDate: '2023-01-01T00:10:00.000Z'
                    riskCategories:
                      - Discrimination
                      - Fraud or Financial Crime
                      - Harassment
                      - Violence
                      - Conflicts or Litigation
                      - Other News
                    findings:
                      - title: Title of the news article
                        snippet: Snippet of the news article
                        summary: Summary of the news article
                        displayLink: example.com
                        link: https://www.example.com/article
                        image: https://www.example.com/article/image.jpg
                        riskCategories:
                          - Discrimination
                      - title: Title of the news article
                        snippet: Snippet of the news article
                        summary: Summary of the news article
                        displayLink: example.com
                        link: https://www.example.com/article
                        image: https://www.example.com/article/image.jpg
                        riskCategories:
                          - Fraud or Financial Crime
                          - Harassment
        '400':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /validate/phone/{number}:
    get:
      operationId: validate-phone
      summary: Validate phone number
      description: Ensure that the phone number is valid
      parameters:
        - name: number
          in: path
          description: >-
            URL-encoded phone number in international format (e.g.
            +441234567890)
          required: true
          schema:
            type: string
        - name: country
          in: query
          description: ISO country code (two letters)
          required: false
          allowEmptyValue: false
          schema:
            $ref: '#/components/schemas/QueryParamCountry'
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Phone validation results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyPhoneResponse'
              examples:
                Valid:
                  value:
                    countryCode: US
                    phoneNumber: '+1234567890'
                    nationalFormat: (123) 456-7890
                Invalid:
                  value:
                    error: Invalid number
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyPhoneResponse'
              examples:
                Valid:
                  value:
                    countryCode: US
                    phoneNumber: '+1234567890'
                    nationalFormat: (123) 456-7890
                Invalid:
                  value:
                    error: Invalid number
  /validate/email/{email}:
    get:
      operationId: validate-email
      summary: Validate email address
      description: Ensure that the email address is valid
      parameters:
        - name: email
          in: path
          description: URL encoded email address
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Email validation results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyEmailResponse'
              examples:
                Valid:
                  value:
                    status: VALID
                    result:
                      isEduEmail: true
                      emailDomainEducation:
                        name: University of California, Berkeley
                        countryName: United States
                        countryCode: US
                        domains:
                          - berkeley.edu
                        urls:
                          - https://www.berkeley.edu
                Invalid:
                  value:
                    status: INVALID
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /fraud/analyze:
    post:
      operationId: fraud-analyze
      summary: Analyze a transaction for fraud
      description: Send object with transaction parameters to the fraud endpoint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FraudAnalysisRequest'
        description: Transaction details object
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Fraud analysis results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FraudAnalysisResponse'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /predict/str-fraud:
    post:
      operationId: predict-str-fraud
      summary: Predict fraud risk for a reservation
      description: >-
        Analyzes reservation features using a trained ML model and returns a
        fraud probability score with risk tier classification. All input
        features are optional with sensible defaults. The model performs best
        when more features are provided.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReservationFeatures'
            examples:
              minimal:
                value:
                  lead_time_days: 7
                  nights: 3
                  guests_count: 2
                  price_total: 450
              with_verification:
                value:
                  lead_time_days: 7
                  nights: 3
                  guests_count: 2
                  price_total: 450
                  has_phone: 1
                  idv_attempt_count: 1
                  idv_success_count: 1
                  payment_success_count: 1
                  has_booking_data: 1
                  has_idv_data: 1
                  has_payment_data: 1
        description: Reservation features for fraud prediction
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful prediction with fraud probability and risk tier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionResult'
              examples:
                low_risk:
                  value:
                    fraud_probability: 0.065
                    risk_tier: auto_approve
                    action: Automatic approval - low risk
                    threshold_info:
                      auto_approve_max: 0.13
                      review_min: 0.13
                      flag_min: 0.325
                medium_risk:
                  value:
                    fraud_probability: 0.22
                    risk_tier: review
                    action: Human review required
                    threshold_info:
                      auto_approve_max: 0.13
                      review_min: 0.13
                      flag_min: 0.325
                high_risk:
                  value:
                    fraud_probability: 0.78
                    risk_tier: flag
                    action: Flag for immediate attention - high risk
                    threshold_info:
                      auto_approve_max: 0.13
                      review_min: 0.13
                      flag_min: 0.325
        '400':
          description: Invalid input - validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
              examples:
                validation_error:
                  value:
                    error: Invalid input
                    details:
                      - loc:
                          - nights
                        msg: Input should be greater than or equal to 0
                        type: greater_than_equal
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /tenant-evictions/search:
    get:
      operationId: tenant-evictions-search
      summary: Tenant Evictions search
      description: Search entities in the Tenant Evictions list
      parameters:
        - name: full_name
          in: query
          description: Full name or alias
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: street
          in: query
          description: Street address
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: unit
          in: query
          description: Unit number
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: postal_code
          in: query
          description: Zip or postal code
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: country_code
          in: query
          description: Country code (e.g. US)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: state_code
          in: query
          description: State or province code (e.g. CA)
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: sources
          in: query
          description: 'Comma-separated list of sources to search (default: all)'
          required: false
          allowEmptyValue: false
          schema:
            type: string
        - name: from
          in: query
          description: 'Pagination start (default: 0)'
          required: false
          allowEmptyValue: false
          schema:
            type: number
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupEvictionsResponse'
              examples:
                Simple:
                  value:
                    items:
                      - source: us-ny
                        source_url: >-
                          https://www.nycourts.gov/courts/nyc/housing/holdover.shtml
                        eviction_address: 123 Main St
                        eviction_zip: '10001'
                        eviction_date: '2020-01-01'
                        case_number: '123456'
                        location:
                          geo:
                            lat: 40.7128
                            lon: -74.006
                          street: 123 Main St
                          unit: Apt 1
                          city: New York
                          state_name: New York
                          country_name: United States
                          postal_code: '10001'
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /tenant-evictions/sources:
    get:
      operationId: tenant-evictions-sources
      summary: Tenant Evictions sources
      description: Retrieve a list of sources available in the Tenant Evictions list
      parameters:
        - name: x-api-key
          in: header
          description: API Authentication Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lookup results object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupEvictionsSourcesResponse'
              examples:
                Simple:
                  value:
                    sources:
                      - us-ny
                      - us-sf
                      - us-dc
                      - us-md
                      - ca-on
        '500':
          description: An error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
